For training, I want to atumaticly create users in a system using class.
Here is my code:
class CsrUser(object):
def __init__(self, f_name, l_name, login, role, sex, password ='Hot12345'):
self.f_name = f_name
self.l_name = l_name
self.login = login
self.role = role
self.sex = sex
self.password = password
I want to create dynamic objects of the class from the user input,
#i want to create something like this
def get_users_data():
new_user = input("Enter the user name")
... #get all the data
new_user = CsrUser(...)
I want the name of the object to be the value that inside new_user