Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created August 17, 2018 12:48
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 Fhernd/690430ac094d94903b9879463041ab98 to your computer and use it in GitHub Desktop.
Save Fhernd/690430ac094d94903b9879463041ab98 to your computer and use it in GitHub Desktop.
Parámetros predeterminados y opcionales en una función. OrtizOL.
from datetime import datetime
def enviar_email(destinatario, mensaje, remitente='john@outlook.com', titulo=datetime.now()):
print(destinatario, mensaje, remitente, titulo)
enviar_email('fernando@outlook.com', 'Mensaje de prueba')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment