Uploaded February 2020 | Updated November 2026, 3 hours ago
Follow me instagram.com/keithgalli for more tech content!
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
Download Kite: kite.com
In this video we overview the main things I think are pointing when you are starting to learn about classes & integrate them in your everyday code. In this video we cover:
- why should we use object oriented programming (oop) ?
- the basics of defining a class in python (__init__)
- class methods
- what the heck is "self"?
- Inheritance & Subclassing
- Operator overriding
A timeline is in the comments.
If there are topics you felt like I left out, let me know in the comments! I'll potentially make a follow up video to this one.
For an example of me structuring my code with classes, check out this machine learning video:youtu.be/M9Itm95JzL0
If you want to practice using classes, try rewriting the game we build in this video to use them:youtu.be/-8n91btt5d8
^(I'll update the github repo for that video with my solution to this soon)
Resources:
Github code: github.com/KeithGalli/python-classes-tutorial
Operator overloading: geeksforgeeks.org/operator-overloading-in-python
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------
Today’s merch!
Creator: @ChilledCow
Website: teespring.com/stores/chilledcow-shop
---------------------
Video timeline!
0:00 - Introduction
1:34 - Why use classes?
2:27 - Defining our first class in Python
6:05 - Class methods
13:53 - Passing in default keyword arguments (size of our polygons)
20:18 - Inheritance & subclassing (using the super() method)
24:43 - Class method overriding
26:06 - Plotting points with classes
28:09 - Operator overloading
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Follow me instagram.com/keithgalli for more tech content!
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
Download Kite: kite.com
In this video we overview the main things I think are pointing when you are starting to learn about classes & integrate them in your everyday code. In this video we cover:
- why should we use object oriented programming (oop) ?
- the basics of defining a class in python (__init__)
- class methods
- what the heck is "self"?
- Inheritance & Subclassing
- Operator overriding
A timeline is in the comments.
If there are topics you felt like I left out, let me know in the comments! I'll potentially make a follow up video to this one.
For an example of me structuring my code with classes, check out this machine learning video:youtu.be/M9Itm95JzL0
If you want to practice using classes, try rewriting the game we build in this video to use them:youtu.be/-8n91btt5d8
^(I'll update the github repo for that video with my solution to this soon)
Resources:
Github code: github.com/KeithGalli/python-classes-tutorial
Operator overloading: geeksforgeeks.org/operator-overloading-in-python
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------
Today’s merch!
Creator: @ChilledCow
Website: teespring.com/stores/chilledcow-shop
---------------------
Video timeline!
0:00 - Introduction
1:34 - Why use classes?
2:27 - Defining our first class in Python
6:05 - Class methods
13:53 - Passing in default keyword arguments (size of our polygons)
20:18 - Inheritance & subclassing (using the super() method)
24:43 - Class method overriding
26:06 - Plotting points with classes
28:09 - Operator overloading
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs




![Complete Regular Expressions Tutorial! (with exercises for practice)
Practice your Python Pandas data science skills with problems on StrataScratch!
https://stratascratch.com/?via=keith
In this video we go through all the fundamentals of using regular expressions (regexes) to match patterns in programming.
In this video we cover the following:
- Character Sets [a-zA-Z0-9]
- Quantifiers *, +, ?, {3,5}
- Metacharacters ^ . | $
- Character Classes b s w d
- Groups
- Lookahead & Lookbehind assertions
- and more!
There is a detailed timeline down below.
In a future video we will apply what we learn in this one to the Python programming language (re library) subscribe to not miss that!
Resources!
Source code & txt files: https://github.com/keithgalli/regular-expressions
Practice exercise video: https://youtu.be/Qv_RYpREz5k
Cheat sheet: https://cheatography.com/davechild/cheat-sheets/regular-expressions/
Regex golf: https://alf.nu/RegexGolf
Javascript Info: https://javascript.info/regexp-lookahead-lookbehind
Follow me on social media!
Instagram | https://www.instagram.com/keithgalli/
Twitter | https://twitter.com/keithgalli
TikTok | https://tiktok.com/@keithgalli
If you are curious to learn how I make my tutorials, check out this video: https://youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
https://stratascratch.com/?via=keith
Learn data skills with hands-on exercises & tutorials at Datacamp!
https://datacamp.pxf.io/c/3588040/1012793/13294
Join the Python Army to get access to perks!
YouTube - https://www.youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - https://www.patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Video timeline!
0:00 - Video overview & topics covered
1:43 - Basic regex syntax (building up an intuition)
4:23 - Character Sets Overview ([A-Za-z0-9])
5:57 - Quantifiers Guide (*, +, ?, {3,5})
9:30 - Guided Exercise: Find all words that dont use vowels
11:08 - Helpful cheat sheet to remember regex syntax in the real-world
12:47 - Matching words/patterns of a specific length ({3,5})
14:58 - OR operator overview
17:14 - Guided Exercise: Match valid sentences (starts with capital letter, ends with period)
21:18 - Character classes overview (w, b, d, s)
23:13 - Escaping Characters
25:02 - Practice Exercise #1: Write a regular expression to match meme text format
30:39 - Practice Exercise #2: Write a regular expression to match a specific date format
39:03 - Groups overview
50:16 - Lookahead & Lookbehind Assertions
1:00:18 - Practice Exercise #3: Detect if same word pops up multiple times in a sentence
1:06:04 - Practice Exercise #4: Password matching with rules
1:16:16 - Some final recommendations! (additional practice, chatgpt, etc.) Complete Regular Expressions Tutorial! (with exercises for practice)](https://i.ytimg.com/vi/vsa9GGzMFXQ/mqdefault.jpg)


