



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




file = open(filename, "r")
for line in file:
file.close()
file = open(filename, "w") # begin writing from the beginning
file = open(filename, "a") # append to the end of the existing contents
import urllib
web_page = urllib.urlopen(some_url)
for line in web_page: