Python: Creating a New File

Post Reply
User avatar
Jason
Site Admin
Posts: 973
Joined: Sun Dec 21, 2025 8:56 pm
Contact:

Code: Select all

with open("school_averages.txt", "x") as school_averages_dot_txt

# Creates a new file, but an error raised if one already exists with same name.
 

POSTREACT(ions) SUMMARY

Post Reply