class UserInfo: def __init__(self, first_name, last_name, age, job, hobbies): self.__dict__.update(locals()) self.email = first_name + last_name + "@gmail.com" def full_name(self): return self.first_name + " " + self.last_name
class UserInfo:def __init__(self, first_name, last_name, age, job, hobbies):self.first_name = first_nameself.last_name = last_nameself.age = ageself.job = jobself.hobbies = hobbies- class UserInfo:
- def __init__(self, first_name, last_name, age, job, hobbies):
- self.__dict__.update(locals())
- self.email = first_name + last_name + "@gmail.com"
def full_name(self):return self.first_name + self.last_name- def full_name(self): return self.first_name + " " + self.last_name