How do I make it so that "file.write(repr(fieldNames1))" writes what I input into "fieldNames1"?
import easygui
#Multi Enter Box
fieldNames1= ['Situation:(Example: Waiting for a friend who is late.)','Thoughts:(EXAMPLE: My friend Bob is always late!)','Emotions:(EXAMPLE: Mad & Stressed)','Behavior:(EXAMPLE: Arguing with family)']
#Write to file
file = open('Fieldnames test.txt', 'a')
file.write(repr(fieldNames1))
file.close()
Makes a file called "Fieldnames test.txt" with the following text regardless of what I input into "fieldnNames1".
['Situation:(Example: Waiting for a friend who is late.)', 'Thoughts:(EXAMPLE: My friend Bob is always late!)', 'Emotions:(EXAMPLE: Mad & Stressed)', 'Behavior:(EXAMPLE: Arguing with family)']