Python Generators Explained

preview_player
Показать описание
Welcome back to another YouTube video! In this video, I will be talking about generators in Python. Generators are similar to iterators but a more advanced concept in the Python language. However, they are not too complicated and anyone should be able to follow along.

⭐️ Timestamps ⭐️
00:00 | Overview
01:43 | Generators vs Iterators
02:40 | Iterators Explained
08:33 | next()
13:58 | iter()
15:24 | Creating Legacy Iterators
19:22 | Creating Generators
23:15 | Generators Use Case
26:58 | Generator Comprehensions

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰

🔗 Social Medias 🔗

🎬 My YouTube Gear 🎬

💸 Donations 💸
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
- Tech With Tim
- Generators
- Generators Explained
- Iterators
- Python
- HiCounselor

⭐️ Hashtags ⭐️
#TechWithTim #Generators1
Рекомендации по теме
Комментарии
Автор

I started programming 60 years ago. Thank you Tim for teaching an old dog new tricks.

goboy
Автор

I very rarely leave comments on tutorials, but this was so incredibly well and robustly explained that I seriously need to leave my comment of appreciation, it was so clear to understand!

williamselinder
Автор

Thanks Tim. You have become the go-to guy when I learn stuff and get stuck. your explanations are very practical. as a new programmer who's attempting to beef up my resume, I have been teaching myself python. you have been a great resource, keep it up. THANK YOU!

gustavocinci
Автор

i watched this video just to learn something new about python, turns out the generator is really applicable in my code and has helped memory usage heaps. Thanks!

vinni
Автор

Great video and explanation! Was going to look for “how to process large amounts of data”, but clicked on this instead. Turned out to be the core of the answer👍

tyrelllaszlo
Автор

It is nice and refreshing to see a presentation of the back-end logic to the magic functions we have in Python. As much as I love the built-in functions - I really love knowing how they do what they do.

Factory
Автор

This channel is just so incredible! i can't tell how much i learned from this channel, thank you

roarba
Автор

Wow! This was so refreshing and highly insightful. Thanks so much Tim for this really helpful video on generators. It helped me a lot understand this better!

TheRealKitWalker
Автор

Good thing about this video is that it walks you through other concepts too such as class and dunder methods which is kind of a good refresher to what I have studied earlier. You've earned a subscriber Tim!

NabeelButt
Автор

Thanks you. This was really interesting. It's crazy how the most someone knows about how something works, then for intuition you can understand other stuff or libraries created from others. One of the usefully methods I use as a fast document of a library is "dir"

LNMLucasMasiero
Автор

Really appreciate your videos. Thank's for sharing your knowledge. I'm just at the start with Python deep-diving, but already it keeps getting me staying awake at night. So many possibilities :D Keep on the good work <3

STFU
Автор

good stuff Tim, there's never enough of knowledge about python

michapodlaszuk
Автор

I appreciate the video, Tim! I have a much better understanding of Python generators now.

ChromaDotNova
Автор

Great video! Best explanation I’ve seen so far on this topic!

fredericoamigo
Автор

could have added example of "yield from" as well.
A great coding exercise would be, print inorder traversal of binary tree using generators.

harshraj_
Автор

This was an awesome video Tim. I'm learning about Deep Learning and generators have been particularly useful for chunking up huge datasets for feature extraction as it would be impossible to read them all into memory on my laptop. Now I understand how and why this works as a Python newbie. The explanation on Iterators was great too. I love the nuts-and-bolts detail on what’s going on under the hood. Many thanks.

CaratacusAD
Автор

This video provides a clear image of how it works. Thank you.

MissingTricks
Автор

Tons thanks, only video which clearly said what is iterator and generator - CRYSTAL CLEAR.

parvishrao
Автор

Hi Tim, you keep providing us useful contents: I'm glad for everything you've been doing!
I'm truly interested in CS, and curious about how much of these information you have learned at university or on your own. Could you please answer me?

enzovalendino
Автор

Amazing explanation! Learn a lot from it. Thank you soo much!!

ddbarenco