GATE DA Python Data Structures & Collections | Set 1

Questions 36-40 of 100

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

Question 36

MCQ · Single Correct 1 mark

What is the output of the following tuple modification attempt?

t = ([1, 2], 3)
t[0].append(4)
print(t)

Answers for question 36

Question 37

NAT · Numerical Answer 1 mark

Evaluate the result of len({1, '1', 1.0, (1,)}):

Answers for question 37

Question 38

MCQ · Single Correct 1 mark

What is the average time complexity for searching a key in a Python dict?

Answers for question 38

Question 39

NAT · Numerical Answer 1 mark

What integer is printed by the following dictionary method call?

PYTHON
d = {'a': 10, 'b': 20}
print(d.setdefault('c', 99) + d.setdefault('a', 50))
Answers for question 39

Question 40

MCQ · Single Correct 1 mark

What is the result of the expression set('banana')?

Answers for question 40
Scroll to Top