I am reading data from a text file and when I print the content I need to split each word to its own variable.
So far I have:
f = open(file='Input.txt', mode='r')
content = f.read()
split = content.split()
print(split)
f.close()
Output:
['verb', 'verb', 'adj', 'noun', 'name', 'verb', 'adj', 'adj', 'noun', 'name', 'number', 'noun', 'adj',
'verb']
How would I split this string so that every word is assigned to it's own variable?
ex:
1 = 'verb'
2 = 'verb'
3 = 'adj'
...