BPSC TRE – Python & Web Scripting Languages | Test 1

Questions 21-25 of 50

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

Question 21

MCQ · Single Correct 1 mark

What is the purpose of the __str__() method in a Python class?

Answers for question 21

Question 22

MCQ · Single Correct 1 mark

What does nonlocal keyword do in Python nested functions?

Answers for question 22

Question 23

MCQ · Single Correct 1 mark

Which Python method removes and returns the last element from a list?

Answers for question 23

Question 24

MCQ · Single Correct 1 mark

What is a $\lambda function$ in Python?

Answers for question 24

Question 25

MCQ · Single Correct 1 mark

In Python, how is single inheritance implemented in a child class definition?

Answers for question 25
Scroll to Top