Here are a few lines of Python code I wrote to demonstrate how the basics of sets work in Python. Note that these are the same sets A and B that appeared on Exam #2!
So far I’ve only put in code to compute and print . Take a minute to look at this link for a primer on the other basic set operations, and then add a couple lines of code to compute
,
,
and
.