Quiz Catalog

Catalog of quizzes

a = (el for el in range(5))
b = (el for el in range(7, 13, 2))
t = (a, b)
print(t)
(<generator object <genexpr> at 0x7f8f46f245f0>, <generator object <genexpr> at 0x7f8f46d255b0>)
  • build-in/range
  • tuple
  • generator

a = "Tree",

print(type(a))
<class 'tuple'>
  • tuple
  • type
  • build-in/type

t = ("Jake", "Mike", "O'Brien", "Tim", "George", "Heisenberg")
t.sort(key=lambda x: len(x), reverse=True)

print(t.index("Heisenberg"))
AttributeError: 'tuple' object has no attribute 'sort'
  • tuple