Python OOP Tutorial 1: Classes and Instances

Share this & earn $10
Corey Schafer
Published at : 23 Sep 2021
2874376 views
78535
456

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 - https://youtu.be/ZDa-Z5JzLYM
Python OOP 2 - Class Variables - https://youtu.be/BJ-VvGyQxho
Python OOP 3 - Classmethods and Staticmethods - https://youtu.be/rq8cL2XMM5M
Python OOP 4 - Inheritance - https://youtu.be/RSl87lqOXDE
Python OOP 5 - Special (Magic/Dunder) Methods - https://youtu.be/3ohzBxoFHAY
Python OOP 6 - Property Decorators - https://youtu.be/jCzT9XFZ5bw

The code from this video can be found at:
https://github.com/CoreyMSchafer/code_snippets/tree/master/Object-Oriented


✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

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

✅ Corey’s Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter - https://twitter.com/CoreyMSchafer
Instagram - https://www.instagram.com/coreymschafer/

#Python

PythonClassesObject Oriented

From the Dark Aether: The Story Thus Far

From the Dark Aether: The Story Thus Far

When to incorporate a business in the US: cost and expenses for startups

When to incorporate a business in the US: cost and expenses for startups

Amy Winehouse - You Know I'm No Good

Amy Winehouse - You Know I'm No Good

鬥破蒼穹 01 | Battle Through the Heaven 01【DVD版】(吳磊、林允、李沁、陳楚河等主演)

鬥破蒼穹 01 | Battle Through the Heaven 01【DVD版】(吳磊、林允、李沁、陳楚河等主演)

Kings Of Convenience - Know How ft. Feist (live at Le Bataclan)

Kings Of Convenience - Know How ft. Feist (live at Le Bataclan)

Abraham on FIRE, Sharp Shooting 🎯 & Grealish bags Training Game WINNER! | Inside Training | England

Abraham on FIRE, Sharp Shooting 🎯 & Grealish bags Training Game WINNER! | Inside Training | England

Chris Brown - Privacy (Audio)

Chris Brown - Privacy (Audio)

No Internet Access or Identifying Problem but Internet Connected [Solved]

No Internet Access or Identifying Problem but Internet Connected [Solved]

I Customized A Hospital & Paid Everyone’s Medical Bills

I Customized A Hospital & Paid Everyone’s Medical Bills

Everybody Knows - Sigrid Clip HD (Justice League)

Everybody Knows - Sigrid Clip HD (Justice League)

LUMP - Curse of the Contemporary (Official Video)

LUMP - Curse of the Contemporary (Official Video)

loaf around

loaf around

All or Whole - Basic English Grammar

All or Whole - Basic English Grammar

How to Beat the Competition Without Lowering Your Prices

How to Beat the Competition Without Lowering Your Prices

HostAge At A BeAch House PArty

HostAge At A BeAch House PArty

Lil Skies - Nowadays ft. Landon Cube (Directed by Cole Bennett)

Lil Skies - Nowadays ft. Landon Cube (Directed by Cole Bennett)

New items Claire's 2021 !  Elsa & Anna toddlers are shopping - Barbie

New items Claire's 2021 ! Elsa & Anna toddlers are shopping - Barbie

The JavaScript includes method EXPLAINED in 5 minutes!

The JavaScript includes method EXPLAINED in 5 minutes!

Remedy

Remedy

G-Eazy - I Might (Audio)

G-Eazy - I Might (Audio)

Finger Family | CoComelon Nursery Rhymes & Kids Songs

Finger Family | CoComelon Nursery Rhymes & Kids Songs

Central Cee - Little Bit of This [Music Video]

Central Cee - Little Bit of This [Music Video]

FACETS TO FACETS 41 - Massimo LEONE -  Le visage transmédiatique

FACETS TO FACETS 41 - Massimo LEONE - Le visage transmédiatique

Fase Yoda - Messed Up (Official Video)

Fase Yoda - Messed Up (Official Video)

Gürcan Erdem - Produced by Turkey  _ vol. I

Gürcan Erdem - Produced by Turkey _ vol. I

Daniele Germani - A Congregation of Folks - Video Teaser

Daniele Germani - A Congregation of Folks - Video Teaser

Anti - Anxiety Cleanse l Peaceful Positive Energy Meditation Music l Relax Mind Body l Healing Music

Anti - Anxiety Cleanse l Peaceful Positive Energy Meditation Music l Relax Mind Body l Healing Music

Smarter Solutions for a Smarter Future | Anthem film

Smarter Solutions for a Smarter Future | Anthem film

6 Supplements That Might Actually Help You

6 Supplements That Might Actually Help You

Do you blame yourself? // DREAM SMP ANIMATIC

Do you blame yourself? // DREAM SMP ANIMATIC

MK7 Golf R with EQT Vortex Turbo and lots of upgrades on the dyno

MK7 Golf R with EQT Vortex Turbo and lots of upgrades on the dyno

This is a 'hotter labor market' than jobs data suggests: Economist

This is a 'hotter labor market' than jobs data suggests: Economist

An Alternative to Dark Matter?

An Alternative to Dark Matter?

Noah Kahan - Anyway (Official Audio)

Noah Kahan - Anyway (Official Audio)

Amusing Science Experiments For The Whole Family

Amusing Science Experiments For The Whole Family

Learn English Conversation   Unit 10 A Pair of Shoes

Learn English Conversation Unit 10 A Pair of Shoes

233) A Technique to Pick Yourself Up When Life Knocks You Down

233) A Technique to Pick Yourself Up When Life Knocks You Down

Spandau Ballet - True (HD Remastered)

Spandau Ballet - True (HD Remastered)

Properly | Swappi | 2020 Soca

Properly | Swappi | 2020 Soca

The Patience of God  | Timeless Truths – Dr. Charles Stanley

The Patience of God | Timeless Truths – Dr. Charles Stanley

Nightmares on Wax - You Wish

Nightmares on Wax - You Wish

Armor is undamaged

Armor is undamaged

Journalism nowadays just requires 'an internet connection and something to say'

Journalism nowadays just requires 'an internet connection and something to say'

Lane 8 - Clarify feat. Fractures (Tinlicker Remix)

Lane 8 - Clarify feat. Fractures (Tinlicker Remix)

Most Modern - We Fade Away (Official Music Video)

Most Modern - We Fade Away (Official Music Video)

English Vocabulary - 100 HOUSEHOLD ITEMS

English Vocabulary - 100 HOUSEHOLD ITEMS

The Screaming Sessions S3E1 feat. Michalis Vrettas

The Screaming Sessions S3E1 feat. Michalis Vrettas

Dreadbox Abyss - Twiddling With and Exploring the Sounds

Dreadbox Abyss - Twiddling With and Exploring the Sounds

Hasanabi Cancelled Over LA House

Hasanabi Cancelled Over LA House