paint-brush
11 consejos y trucos para escribir mejor código Pythonpor@pragativerma
2,112 lecturas
2,112 lecturas

11 consejos y trucos para escribir mejor código Python

por Pragati Verma8m2022/08/16
Read on Terminal Reader
Read this story w/o Javascript

Demasiado Largo; Para Leer

Python generalmente usa un bucle `for` para iterar sobre un objeto iterable. Pero hay una forma más fácil y pitónica de hacer esto usando `enumerate() en lugar de un bucle 'for'. La comprensión de listas en lugar de los bucles for sin procesar es una forma de crear listas basadas en las listas existentes. Se puede usar para ordenar los elementos en una lista o secuencia ordenada (tupla, conjunto, conjunto congelado) o colección (conjunto congelado) La sintaxis de una lista por comprensión se ve así: 'HackerNoon'

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - 11 consejos y trucos para escribir mejor código Python
Pragati Verma HackerNoon profile picture
Pragati Verma

Pragati Verma

@pragativerma

Software Development Editor @HackerNoon | ex - SDE @BrightMoney | Full Stack Web Developer

Aprender Mas
LEARN MORE ABOUT @PRAGATIVERMA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Pragati Verma HackerNoon profile picture
Pragati Verma@pragativerma
Software Development Editor @HackerNoon | ex - SDE @BrightMoney | Full Stack Web Developer

ETIQUETAS

Languages

ESTE ARTÍCULO FUE PRESENTADO EN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite