Skip to content

Instantly share code, notes, and snippets.

@salluzziluca
Last active November 19, 2021 13:43
Show Gist options
  • Save salluzziluca/75591ae37b8b89d2a2a226472d4d2ea7 to your computer and use it in GitHub Desktop.
Save salluzziluca/75591ae37b8b89d2a2a226472d4d2ea7 to your computer and use it in GitHub Desktop.
Abrir un archivo, de este no existir, crearlo
try:
archivo = open(RUTA)
except FileNotFoundError:
archivo = open(RUTA, “w”)
archivo.close()
archivo = open(RUTA)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment