Solving the web most popular code shortening competition with Python 3 - PyCon.it 2017
By Alessandro Amici
Solving the web most popular code shortening competition with Python 3 - PyCon.it 2017
“Code shortening” is the “sport” where participants strive to achieve the shortest possible source code that solves a programming problem by exploiting all the tricks and quirks of the language. The SIZECON problem on SPOJ is one of the oldest and most popular code shortening problems on the web with a bizarre twist, only character above ASCII value 32 are counted for the penalty. During the talk we will take a journey into some frightening depths of the Python language in order to write shorter and shorter solutions to SIZECON until, exploiting a number of mind-blowing tricks, we will reach the current record solution for Python 3 of 31 characters. I promise I’ll show you the most obfuscated, contrived and sick python code you have ever seen and (hopefully!) will ever see.