0

I want to make a new member of my class when a person sign up but it's hard to do that manually

class user:
    def __init__(self,name):
        self.name=name
user1=user('ali')
user2=user('reza')
user3=user('danial')

I want that when I get a name input (and other information) it automatically generates a new user like this:

while True:
    'user+{number}'=user(input ('enter your name:'))
    number +=1

How to make this work

I'mahdi
  • 23,382
  • 5
  • 22
  • 30

0 Answers0