Answers for "python create a file in the current directory"

2

how to make file to curent dir python

import os 
dir_path = os.path.dirname(os.path.realpath(__file__))
Posted by: Guest on November-04-2020
0

create file in a specific directory python

f = open(r"C:Test.py", "a")
Posted by: Guest on January-20-2021

Code answers related to "python create a file in the current directory"

Python Answers by Framework

Browse Popular Code Answers by Language