Colons should not have any space before them.

Anti-pattern

with open('file.dat') as f :
    contents = f.read()

Best practice

with open('file.dat') as f:
    contents = f.read()