Skip to main content

Tetris in 73 Lines

Tetris written in 73 lines. Left, right, up rotates, down pushes down, space drops. Game over to quit. :P And yes, the code is obfuscated on purpose. :P Enjoy decoding it =)

Jordan Trudgett
Tetris written in 73 lines. Was originally 150+, then
removed comments, extra space (indentation spacing and also
"x = 5", "6, 7, 8, 9" spaces for example) and put anything possible onto one line, separated by semi-colons.
The code itself is 2.6K and is 73 lines (probably can still be shortened.)

See if you can work out what each part does! (The list
manipulations would be the trickiest, I think.)

I was inspired by a similar tetris game written in 256
bytes... it probably does less than mine, but I thought it
was still damn impressive. :P
For a less sadistic approach to Python, see my
masterpiece-in-progess, Ardentryst.


  • Left: move block left
  • Right: move block right
  • Up: rotate block
  • Down: push block down space drops. Game over to quit. :P



Home Page


Tetris in 73 Lines 1.00 — 30 Jun, 2008

Tetris in 73 Lines 1 — 10 Mar, 2013 account Comments

  • Mak D'Uniq 2012-04-22 11:53

    where can i download it? source link is not working

  • codequickly 2012-04-23 03:15

    Yep, source code link is not working. 

  • Soccermanhorse 2012-04-29 15:18

    The source link needs to get fixed !

  • conorgleeson 2012-09-30 14:34

    Source Link:

    Butsy 2014-02-20 02:38

    Ah.. that's not 70 lines haha

  • tgfcoder 2013-03-10 06:36

    Source URI has been updated. Thanks isacliaen7 for pointing this out to me personally :)

  • Nonya Binnis 2014-04-24 23:10

    Of course it's on 73 lines if you scrunch a bunch of statements on to one line like that... You might as well write the whole thing on one line and say it's Tetris in one line of code.

  • Noname 2015-05-24 21:44

    Is there any documentation for your code, I really can't understand anything :D

  • Robert Moore 2015-07-24 17:26

    It freezes my computer until I finish the game!

  • bhottu 2015-09-07 03:19

    nice post, try this source code

  • 18thcaliber 2015-10-02 08:43

    yeah i can't use it