Here is my problem: on reading a book on networking programming for python, i stumbles across this code:
import socket, sys
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
if sys.argv[1:] == ['server']:
s.bind('127.0.0.1', PORT)
...
...
and so on. My question is whether the if statement checks if any of the elements in the sys.argv list(except the first item) is compared to be equal to 'server'. I tried doing this in IDLE for Python 3.2 and it didn't work. The book is intended for python 2.7 so I tried that too but it still dint work.