Trying to make an app with independent data from one file. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Trying to make an app with independent data from one file.

Trying to make an app which gets data from a file and then use the data independently, help.

8th Mar 2020, 1:46 PM
Samuel Mubukwanu
Samuel Mubukwanu - avatar
1 Answer
+ 4
It depends where your file is. if it is local : reader = open(pathOfYourFile) listOfLines = reader. readlines() if it is in the web: pip3 install requests import requests req = requests.get(url) content = req. text
8th Mar 2020, 4:06 PM
Oma Falk
Oma Falk - avatar