Home
Random
Log in
Settings
About David's Wiki
Disclaimers
David's Wiki
Search
Python: Difference between revisions
Page
Discussion
← Older edit
Newer edit →
Python
(view source)
Revision as of 18:27, 2 July 2021
10 bytes added
,
2 July 2021
→JSON
Revision as of 22:37, 1 July 2021
(
view source
)
David
(
talk
|
contribs
)
(
→Exceptions
)
← Older edit
Revision as of 18:27, 2 July 2021
(
view source
)
David
(
talk
|
contribs
)
(
→JSON
)
Newer edit →
Line 514:
Line 514:
# Write to file
# Write to file
with open("my_data.json", "w") as f:
with open("my_data.json", "w") as f:
json.dump(my_data, f)
json.dump(my_data, f
, indent=2
)
# Read from file
# Read from file
David
Bureaucrats
,
Interface administrators
,
Administrators
5,337
edits