Natália Catunda
Posted on July 7, 2020
Now we talk about the second part of this universe.
let's go!
At first post, I put one attribute outside a method,'Kind'.
it's important if you want to work on one kind of class, right? (what you think?)
Today I create a Class Person...
class Person:
def __init__(self,name,age):
self.name = name
self.age = age
n = Person("Natália Catunda","27 anos")
p = Person("Paulo Andrande","28 anos")
print(p.name, p.age)
This method doesn't have any attributes outside.
just one important characteristic that code is...
the way that I declare these 2 attributes (name and age).
It's a simple representation of class very important and good to beginners like me! ;)
Thanks for reading this little python pill,
and keep learning!
💖 💪 🙅 🚩
Natália Catunda
Posted on July 7, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.