Skip to content
Sign UpLog In
Profile icon

Allan Johnson

@AllanJohnson1
Repls
Community
AllanJohnson1
AllanJohnson1
shared a Post
3 years ago
read a txt file
Hello, i'm trying to read a txt file on your site using a phyton language, but i cant do it adding the txt on files (im using a google chrome notebook
Leitura de palavras
Python
AllAwesome497
AllAwesome497
with open("file.txt", "r") as file: file_content = file.read()Also what niorg said3 years ago
SixBeeps
SixBeeps
You have to upload the TXT file to repl.it by dragging the file from your computer to underneath the "main.py" on the left of the editor. Você precisa fazer o upload do arquivo TXT para repl.it arrastando o arquivo do seu computador para baixo do "main.py" à esquerda do editor. (Google Translate)3 years ago