GATE DA Python Data Structures & Collections | Set 1

Questions 21-25 of 100

0% completed (0/100 answered)
Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 21

MCQ · Single Correct 1 mark

What is the output of the following list comparison in Python?

print([1, 2, 3] < [1, 2, 4])

Answers for question 21

Question 22

NAT · Numerical Answer 1 mark

Calculate the value of count after loop execution:

count = 0
for x in [[]] * 5:
count += len(x)
print(count)

Answers for question 22

Question 23

MCQ · Single Correct 1 mark

What will be the output of list(filter(lambda x: x % 2 != 0, range(6)))?

Answers for question 23

Question 24

NAT · Numerical Answer 1 mark

What is printed by the following snippet?

vals = [10, 20, 30]
vals.insert(-1, 99)
print(vals[2])

Answers for question 24

Question 25

MCQ · Single Correct 1 mark

Which of the following correctly creates a list of 10 zeros without sharing inner references?

Answers for question 25
Scroll to Top