I 'm getting the error "TypeError: Can't convert 'int' object to str implicitly" when using a for loop to create class instances.I'm fairly new to programming and haven't seen this error before
class Player(object):
properties = []
def __init__( self, name, wealth, player_number):
self.name = name
self.wealth = wealth
self.player_number = player_number
def __repr__(self):
return str(self.wealth)
players = {}
for x in range(0, Player_count):
players["player_" + x] = Player(input("Name"), input("Starting Wealth"), x)
I'm getting the error when it reaches x