GATE DA Python Data Structures & Collections | Set 1

Questions 16-20 of 100

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

Question 16

MCQ · Single Correct 1 mark

What will be the output of the code snippet below?

x = [1, 2, 3]
y = x[::-1]
print(x is y, x == y[::-1])

Answers for question 16

Question 17

NAT · Numerical Answer 1 mark

Evaluate the output of the expression sum(range(1, 10, 2)):

Answers for question 17

Question 18

MCQ · Single Correct 1 mark

What will happen when executing the following snippet?

a = [1, 2]
a[len(a):] = [3, 4]
print(a)

Answers for question 18

Question 19

NAT · Numerical Answer 1 mark

What value is printed by print(a[0][1] + a[1][0]) given a = [[1, 2], [3, 4]]?

Answers for question 19

Question 20

MCQ · Single Correct 1 mark

What is the average time complexity of accessing an element at a known index L[i] in a Python list?

Answers for question 20
Scroll to Top