Advanced Quiz 5
1. How do you catch multiple exception types in one except block?
2. What is the output of print([x for x in range(5) if x%2])?
3. Which method is used to serialize Python objects?
4. What is monkey patching?
5. How do you get the current working directory?
6. Which built-in function can execute a string as Python code?
7. What is the output of print((lambda x, y=2: x*y)(3))?
8. What is the difference between "is" and "==" in Python?
9. What does the @classmethod decorator do?
10. What is the purpose of __slots__ in a class?
Previous Next