Quiz Catalog

Catalog of quizzes

a = (1, 2, 3, 2, 1)
b = range(1, 6)

for x in b:
  if a.__contains__(x):
    a += (a.count(x),)

print(a)
(1, 2, 3, 2, 1, 2, 3, 2)
  • tuple/operation/contains
  • tuple/operation/count
  • build-in/range