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


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:
  2. To eliminate duplicates from a list:
  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?


Click Next exercise to continue.