Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Recap
Using sets to compute unique elements
Set operations
Simulating machines
Summary
13. Summary

Instruction

Good job! It's time to wrap things up. First, let's review our new skills. We've learned:

  1. To create a set from a list:
    set(list_name)
  2. To eliminate duplicates from a list:
    list(set(list_name))
  3. To combine multiple set operators:
    set_1 & set_2 & set_3 & set_4
    (set_1 | set_2) - set_3 - set_4
  4. To check if set_1 is a subset/superset of set_2 using an operator:
    set_1 <= set_2
    set_1 >= set_2
  5. Sets can be used to store all previous states of a state machine. To check if a new state already exists in the set:
    if new_state in previous_states:
      ...

Okay, how about a short quiz?

Exercise

Click Next exercise to continue.