Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 14 - Tuples, Sets, and Dictionaries - Section 14.3 - Sets - Check Point - MyProgrammingLab - Page 484: 14.15

Answer

The printout of the given code will be - {1, 3, 4, 5, 6, 7} {1, 3, 4, 5, 6, 7} {1, 6} {1, 6} {4, 5} {4, 5} {3, 4, 5, 7} {3, 4, 5, 7}

Work Step by Step

union is the method of set class which returns the union of two sets intersection is the method of set class which returns the intersection of two sets difference is the method of set class which returns the difference of two sets symmetric_difference is the method of set class which returns the symmetric_difference of two sets | operator provides the union of given sets & operator provides the intersection of given sets ^ operator provides the set exclusive or of given sets - operator provides the set difference of the given sets
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.