I'm working on a project that requires the user to input names of players into a list. Is there any way to prevent the same name from being inputted?
Code I have so far:
#Team 1 naming
print("Team 1 player input")
elem = int(input("Amount of players: "))
for i in range(0, elem):
Team1_list.append(str(input(f'Enter player number {num_team1} name (In batting order) eg J.Smith: ')))
num_team1 = num_team1 + 1
print(Team1_list)
I've tried some things but none seem to work