Hello,
I am writing a small program in python which is a list of my favourite anime. Now, I would like to save the list to file.
This is my code:
This creates a list from the input value. I would now like to save the list to a file, after all the ten entries were added. I have tried with pickle, but it didn’t do what I wanted. How can I save my list to a file? Thank you.Code:myanime=[] for _ in range(10): myanime.append(input("Enter a new entry :")) print('My Favourite anime: \n' , *myanime, sep='\n - ')
Bookmarks