You are on page 1of 1

1.

Write a python program to perform the following:


Given_list = [15, 35, 7, 3, 41, 19, 35, 7, 89,96,51,15]
a. Remove the duplicates from this list
b. Split the given list into 3 equal chunks
c. Reverse each chunk of list value while printing
Expected output:
Chunk 1 [15, 35, 7]
After reversing [7, 35, 15]
Chunk 2 [3, 41, 19]
After reversing [19, 41, 3]
Chunk 3 [89, 96, 51]
After reversing it [51, 96, 89]

2. Write a python program print the output as expected:

Expected output:

a. user entered 10 - the output should be 55 (1+2+3+4+5+6+7+8+9+10)


b. Input: keys = ['One', 'Two', 'Three']
values = [1, 2, 3]
Output: {'One': 1, 'Two': 2, 'Three': 3}

3. Remove duplicates from a list and create a tuple and find the minimum and maximum
number

sample_list = [78, 65, 41, 45, 94, 41, 99, 94]

O/p: unique items [78, 65, 41, 45, 99]

tuple (78, 65, 41, 45, 99)

min: 41

max: 99

You might also like