I am a beginner, working on python code in Visual Studio. I have created a dir Test_Folder
with the following python file Test.py
:
new_file = open('README.txt','w')
new_file.close()
The resulting file README.txt
fro, Test.py
is being created outside the Test_Folder
:
my_dir
├── Test_Folder
│ ├── Test.py
├── README.txt
Why does this happen? And how can I create the text file inside the same directory?