Is there a function in python that allows us to save a list in a txt file and keep its format?
If I have the list:
values = ['1','2','3']
can I save it to a file that contains:
'['1','2','3']'
So far I print parts of the list in the terminal and copy those in to a txt file.