- See the following list:
list1 = ["abc",[2,3,("mohit","the avengers")],1,2,3]
Get the string "avengers".
- With the for loop, take the following list and sort it based on the sum of the values of the tuples of the list:
[(1,5),(9,0),(12,3),(5,4),(13,6),(1,1)]
- Use the list, [1,2,4,5,1,1,4,1,56], and find the index of all the 1 elements.
- Do the preceding exercise by using list comprehension.