From 4656addc512aad006013ecf4ee0c14cad8296598 Mon Sep 17 00:00:00 2001 From: tiagorg Date: Wed, 9 Nov 2022 21:56:58 +0000 Subject: [PATCH] allMatches update --- 1ano/fp/aula05/allMatches.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/1ano/fp/aula05/allMatches.py b/1ano/fp/aula05/allMatches.py index c77752f..4a030e6 100755 --- a/1ano/fp/aula05/allMatches.py +++ b/1ano/fp/aula05/allMatches.py @@ -3,13 +3,15 @@ def main(): print(matches) print(len(matches)) + def allMatches(teamList): matchList = [] + for team1 in teamList: for team2 in teamList: - if team1 == team2: - continue - matchList.append((team1, team2)) + if team1 != team2: + matchList.append((team1, team2)) + return matchList if __name__ == "__main__":