You will wonder how much Python can done within a line of code.
- Click the button above to fork this gist.
- Modify all the files to according to the rules below.
- Save your entry and tweet it up!
Keep in mind that thanks to the awesome sensibilities of the GitHub team, gists are just repos. So feel free to clone yours and work locally for a more comfortable environment, and to allow commit messages.
Logical part must exist in an aline.py
file, whose contents are
- an assignable, valid Python expression that
- contains no more than 1 line of code.
All entries must also be licensed under the WTFPL or equally permissive license.
Python 1-Liners is a just for fun fork of 140byt.es (which is JavaScript), and brought to you by Nattawut Phetmak. You may check out this original article: Powerful Python One-Liners.