remove trailing whitespace
remove semicolons. Python != C
Fix file.close() calls; Python != Ruby
fix spacing around operators
remove unidiomatic & unnecessary parens around `if` conds
avoid shadowing built-in `file` type
use list comprehensions instead of map()