Python - Functions with Optional Arguments

Publicado el: 10 junio 2021
en el canal de: codevev
502
11

#Python #Shorts

It is somewhat common to have functions that have arguments that are optional. To create such a function, your arguments need default values. To achieve that, just set the default value right in the function definition. Be careful though, optional arguments MUST appear after all other arguments. And lastly, don't ever use mutable types, such as lists, as default arguments. Use None instead.
-------------------------------------------------------------------------------------
Links:
Blog: https://evgenyurubkov.com
Twitter:   / evgenyurubkov  
Instagram:   / evgenyurubkov  
Youtube:    / @codevev  


En esta página del sitio puede ver el video en línea Python - Functions with Optional Arguments de Duración hora minuto segunda en buena calidad , que subió el usuario codevev 10 junio 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 502 veces y le gustó 11 a los espectadores. Disfruta viendo!