As usual, our program will be more flexible if we assign values dynamically instead of hard-coding values. Therefore, let's import the sys module so we can grab input from the command line.
Next, import the socket module. This is the bedrock of most network programming in Python. While different modules exist for the various protocols, the socket module allows you to access any port on any machine and read or write to it. Other modules are certainly more appropriate for their given tasks (e.g., httplib, ftplib, gopher, poplib, etc.), but socket is foundational to each of the others (the httplib module, for example, imports socket).
Next, we need to declare a few variables.
