Created
March 18, 2010 04:57
-
-
Save fcostin/336062 to your computer and use it in GitHub Desktop.
first attempt at a python3 quine
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
b = ['b = ', "print('%s' % str(x[0]), end='')", '\n', 'def f(*x): eval(b[1]) if type(x[0]) is str else [g(s) for s in x]', "def g(x): print('f(b[%d])' % x if type(x) is int else 'f(%s)' % x)", "0, 'b', 4, 2, 3", '2, b[5], b[6]'] | |
def g(x): print('f(b[%d])' % x if type(x) is int else 'f(%s)' % x) | |
def f(*x): eval(b[1]) if type(x[0]) is str else [g(s) for s in x] | |
f(b[0]) | |
f(b) | |
f(b[4]) | |
f(b[2]) | |
f(b[3]) | |
f(b[2]) | |
f(0, 'b', 4, 2, 3) | |
f(2, b[5], b[6]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment