bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Python/Foundations
Python•Foundations

Python - Loop Sets

Loop Items

You can loop through the set items by using a for loop:

Example

thisset = {"apple", "banana", "cherry"}
for x in thisset:
  print(x)

Previous

Python - Remove Set Items

Next

Python - Join Sets