Posts by Akros • 65 points
2 posts
-
2
votes2
answers29234
viewsQ: Create . txt file in PYTHON if it does not exist
The code: arquivo = open(input('Nome do arquivo a ser editado:'), 'r') texto = arquivo.readlines() texto.append(input('Insira o texto:')) arquivo = open(input('Nome do arquivo a ser editado:'), 'w')…
-
4
votes1
answer1502
viewsQ: Check if there is a file if there is a report of PYTHON Blibioteca > . os
Check if the folder no longer exists, if it exists, you should print a message to the user indicating. I got stuck not knowing how to check on something related to this : os.listdir() os.mkdir…