Code Lab BetaBUILD. RUN. DISCOVER.
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
PYTHON STRUCTURES / CHAPTER 06 / Learn / LESSON 02
A set holds unique elements with no meaningful order (do not rely on order without sorted()).
tags = {"python", "lab", "python"}
print("lab" in tags) # Truein tests membership quickly. Duplicates disappear when building the set.
Learn: set and in.
MODULES IDLE
›