Python Class Basic Example
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
p1 = Person("Padme Amidala", 26)
print(p1.name)
print(p1.age)
COPIED

SNAPPED!
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
p1 = Person("Padme Amidala", 26)
print(p1.name)
print(p1.age)
SEND TO YOURSELF, SAVE FOR LATER, OR SHARE WITH YOUR TEAM!
SEND TO YOURSELF, SAVE FOR LATER, OR SHARE WITH YOUR TEAM!
SNAPPED!
Comments
Post a Comment