How to create a generator function in Python

Publicado em: 15 Maio 2023
no canal de: Python Morsels
792
19

Have a function that returns a list? You may be able to turn it into a generator function by replacing the `append` calls with `yield` statements.

Read an article version of this video at https://pym.dev/how-to-create-a-gener...

Find more Python screencasts at https://pym.dev/screencasts/

00:00 A function that returns a list
00:43 Turning a regular function into a generator function
01:26 Using generator objects
01:53 Use "yield" statements to create generator functions


Nesta página do site você pode assistir ao vídeo on-line How to create a generator function in Python duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Python Morsels 15 Maio 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 792 vezes e gostou 19 espectadores. Boa visualização!