Python Class Init, Instances and Instance Attributes #shorts

1K views Feb 21, 2023
codefather.tech

Let's create a class in Python. We will define a constructor (init method), we will create two class instances (or objects) and finally print the same instance attribute for both instances. Notice how we use self in the constructor. Everything under a minute! Find out how to create your classes in Python: https://codefather.tech/blog/python-class-definition/ If you are getting started with Python, here is your FREE Python Starter Checklist: https://codefather.tech/the-python-starter-checklist Keep growing! Claudio