KHADERSYED.COMPERSONAL_BLOG.DEB ONLINE2026-04-03|AWS S3/CLOUDFRONT
khadersyed.com:~/posts$ cat Porting code from Python 2 to Python 3
2015-09-17python

Porting code from Python 2 to Python 3

EXTERNAL LINK →

This page documents all the little changes between Python 2 and Python 3. Useful, so you can already start programming for the future and dropping the old ways of doing things.

So much has changed between Python 2 and Python 3, there are vanishingly few programs that will run unmodified under both. But don’t despair! To help with this transition, Python 3 comes with a utility script called 2to3, which takes your actual Python 2 source code as input and auto-converts as much as it can to Python 3.

Also, generators are awesome.