Accessing Nested Lists
Write a program to create a list with the values at the given Indexes.
Sample Input 1
3
1 2
0 3
0 1
Sample Output 1
['hockey','grapes','banana']
Nested List Indexing
Write a program to print the index of the given number N in the list of tuples.
Sample Input 1
4
Sample output 1
0 1
Sample Input 2
15
Sample output 2
1 1
List of Lists to List of Tuples
Write a program to convert the list of lists to a list of tuples.
Sample Input1
3
1 2 3 4
10 20 30
5 10 15 20
Sample Output 1
[(1,2,3,4), (10,20,30), (5,10,15,20)]
Remove N in all Tuples
Write a program to remove the given number N in all the tuples if it present.
Sample Input 1
3
Sample output 1
[(1,2,4,5,6), (2,4,6,8), (1,5,7)]
List of Unique Tuples
Write a program to print the lists which contain the unique elements in the given list of lists.
Sample Input 1
3
1 2 3
5 10 15
10 20 10 30
Sample output 1
[[1,2,3],[5,10,15]]
Character Frequency
Write a program to compute the frequency of characters other than space.
Sample Input 1
Pop up
Sample Output 1
o: 1
p: 3
u: 1