class character():
class personalized:
def __init__(self, name, age, height, width, hair_color, eye_color):
# I want to do this
for attr in personalized:
personalized.attr = attr
#instead of this
personalized.name = name
personalized.age = age
personalized.height = height
If I am using classes with a lot of attributes I don't want to have to set it equal to a variable every time because it will take up a lot of space. Is there a way to write it like I did above but actually works. In essence I don't know how to retrieve attributes from the __init__
function.