Migrating to Python2 to Python3
# py2
print "hello"
# py3
print("hello")
Iterators
# py2
class X():
def next():
...
# py3
class X():
def __next__():
...
Iterating over dictionaries
d = {...}
# py2
for k,v in d.iteritems():
...
# py3
for k,v in d.items():
...