Various ======= Avoid getter and setter methods **No**:: person.set_age(40) **Yes**:: person.age = 40 Use one line per statement **No**:: print('a'); print('b') if and : # do something **Yes**:: print('a') print('b') cond = if cond and : # do something Don't explicitly compare to True or False **No**:: if x == True: print('true') **Yes**:: if x: print('true') Use the with statement when dealing with files **No**:: f = open('file.txt') a = f.read() ... f.close() **Yes**:: with open('file.txt') as f: for line in f: ... Don’t use fancy encodings if possible