I have a text document that contains a list of numbers and I want to convert it to a list. Right now I can only get the entire list in the 0th entry of the list, but I want
You might need to strip newlines.
# list of strings [number for number in open("file.txt")] # list of integers [int(number) for number in open("file.txt")]