open function python create file specific parth code example
Example 1: create file in a specific directory python
f = open(r"C:\Test.py", "a")
Example 2: open file in python directory
path = 'C:\\Users\\Username\\Path\\To\\File'
file=open(path, "r")