I would like to get a number from the user lets say 3.
Now i want to create objects with the name 'user1 = User() , user2 = User(), user3 = User()'
is that possible at all?
or is there an alternative?
I would like to get a number from the user lets say 3.
Now i want to create objects with the name 'user1 = User() , user2 = User(), user3 = User()'
is that possible at all?
or is there an alternative?
You might want to use a dict:
result = dict()
for i in range(10):
result['user' + i] = 'some value'