Answers for "create a file in a specific directory"

0

create a file in a specific directory

# create a text file for writing
with open(r'E:\pynative\reports\profit.txt', 'w') as fp:
    fp.write('This is first line')
    pass
Posted by: Guest on August-21-2021

Code answers related to "create a file in a specific directory"

Python Answers by Framework

Browse Popular Code Answers by Language