Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file writing mode #6

Open
alphamachineX opened this issue Feb 14, 2024 · 0 comments
Open

file writing mode #6

alphamachineX opened this issue Feb 14, 2024 · 0 comments

Comments

@alphamachineX
Copy link

'w' for writing JSON files. While this works, it's safer to use mode 'w' with open() because it overwrites the file if it already exists. Using mode 'x' (exclusive creation) or handling file existence separately can prevent accidental data loss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant