I am having trouble with my code which is meant to create a file and write a list of words and a list of numbers into the file. The code does not create a file at all. Here it is:
sentence=input('please enter a sentence: ')
list_of_words=sentence.split()
words_with_numbers=enumerate(list_of_words, start=1)
filename = 'fileoflists.txt'
with open('fileoflists', 'w+') as file:
file.write(str(list_of_words) + '/n' + str(words_with_numbers) + '/n')
thanks