What exactly is 'yield from' in Python? [Easy explanation]

preview_player
Показать описание
In today's video we're going to be learning how we can use 'yield from' in Python.

▶ Become job-ready with Python:

▶ Follow me on Instagram:
Рекомендации по теме
Комментарии
Автор

I watch your videos for entertainment because I’m bored of tarot pick-a-card ones. Thank you for making educational videos in short form ❤

huongly
Автор

Good job. Personally, I prefer real use cases combined with building projects. That’s how to solidify the knowledge. That’s exactly what am doing on my new channel.

ridwanray
Автор

pretty cool, and useful when chaining generator

attacksoil
Автор

So using “yield” seems to track the state of an Iterable? Is that understanding correct?

But when are the main cases we would need to use it?

Still not understanding.

JimRohn-uc
Автор

I have seen generators in a card game as a state machine, but I still don't grasp it.

Is there a way to restart the generator or skip items programmatically?

It just doesn't make sense to me. I rather continue to use a function which returns me a value I expect to get.

yksw
Автор

Still not sure at which case to avoid return and prefer yield. Maybe overheard or you can mention it in some short words?

VK-qhpr
Автор

Thx, very useful and save time. Better than reading a textbook, if you want to save your time, my opinion.😁😁😁

davidlu
Автор

Since you used wrapper, does this work as a decorator?

Fireman
Автор

I thought the yield from syntax was deprecated since adding coroutines

TheMathues
Автор

HELLO DADDY INDENTLY thanks for improving my knowledge on python on god

Pearoo
Автор

This is nowhere near an easy explanation... Only the ones who knows this will follow this... Not a good channel to learn python... Watch Corey Schafer instead

yitstrw
join shbcf.ru