Created
May 19, 2014 14:57
-
-
Save cessor/e7f4a1a04b0c8de9e391 to your computer and use it in GitHub Desktop.
Oneline Brainfuck Subset Parser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print''.join(map(chr,reduce(lambda x,y: x | |
| +[x[-1]+y],[l.count('+')-l.count('-') for | |
| l in """++++++++++++++-+-+-+-+-+-+-+-+-+- | |
| +++++++++++++++++++++++++++++++++++++++++ | |
| ++++++++++++.++++++++++++++++++++++++++++ | |
| +++++++.----.++++++++++++++++++++.-.----- | |
| ------.---.+++++++++++++++.---------.---- | |
| ----------------------------------------- | |
| -------------------------------.+++++++++ | |
| +++++++++++++++++++++++++++++++++++++++++ | |
| +++++++++++++++++++++++.++++++++++.------ | |
| ----------------------------------------- | |
| ------------------------------------.++++ | |
| +++++++++++++++++++++++++++++++++++++++++ | |
| +++++++++++++++++++++.+++.+++++++++++++++ | |
| ..---------------.+++++++++++++.--------- | |
| ----------------------------------------- | |
| --------------------------------.++++++++ | |
| +++++++++++++++++++++++++++++++++++++++++ | |
| +++++++++++++++++++++++++++++++++++.----- | |
| -------.-------.+++++++++++++.----------- | |
| ----------------------------------------- | |
| --------------------------.++++++++++++++ | |
| +++++++++++++++++++++++++++++++++++++++++ | |
| ++++++++++++++++++++++++++++++.---------- | |
| ----.+++++.+++++++++++++.---------------- | |
| ----------------------------------------- | |
| ------------------ +-+-+-+-+-+-+-+-+-+-+- | |
| ====== Thank you for traveling with ===== | |
| deutsche Bahn =""".split('.')],[0])[1:])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment