Data Types and Variables – Multiple Choice Questions (MCQs)
-
-
26. What will be the output of `print(type(range(5)))`?
-
27. Which of the following is NOT a valid way to create a string literal in Python?
-
28. What is the output of `print(bool(' '))`?
-
29. Which method is used to remove a specific element from a list by its value?
-
30. Which of the following is the correct way to check if a key exists in a dictionary `my_dict`?
-
31. What will be the output of `print(type(b'hello'))`?
-
32. Which of the following is a mutable sequence type in Python?
-
33. What is the output of `print(f'{10:b}')`?
-
34. Which method is used to remove the last element from a list?
-
35. What will be the output of `print(type(1))`?
-
36. Which of the following is a valid way to access the last element of a list `my_list`?