Published
- 1 min read
how to read from a file into a list in python
The solution for this is noted below
how to read from a file into a list in python
Solution
f = open(filename, "r")
listItems = f.read().splitlines()
Try other methods by searching on the site. That is if this doesn’t work