Skip to main content
Engineering LibreTexts

5.12: Exercises

  • Page ID
  • Exercise \(\PageIndex{1}\)

    The urllib module provides methods for manipulating URLs and downloading information from the web. The following example downloads and prints a secret message from

    import urllib
    conn = urllib.urlopen('')
    for line in conn:
        print line.strip()

    Run this code and follow the instructions you see there.


    • Was this article helpful?