Python Quiz

Answer 10 questions and see how you score!

1. Which of these will raise a TypeError?

2. What will be printed? print("a","b",sep="-",end="!")

3. How do you call a parent class constructor in a subclass?

4. Which method sorts a list in descending order?

5. Which loop is used when number of iterations is known?

6. Which function is used to combine multiple iterables?

7. Which built-in function returns the type of an object?

8. What is the difference between list and tuple?

9. What will print(list(map(lambda x:x*2, [1,2,3]))) output?

10. Which of the following is valid for private variable?