Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cards = input().split()
- team_a = [1] * 11
- team_b = [1] * 11
- for card in cards:
- tokens = card.split('-')
- team = tokens[0]
- player = int(tokens[1])
- player_index = player - 1
- if team == 'A':
- team_a[player_index] = 0
- else:
- team_b[player_index] = 0
- team_a_count = team_a.count(1)
- team_b_count = team_b.count(1)
- print(f'Team A - {team_a_count}; Team B - {team_b_count}')
- if team_a_count < 7 or team_b_count < 7:
- print('Game was terminated')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement