13,420
edits
Changes
→PART 2 - Writing To Files
== PART 2 - Writing To Files ==
:x
:'''Perform the Following Steps:'''
<blockquote style="margin-left:35px;">{{Admon/caution|style="padding-left:25px"|Risk of Losing File Contents|A common problem that new Python programmers may encounter is accidentally erasing the existing contents of a file when writing data to a file. When opening files for writing, Python assumes content in the file is no longer wanted and it's immediately deleted; therefore, if in doubt, append new data to the file instead!}}</blockquote>