Iterating over sets

Naturally, sets are iterable, although the order is arbitrary:

>>> for x in {1, 2, 4, 8, 16, 32}:
>>> print(x)
32
1
2
4
8
16
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset