31.
What will be the output of the following Python code?
def change(var, lst):
    var = 1
    lst[0] = 44
k = 3
a = [1, 2, 3]
change(k, a)
print(k)
print(a)

33.
What is the list comprehension equivalent for?
{x : x is a whole number less than 20, x is even}    (including zero)

34.
What will be the output of the following Python code?
values = [[3, 4, 5, 1], [33, 6, 1, 2]]
 
v = values[0][0]
for lst in values:
    for element in lst:
        if v > element:
            v = element
 
print(v)

35.
What will be the output of the following Python code?
l=["good", "oh!", "excellent!", "#450"]
[n for n in l if n.isalpha() or n.isdigit()]

37.
What will be the output of the following Python code?
myList = [1, 2, 3, 4, 5, 6]
for i in range(1, 6):
    myList[i - 1] = myList[i]
 
for i in range(0, 6): 
    print(myList[i], end = " ")

Read More Section(Lists in Python)

Each Section contains maximum 100 MCQs question on Lists in Python. To get more questions visit other sections.