List in Python Quiz 10

Share with others

Welcome to your List in Python Quiz 10

Name
Email
School
Q91. Write the output of the following :

L= [1,2,3,4,5]m = [m and 1 for m in L]print(m)

Q92. Write the output of the following :

L= [1,2,3,4,5]m = [m + 3 for m in L]print(m)

Q93. Write the output of the following :

L1 = [1, 2, 3, 4, 5]L2 = [9, 8, 7, 6, 5]S= [L1 + 3 for L1 in L2]print(S)

Q94. Write the output of the following :

L1 = [1, 2, 3]L2 = [9, 8]S= [m * n for m in L1 for n in L2]print(S)

Q95. Write the output of the following :

L1 = [1, 2, 3]L2 = [9, 8]S= [n + m for m in L1 for n in L1]print(S)

Q96. Which of the following statement will generate the square of given list L ?

L = [1, 2, 3, 4, 5]

Q97. Which of the following function is used to shuffle the list ?

Q98. Both the print statement will produce the same result.(T/F)

L = ["Amit", "Ananya", "Parth"]print(L[-1])print(L[-1][-1])

Q99. Write the output of the following:

L1 = [1, 2, 3]L2 = [1, 2, 3, 4, 5, 6]print(L1 in L2)

Q100. Following command will insert 7 in third position of List L

Share with others