The yield keyword in Python

What does the Yield keyword do in Python? This video covers the basics so you can understand what yield is, what is a generator, and why is it different than any other iterable in Python A yield keyword makes a function a lazy iterable. Producing values one at a time. The function becomes a generato...

Descripción completa

Detalles Bibliográficos
Autor Corporativo: Pragmatic AI Solutions (Firm), publisher (publisher)
Otros Autores: Deza, Alfredo, presenter (presenter)
Formato: Video
Idioma:Inglés
Publicado: [Place of publication not identified] : Pragmatic AI Solutions [2022]
Edición:[First edition]
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009822998106719
Descripción
Sumario:What does the Yield keyword do in Python? This video covers the basics so you can understand what yield is, what is a generator, and why is it different than any other iterable in Python A yield keyword makes a function a lazy iterable. Producing values one at a time. The function becomes a generator, so when called, the code will not execute. A generator is a function that uses the yield keyword. This function is an iterable that produces values one at a time, or does a lazy production of values. I'll use a Jupyter Notebook that you can use to follow along with practical examples that will show you what are some of the key differences and when or why you would use the yield keyword. In this video you will learn: What is an iterable and how is it different from using yield? What does yield do to a function? What is a Python generator Potential uses for a Python generator like infinite results Useful Resources GitHub repository with examples Build Python applications from scratch Try Azure for Free Introduction to Azure Databricks.
Descripción Física:1 online resource (1 video file (6 min.)) : sound, color