Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 5

No change in size, 06:56, 5 September 2017
PART 2 - Writing To Files
== PART 2 - Writing To Files ==
 
:x
:'''Perform the Following Steps:'''
 
:x
<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>
13,420
edits