Python Classes/Objects


class Girl:

   def __init__(self,name,age):

    self.name=name

    self.age=age

    

p2=Girl("Anna", 19)

print(p2.name)

print(p2.age)

Anna 19


Leave a comment

Log in with itch.io to leave a comment.