Quiz Catalog

Catalog of quizzes

class A:
  def __init__(self):
    self.x = 5
  
class B(A):
  pass

print(isinstance(B, A))
False
  • class/inherit
  • build-in/isinstance

data = [2, 4, 5, 6, {}]

a = isinstance(data[4], dict)

print(a)
True
  • build-in/isinstance
  • list/literal
  • dict
  • boolean

a = 5 ** 1000000
print(isinstance(a, int))
True
  • build-in/isinstance
  • int/pow