The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #935
issubclass() only accepts classes as attributes, not classes instances. This will work:
class MyDict(dict):
pass
print(issubclass(MyDict, dict))
However, this will throw a TypeError
exception:
class MyDict(dict):
pass
my_dict = MyDict()
a_dict = dict()
print(issubclass(my_dict, a_dict))
(programiz.com/python-programming/methods/built-in/issubclass)
Question difficulty: 🔵🔵🔵🔵🔵