I'm opening a file that might be something like this...
It was the best of times,
it was the worst of times.
Let's say this file name is myFile1.txt
I want the file to split up into this
[['It','was','the','best','of','times',','],
['it','was', 'the','worst','of','times','.']]
It should be a list of strings...
This is my idea...
def Split():
inFile=open('myFile1.txt','r')
for line in inFile:
separate=list(line.split())
return(separate)
print(Split())
would something like this work?