Generation

generate functionTue, 06 Dec 2022

how to create a text file in a certain location

def create_file(filename): with open(filename, "w") as file: file.write("") create_file("C:\\path\\to\\file.txt")

Questions about programming?Chat with your personal AI assistant