Answers for "create a file in folder python"

2

creating a new folder in python

newpath = r'C:\Program Files\arbitrary' 
if not os.path.exists(newpath):
    os.makedirs(newpath)
Posted by: Guest on February-15-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 "create a file in folder python"

Python Answers by Framework

Browse Popular Code Answers by Language