sibinasto

3. Football cards

Jan 28th, 2021
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. team_a = [f"A-{i}" for i in range(1, 12)]
  2. team_b = [f"B-{i}" for i in range(1, 12)]
  3.  
  4. players_kicked = input().split()
  5.  
  6. for i in players_kicked:
  7.  
  8.     if i in team_a:
  9.         team_a.remove(i)
  10.         if len(team_a) < 7:
  11.             break
  12.  
  13.     if i in team_b:
  14.         team_b.remove(i)
  15.         if len(team_b) < 7:
  16.             break
  17.  
  18. print(f"Team A - {len(team_a)}; Team B - {len(team_b)}")
  19. if len(team_a) < 7 or len(team_b) < 7:
  20.     print("Game was terminated")
Advertisement
Add Comment
Please, Sign In to add comment