Last active
November 19, 2021 13:43
-
-
Save salluzziluca/75591ae37b8b89d2a2a226472d4d2ea7 to your computer and use it in GitHub Desktop.
Abrir un archivo, de este no existir, crearlo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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