Like many of us, [Austin] finds writing code satisfying — especially if it is challenging. His latest challenge: shoehorn something that looks like Python into 512 bytes. Ok, that didn’t work out, but would you believe 1024 bytes of source code?
The goal was to properly execute a fizzbuzz program using a decidedly Python-like syntax. Since he is only interpreting Python, some things were simplified. In addition, he tried hard to minimize things like whitespace and variable names. Still, there were other things to do, and he borrowed from tips for code golfing.
The resulting code is essentially illegible, but it handles integer variables and literals, assignment, arithmetic, many control structures, functions, and even print. Not bad for 1 K.
Despite being tiny, the parser does a lot, but it does cut corners. No bytecode, no syntax tree, and no error handling. Variables have to be a single lowercase letter. So, ok, it isn’t really Python. But it is something.
Naturally, this reminded us of the obfuscated C code contest. If you really want to go small, we appreciate small Forth.

While Python 2 was a total mess with hacks built on even more hacks, Python 3 was designed from the starts and its interpreter is very similar to Z80 instruction set.
Python 3 just forces the hacks onto the users. Have you seen what people do to get around pep 668? What a mess!
–break-system-packages
Its borderline lying to call it a python interpreter. Its more like a fizzbuzz-interpreter.
HemiPython 1K demo edition. I love these squeezed codes, demoscene etc. Where is it running, on Zx81, c64 or javascript 1 ghz browser? :)
code to learn
My first thought was “yeah, but he had 2 MBytes of libraries.” That was not the case, however. No additional libraries. Very impressive.
My dragon64k back in the 80’s had 64k !!!
And the basic interperter was 16k in rom
well i guess the python interpreter is now smaller than lua interpreter.
That isn’t Python in the image