0

I try to create an ai game, how can I print chosen objects or function's name only before the '_'? For example:

players = [random_player, ai_player]
player_number= input('Determine first player Random(0) or AI(1):')
player_number2= input('Determine second player Random (0) or AI (1):')
player_array=[players[int(player_number)], players[int(player_number2)]]

# this is the wrong format I know.
print(' The game begins with {0} vs {1}'.format((player_array[0]), (player_array[1])) 

output must be like that :

The game begins with random vs ai 
Vural Erdogan
  • 101
  • 12

0 Answers0