fruits = ['bananas', 'apples', 'oranges', 'strawberry']
with open("fruits_text.txt", 'w') as totxt_file:
totxt_file.write(str(fruits)+'\n')
The "\n" in code above doesnt work, when I run it here is what I got
['bananas', 'apples', 'oranges', 'strawberry']
How can I export it without commas and quotes? like this
bananas
apples
oranges
strawberry