Python OOP Tutorial 1: Classes and Instances

///Python OOP Tutorial 1: Classes and Instances

Python OOP Tutorial 1: Classes and Instances

FavoriteLoadingAdd to favorites

In this Python Object-Oriented Tutorial, we will begin our series by learning how to create and use classes within Python. Classes allow us to logically group our data and functions in a way that is easy to reuse and also easy to build upon if need be. Let’s get started.

Python OOP 1 – Classes and Instances –
Python OOP 2 – Class Variables –
Python OOP 3 – Classmethods and Staticmethods –
Python OOP 4 – Inheritance –
Python OOP 5 – Special (Magic/Dunder) Methods –
Python OOP 6 – Property Decorators –

The code from this video can be found at:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –

#Python

source

By |2019-04-14T16:52:29+00:00April 14th, 2019|Python Video Tutorials|35 Comments

35 Comments

  1. sinnner6 April 14, 2019 at 4:52 pm - Reply

    from the bottom of my heart, "thank you!"

  2. Paweł Pachuta April 14, 2019 at 4:52 pm - Reply

    What program is he using to write this code ?

  3. Brorsan Beppe April 14, 2019 at 4:52 pm - Reply

    6:00 why cant you just use the first variable throughout the whole class? im thinking something wrong here, right?

  4. Pradeep Chauhan April 14, 2019 at 4:52 pm - Reply

    Thanks a lot Corey! that was much more clearer to me than the 30-40 websites and vdos I have been browsing for past several months for classes in Python.

  5. Mustafa alany April 14, 2019 at 4:52 pm - Reply

    Great Video!

  6. Riptide April 14, 2019 at 4:52 pm - Reply

    Learned more in this video than I did at codecademy. Thanks, man.

  7. Raymond Mataka April 14, 2019 at 4:52 pm - Reply

    The only reason I watched this, was to learn hot to instantiate classes. Greate video tho

  8. realjsk April 14, 2019 at 4:52 pm - Reply

    Fantastic tutorials. Thank you!

  9. Learn Coding April 14, 2019 at 4:52 pm - Reply

    sir you are teaching well I also have uploaded python course (playlist) in urdu | Hindi for those who don't understand english

  10. KingParanha April 14, 2019 at 4:52 pm - Reply

    does anyone know what ide(integrated development environment) he is using in this video?

  11. basetroll April 14, 2019 at 4:52 pm - Reply

    I think in future, online tutorials will be the main form of teaching at universities: You can learn whenever you want, you can stop to write something down or look something up, repeat it again several times, etc. etc. etc. The benefits are huge. Especially this 15' video about OOP Classes (What????!!) and the comments here are a strong indication to that.

  12. emilside April 14, 2019 at 4:52 pm - Reply

    I have an if statement which goes like this "if LoginUSER == RegUser1[0] and LoginPASS == RegPass1[0]:" but I dont want to do "RegPass1[1]" "RegPass1[2]"…

  13. Raunak Singh April 14, 2019 at 4:52 pm - Reply

    I can't thank you enough.
    I was very confused with what was the use of constructor and your explaination just clicked into my mind.

  14. basetroll April 14, 2019 at 4:52 pm - Reply

    I tried for so long to understand classes and what is behind it: 15 minutes of your explanation and it made Click! Thx Corey Schafer!

  15. Farshad Davoodifard April 14, 2019 at 4:52 pm - Reply

    question: how is it possible to create instances and assign them values, before we define attributes/fields inside the class… thanks 🙂

  16. Marlee Denny April 14, 2019 at 4:52 pm - Reply

    Corey Schafer your hella epic

  17. abodh_LTD April 14, 2019 at 4:52 pm - Reply

    177 people did not take any CLASS in python.

  18. Katta katta April 14, 2019 at 4:52 pm - Reply

    Great explanation!

  19. Saran Ravali April 14, 2019 at 4:52 pm - Reply

    Hi, what is the editor you are using ? and how are you running the compilation directly and showing output in the bottom?

  20. Andy N April 14, 2019 at 4:52 pm - Reply

    Would it have made any difference if you put fullname inside the _init_ method as self.fullname = first + last, instead of creating a separate method for it? I guess you defined email and fullname in different ways, just to show alternatives of solving the same problem, right?

  21. Alex Pho April 14, 2019 at 4:52 pm - Reply

    Wow without going into esoteric terms like some answers on SO… you actually gave a good working example of why self is necessary in the method argument and explained the back-end workings. This is great!

  22. DEEPANSHU GURJAR April 14, 2019 at 4:52 pm - Reply

    what software does he uses for programming?

  23. Suyog Shimpi April 14, 2019 at 4:52 pm - Reply

    Hello Corey, Can you create a video for garbage collection?

  24. Zero11 April 14, 2019 at 4:52 pm - Reply

    I think your the only person who actually explained to me what self is

  25. Sahejpreet wahla April 14, 2019 at 4:52 pm - Reply

    Great work sir !! Simply too good

  26. mozgus .Z. April 14, 2019 at 4:52 pm - Reply

    amazing tutorial

  27. Brendon Plummer April 14, 2019 at 4:52 pm - Reply

    In my spare time i impersonate Tina Fey

  28. Nathan Calderon April 14, 2019 at 4:52 pm - Reply

    Thank you!

  29. Arun Thayaleveedu April 14, 2019 at 4:52 pm - Reply

    great tutorial thank you so much

  30. dy dx April 14, 2019 at 4:52 pm - Reply

    poop => python object oriented programming

  31. Andrew April 14, 2019 at 4:52 pm - Reply

    thank you, you teach me more than OOP but "adding subtitles"…

  32. Thiago Siqueira April 14, 2019 at 4:52 pm - Reply

    Thanks much for walk us through on how the OOP works. You are the best! Now I am wondering how you would map these classes within a database. Would you recommend an ORM? Any advise is more than welcome. Thank you

  33. Victor Augusto April 14, 2019 at 4:52 pm - Reply

    I just fnd my new oop Python teacher, nice work,
    eh nois, mano!!

  34. George Smith April 14, 2019 at 4:52 pm - Reply

    for me languages like python and javascript that you can add attributes on demand after you instantiate an object are not true OO languages.

  35. Batrax April 14, 2019 at 4:52 pm - Reply

    Bloody hell you're good at explaining this stuff…

Leave A Comment

*