Quiz Catalog

Catalog of quizzes

class ABC:
  def __repr__(self):
    return 'abc'
  
  def __str__(self):
    return 'abc'

a = 'abc'
b = ABC()

print(a == b)
False
  • object/compare

x = ["name", "id", "balance", "date"]
x1 = x[:]
x2 = x.copy()

print(x1 == x2, x1 is x2)
True False
  • object/compare
  • object/identify