Skills101
← All practice quizzes

Quiz: Tuples and Sets

5 questionsNo time limitPass: 60%+10 XP on first pass

Tuples are fixed lists; sets keep only unique items and do fast membership checks. Compare list, tuple, set and dict on one card.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What does len({1, 2, 2, 3, 3, 3}) return?

  2. Question 2

    Which creates a tuple with one item?

  3. Question 3

    What is {1, 2, 3} & {2, 3, 4}?

  4. Question 4

    What happens here?

    t = (1, 2, 3)
    t[0] = 10
    
  5. Question 5

    What type is x = {}?