xrange() -> range(), sys.argc -> argc
Fix (list) shadows builtin
Comparisons with True|False are not necessary and may not work as expected