Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 23, 2022 01: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 parzibyte/fa3173daf6b56ad48a90e91b6c1c640b to your computer and use it in GitHub Desktop.
Save parzibyte/fa3173daf6b56ad48a90e91b6c1c640b to your computer and use it in GitHub Desktop.
def obtener_agenda():
contactos = {}
while True:
nombre = input(
"Ingrese un nombre o déjelo vacío para terminar de agregar: ")
if nombre == "":
break
if nombre in contactos:
print("Nombre ya existente")
else:
telefono = input(f"Ingrese el teléfono de {nombre}: ")
contactos[nombre] = telefono
return contactos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment