Skip to content

Instantly share code, notes, and snippets.

@ayubmetah
Created December 18, 2020 11:02
Show Gist options
  • Save ayubmetah/34e0bb53752b7b614e525543bf49996a to your computer and use it in GitHub Desktop.
Save ayubmetah/34e0bb53752b7b614e525543bf49996a to your computer and use it in GitHub Desktop.
Nested Loop
teams = [ 'Man u', 'Tottenham', 'Arsenal', 'Chelsea', 'Liverpool' ]
for home_team in teams:
for away_team in teams:
if home_team != away_team:
print(home_team + " vs " + away_team)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment