- Home
- All MCQs
All MCQs with Answers · Page 737
45,334 multiple choice questions from every subject, newest first. Switch on practice mode to hide the answers and test yourself.
What is the output of print(len({1: 'a', 2: 'b', 1.0: 'c', 3: 'd'})) in Python?
print(len({1: 'a', 2: 'b', 1.0: 'c', 3: 'd'}))
What is the output of print('STRASSE'.casefold() == 'strasse') in Python?
print('STRASSE'.casefold() == 'strasse')
What is the output of print(sum(1 for c in 'banana' if c == 'n')) in Python?
print(sum(1 for c in 'banana' if c == 'n'))
Which pathlib method reads a whole text file in Python?
Which function creates a directory including missing parents in Python?
What error occurs when assigning to a property that has no setter in Python?
What does del x do in Python?
What is the output of print({'a': 1, 'b': 2}.keys() - {'a': 0}.keys()) in Python?
print({'a': 1, 'b': 2}.keys() - {'a': 0}.keys())
Which module copies and removes whole directory trees in Python?
What is the output of print(1_000_000) in Python?
print(1_000_000)
What is the output of the following Python code snippet?
from datetime import date, timedelta
print(date(2024, 1, 1) + timedelta(days=10))
print(date(2024, 1, 1) + timedelta(days=10))
What is the output of the following Python code snippet?
from itertools import permutations
print(len(list(permutations([1, 2, 3]))))
print(len(list(permutations([1, 2, 3]))))
What is string interning in Python?
What is the output of the following Python code snippet?
from functools import lru_cache
@lru_cache(None)
def fib(n):
return n if n
What is the output of print('Z' < 'a') in Python?
print('Z'
Which tool formats Python code automatically with an uncompromising style?
What is the diamond problem in multiple inheritance in Python?
Where are compiled .pyc files stored in Python?
What is the output of print(pow(6, 2, 10)) in Python?
print(pow(6, 2, 10))
What does the gc module control in Python?
What is the output of print(6 & 7) in Python?
print(6 & 7)
What is the time complexity of Python's built-in sort?
What is the output of print({1: 'a', True: 'b'}) in Python?
print({1: 'a', True: 'b'})