Explore Westonci.ca, the top Q&A platform where your questions are answered by professionals and enthusiasts alike. Explore thousands of questions and answers from knowledgeable experts in various fields on our Q&A platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

Write a program that opens an output file with the filename my_name.txt, writes your name to the file, then closes the file. python

Sagot :

f = open("my_name.txt", "w")

f.write("Your name here")

f.close()

You just have to change Your name here to your actual name. I wrote my code in python 3.8. I hope this helps.