BPSC TRE – Python & Web Scripting Languages | Test 1

Questions 16-20 of 50

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

Question 16

MCQ · Single Correct 1 mark

What is the result of evaluating 'is' vs '==' when comparing two distinct lists with identical elements: a = [1, 2] and b = [1, 2]?

Answers for question 16

Question 17

MCQ · Single Correct 1 mark

Which special method in Python is called automatically when an object is instantiated to initialize its attributes?

Answers for question 17

Question 18

MCQ · Single Correct 1 mark

In Python exception handling, when is the code inside a finally block executed?

Answers for question 18

Question 19

MCQ · Single Correct 1 mark

What does the zip() built-in function do in Python?

Answers for question 19

Question 20

MCQ · Single Correct 1 mark

Which dictionary method returns a default value if a specified key does not exist, avoiding a KeyError?

Answers for question 20
Scroll to Top