Quiz Catalog

Catalog of quizzes

x1 = [i for i in range(10) if i % 2 and i % 3]
x2 = x1
x2.append(e for e in range(8) if e not in x1)

print(x1)
[1, 5, 7, <generator object <genexpr> at 0x7f18ad923f40>]
  • list/comprehension
  • build-in/append
  • build-in/range
  • generator