Page 1 of 1

Python: For Loops - # 2

Posted: Thu Sep 04, 2025 6:10 am
by The Jason

Code: Select all

# Looping thru different array types 

set_of_spme_NBA_teans = set(("Miami Heat", "Oklahoma City Thunder", "Boston Celtics", "Minnesota Timberwolves"))

for s in set_of_some_NBA_team:

print(s)

tuple_of_some_NHL_teams = tuple(("San Jose Sharks", "Chicago Black Hawks", "Montreal Canadiens", Detroit Redwings"))

for t in tuple_of_some_NHL_teams

print(t)

list_of_some_MLS_teams = list(("Chicago Fire", 'LA Galaxy", "Nashville SC"))

for l in list_of_some_MLS_teams

print(l)