Python OOP Tutorial 1: Classes and Instances

Share this & earn $10
Corey Schafer
Published at : 12 Oct 2021
2907903 views
79423
462

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

7 Things You Should Wear To The Gym To Look Athletic & Attractive

7 Things You Should Wear To The Gym To Look Athletic & Attractive

Luke Combs - All Over Again (Audio)

Luke Combs - All Over Again (Audio)

Andy Grammer - "Don't Give Up On Me" [Official Video from the Five Feet Apart Film]

Andy Grammer - "Don't Give Up On Me" [Official Video from the Five Feet Apart Film]

Kristen Stewart on tackling the "scary and ambitious" role of Princess Diana

Kristen Stewart on tackling the "scary and ambitious" role of Princess Diana

Introduction and Additional Information

Introduction and Additional Information

Route 94 - My Love (Official Video) ft. Jess Glynne

Route 94 - My Love (Official Video) ft. Jess Glynne

What Does It Mean When He's Not Making Huge Effort But He's Still Trying? Does He Like Me?

What Does It Mean When He's Not Making Huge Effort But He's Still Trying? Does He Like Me?

Instructions for the Grade 2 Math Violympic exam, round 4.5

Instructions for the Grade 2 Math Violympic exam, round 4.5

I Order You - EP11 | Kitchen Hug [Eng Sub]

I Order You - EP11 | Kitchen Hug [Eng Sub]

I'd Rather (Radio Version)

I'd Rather (Radio Version)

Out of Practice Ep01 "Pilot" (Part 2/5)

Out of Practice Ep01 "Pilot" (Part 2/5)

Sustainability Q&A with Kara Hurst, Head of Worldwide Sustainability, Amazon

Sustainability Q&A with Kara Hurst, Head of Worldwide Sustainability, Amazon

How to Write a Financial Plan for Your Business Plan in 2021

How to Write a Financial Plan for Your Business Plan in 2021

Imran Khan - Satisfya (Official Music Video)

Imran Khan - Satisfya (Official Music Video)

$uicideBoy$ – ...And To Those I Love, Thanks For Sticking Around (Lyric Video)

$uicideBoy$ – ...And To Those I Love, Thanks For Sticking Around (Lyric Video)

What Do You Usually Have for Breakfast? - Adverbs and Expressions of Frequency

What Do You Usually Have for Breakfast? - Adverbs and Expressions of Frequency

Fishing Life - I will be keeping That One

Fishing Life - I will be keeping That One

Premature baby - Nutrition and feeding

Premature baby - Nutrition and feeding

What's Considered Attractive in Japan?

What's Considered Attractive in Japan?

Criminal Law - Elements of an Offence

Criminal Law - Elements of an Offence

100+ Ways To Avoid Using The Word VERY | English Vocabulary

100+ Ways To Avoid Using The Word VERY | English Vocabulary

How Much Car Insurance Do You Need | 4 EASY STEPS

How Much Car Insurance Do You Need | 4 EASY STEPS

Treatment and Management of Type 2 Diabetes

Treatment and Management of Type 2 Diabetes

Finding High School Geometry Help At A Reasonable Cost

Finding High School Geometry Help At A Reasonable Cost

UNIC RESIDENCES (EL)

UNIC RESIDENCES (EL)

Assistant Pretend Play Treasure Hunt on Tom Sawyer Island at the Magic Kingdom

Assistant Pretend Play Treasure Hunt on Tom Sawyer Island at the Magic Kingdom

The Haunting of Bly Manor Part One 'The Great Good Place' First Time Watching! TV Reaction!!

The Haunting of Bly Manor Part One 'The Great Good Place' First Time Watching! TV Reaction!!

A Simple Spell for A Specific Amount of Money - Quick Magic with Ariel

A Simple Spell for A Specific Amount of Money - Quick Magic with Ariel

Aurelia is generally known as

Aurelia is generally known as

Copied Versions of Popular Roblox Games 10

Copied Versions of Popular Roblox Games 10

Chiller Basics - How they work

Chiller Basics - How they work

Big Time Rush - Worldwide (Video)

Big Time Rush - Worldwide (Video)

Galaxy S21 Durability Drop Test! FINALLY More Durable?

Galaxy S21 Durability Drop Test! FINALLY More Durable?

What is Narrative Writing? | Structure of Narrative Writing

What is Narrative Writing? | Structure of Narrative Writing

❄️ Track Socket 60CM Aluminum Alloy Track Wall Socket 3 Colors 8000W With switch Review

❄️ Track Socket 60CM Aluminum Alloy Track Wall Socket 3 Colors 8000W With switch Review

Best Travel Tech/Accessories - 2021

Best Travel Tech/Accessories - 2021

78 MIN AROUND THE WORLD - Act 2 (Ethnic Deep House dj set)

78 MIN AROUND THE WORLD - Act 2 (Ethnic Deep House dj set)

Taylor Swift - …Ready For It?

Taylor Swift - …Ready For It?

8 BODY LANGUAGE TECHNIQUES FOR INTERVIEWS! (Job Interview Technique Masterclass!)

8 BODY LANGUAGE TECHNIQUES FOR INTERVIEWS! (Job Interview Technique Masterclass!)

Lady Antebellum - Need You Now

Lady Antebellum - Need You Now

English Tutor Nick P Adverb Phrase (18) By No Means

English Tutor Nick P Adverb Phrase (18) By No Means

The Cure - Primary

The Cure - Primary

I made a PENDANT Light with DIY Linkable LED

I made a PENDANT Light with DIY Linkable LED

Figma tutorial: Interactive components

Figma tutorial: Interactive components

Son Lux — "Easy" (Official Audio)

Son Lux — "Easy" (Official Audio)

The Pros and Cons of Personal Loans

The Pros and Cons of Personal Loans

PRETTYMUCH - I Don't Wanna Leave (feat. Jeremih) [Official Music Video]

PRETTYMUCH - I Don't Wanna Leave (feat. Jeremih) [Official Music Video]

Bear in mind - W52D3 - Daily Phrasal Verbs - Learn English online free video lessons

Bear in mind - W52D3 - Daily Phrasal Verbs - Learn English online free video lessons

2Pac: They Don't Give A F**k 'bout Us

2Pac: They Don't Give A F**k 'bout Us