Skip to content

Python MCQ Questions

0
Answered
0
Correct
0%
Accuracy
Q101 Easy

What is the correct way to open the file "test.txt" and append the text "foo" to it?

Q102 Easy

What is returned by: ("123")[0]

Q103 Easy

What is the primary difference between lists and tuples?

Q104 Easy

What is a metaclass in Python?

Q105 Easy

What is the runtime complexity of adding an item to a stack and removing an item from a stack?

Q106 Easy

What is the output of "Dummy Text is my text".strip('Te') -

Q107 Easy

What is a fundamental difference between a list and a tuple?

Q108 Easy

What is the correct way to call a function?

Q109 Easy

What is a string delimited by?

Q110 Easy

What is meant by the phrase "space complexity"?

Q111 Easy

What is the output of the following statement?>>> 1j * 1J

Q112 Easy

What is the best way to check if a list is empty? x = []

Q113 Easy

What is the type of inf?

Q114 Easy

What is the correct syntax for adding a key called variety to the fruit_info dictionary that has a value of Red Delicious?

Q115 Easy

What is the result of string.lower('RR')?

Q116 Easy

What is runtime complexity of the list's built-in .append() method?

Q117 Easy

What is a pickle?

Q118 Easy

What is printed by the following: print type(lambda:None) ?

Q119 Easy

In Python, what is the default maximum level of recursion?

Q120 Easy

What is 3/2?

Q121 Easy

What is the Python 3 equivalent of the following Python 2 code: print >> f, "Smarterer", "Tests",

Q122 Easy

What is the type of the expression [" "]?

Q123 Easy

What is the difference between the regular expression functions match and search?

Q124 Easy

What is the correct syntax for creating a variable that is bound to a set?

Q125 Easy

What is the exponentiation (power) operator?

Q126 Easy

What is the definition of abstraction as applied to object-oriented Python?

Q127 Easy

What is printed by print( r"\nthing" )?