Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

read a txt file

AllanJohnson1
AllanJohnson1

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)

can you help me?

3 years ago

Voters

Comments

TopNew
1
AllAwesome497
AllAwesome497
with open("file.txt", "r") as file: file_content = file.read()``` Also what niorg said
3 years ago
1
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
Load more