Hey my code below isn't working and I'm not too sure what to do to fix it. The error that keeps coming up is "Oops, try again. Did you create a variable called my_file?"
I've read other solutions posted and I have the same thing but mine isn't working.
I initally had the same code without the last two lines (print and close statements).
Does anyone know what I need to do? Any help is appreciated!
with open("text.txt", "w") in my_file: my_file.write("Did it work?") print my_file my_file.close()