Quiz Catalog

Catalog of quizzes

a = {1, 2, 3}
b = {1, 2, 3, 4, 5}

print(a & b | a)
{1, 2, 3}
  • set/operation/definition
  • set/operation/addition

a = {1, 2, 3, 4, 5}
b = {1, 2, 3}

print(a | b & a)
{1, 2, 3, 4, 5}
  • set/operation/definition
  • set/operation/addition

a = {5, 4, 3, 2, 1}
b = {1, 2, 3, 6}
c = {7, 4, 2, 1}
c = c.symmetric_difference(a | b)

print(c)
{3, 5, 6, 7}
  • set/operation/symmetric_difference
  • set/operation/addition