Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 20, 2018 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f1112c588fa1a28165ebccedea15c963 to your computer and use it in GitHub Desktop.
Save parzibyte/f1112c588fa1a28165ebccedea15c963 to your computer and use it in GitHub Desktop.
"""
Explicar **kwargs en Python con una
función
@author parzibyte
"""
def conectar(**opciones):
host = opciones["host"]
puerto = opciones["puerto"]
usuario = opciones["usuario"]
palabra_secreta = opciones["palabra_secreta"]
nombre_base_de_datos = opciones["nombre_base_de_datos"]
print(
"Host: {}, puerto: {}, usuario: {}, palabra_secreta: {}, nombre_base_de_datos: {}"
.format(host, puerto, usuario, palabra_secreta, nombre_base_de_datos))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment