June 2017
Beginner
352 pages
8h 39m
English
As with the other built-in collections, set sports a copy() method which performs a shallow copy of the set (copying references but not objects):
>>> j = k.copy()>>> j{128, 81, 37, 54, 108, 12}
As we have already shown, the set() constructor may be used:
>>> m = set(j)>>> m{128, 81, 37, 54, 108, 12}
Read now
Unlock full access