Skip to content

Instantly share code, notes, and snippets.

@wvlia5 wvlia5/pythonOneLiner.py
Last active Jul 16, 2019

Embed
What would you like to do?
Amazing Python One-Liner
This file has been truncated, but you can view the full file.
@BoboTiG

This comment has been minimized.

Copy link

commented Jul 8, 2019

Wow, could you explain?

@wvlia5

This comment has been minimized.

Copy link
Owner Author

commented Jul 8, 2019

@BoboTiG Sure I could 🤣 . I'm hesitant to write a spoiler right here though.
There are 3 revisions, which did you execute? Did you find any problems?
Revisions 2 & 3 are more impressive than revsion 1, however GitHub doesn't show revisions 2&3 (says "this file has been truncated") and there might be problems copy&pasting them.

@BoboTiG

This comment has been minimized.

Copy link

commented Jul 8, 2019

I tried the rev 3. I replaced exec with print just to not run something I do not understand. But what was printed is quite intriguing given the one-liner. If you prefer to keep that secret for some time, it is OK too ;)

@wvlia5

This comment has been minimized.

Copy link
Owner Author

commented Jul 8, 2019

Oh clever boy :P . Just go ahead with exec, that's where the fun is, trust i'm a good guy.
So you had no problems copy&pasting revision 3, that's good news. you just had to ask github with the 'raw' version button, right?
I think I'll write a blog post with explanation in matiasmorant.wordpress.com at some point, also explaining some functional programming concepts.
This gist didn't get as much publicity as I thought it would, maybe I need a better title.

@chewxy

This comment has been minimized.

Copy link

commented Jul 10, 2019

@BoboTiG the final ''.split('') in the file hides A LOT (about 1.4MB worth). The version I have written here is the bog standard ascii-version.

I would love to read @wvlia5 's blog post about it.

@chewxy

This comment has been minimized.

Copy link

commented Jul 10, 2019

goddammit. Good one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.