Python MCQ Test: Python MCQs - Practice Questions
1. What is the result of the expression '5 + 3 * 2' in Python?
2. In Python, how do you check if a key exists in a dictionary?
3. What is the purpose of the 'zip()' function in Python?
4. Which method is used to convert a string to lowercase in Python?
5. In Python, how do you concatenate two lists?
6. What is the purpose of the 'finally' block in Python's exception handling?
7. What is the result of the expression 'len([1, 2, 3])' in Python?
8. How do you define a constant in Python?
9. Which data type is mutable in Python?
10. Which of the following is a correct way to define a function in Python?
11. How do you create a list in Python?
12. In Python, what is the result of the expression '3 // 2'?
13. What is the purpose of the 'format()' method in Python?
14. What is the purpose of the 'map()' function in Python?
15. In Python, how do you check the type of a variable?
16. What is the result of the expression '2 + '2'' in Python?
17. In Python, what is the 'split()' method used for?
18. What is the purpose of the 'self' parameter in Python class methods?
19. What is the purpose of the 'sorted()' function in Python?
20. In Python, how do you concatenate two lists?