Skip to content

Instantly share code, notes, and snippets.

@j2deme
Created October 9, 2023 17:31
Show Gist options
  • Save j2deme/455d781c737704993adc1b47667323a1 to your computer and use it in GitHub Desktop.
Save j2deme/455d781c737704993adc1b47667323a1 to your computer and use it in GitHub Desktop.
Menú básico en Python
def main():
salir = False
while not salir:
print("1. Opción 1")
print("2. Opción 2")
print("3. Opción 3")
print("9. Salir")
opcion = int(input("Elige tu opción"))
if opcion < 9:
print (opcion)
elif opcion == 9:
salir = True
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment