# Listing_22-5.py
# Copyright Warren & <NAME>, 2013
# Released under MIT license   http://www.opensource.org/licenses/mit-license.php
# Version $version  ----------------------------

# Using write mode on an existing file

the_file = open('notes.txt', 'w')
the_file.write("Wake up\n")
the_file.write("Watch cartoons")
the_file.close()

# Listing_22-5.py
# Copyright Warren & <NAME>, 2013
# Released under MIT license   http://www.opensource.org/licenses/mit-license.php
# Version $version  ----------------------------

# Using write mode on an existing file

the_file = open('notes.txt', 'w')
the_file.write("Wake up\n")
the_file.write("Watch cartoons")
the_file.close()

# Listing_22-5.py # Copyright Warren & <NAME>, 2013 # Released under MIT license   http://www.opensource.org/licenses/mit-license.php # Version $version  ---------------------------- # Using write mode on an existing file