So I'm a beginner with python, this is like my 3rd day learning it so I'm sorry if this is too obvious for you.
I'm creating a class called Users() that takes first_name, last_name, user_name and password as arguments and I wan't to assign their values to self with a for loop
I'm first defining __init_ with self and the parameters, and then a for loop that it's like this:
def __init__(self, name, lastName, user, password):
for i in self:
self.i = i
so I don't have to do this
def __init__(self, name, lastName, user, password):
self.name = name
self.lastName = lastName
self.user = user
self.password = password
But it's not working
I get this error: for i in self: TypeError: 'Users' object is not iterable
How can I make this work?