Instruction
Good job! It's time to wrap things up. First, let's review our new skills. We've learned:
- To create a set from a list:
set(list_name)
- To eliminate duplicates from a list:
list(set(list_name))
- To combine multiple set operators:
set_1 & set_2 & set_3 & set_4 (set_1 | set_2) - set_3 - set_4
- To check if
set_1is a subset/superset ofset_2using an operator:set_1 <= set_2 set_1 >= set_2
- 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 to continue.



