#When using Windows you want to keep in mind that if you name the file data.txt #the file will actually be data.txt.txt, however Windows will show it as data.txt #because windows hides the file extensions by default. #This option can be changed by following the steps in the first comment.
Here is what the above code is Doing:
1. We open the file in write mode.
2. We write the string “Hello World” to the file.
3. We close the file.