Created
May 22, 2019 14:33
-
-
Save vpontis/ff92942086870c44f01383d6f044003d to your computer and use it in GitHub Desktop.
A Program That Prints Itself
This file contains 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
A = [ | |
"A = [", | |
"]", | |
"def f():", | |
" print(A[0])", | |
" for v in A:", | |
" print(chr(34) + v + chr(34) + ',')", | |
" print(A[1])", | |
" for v in A[2:]:", | |
" print(v)", | |
"f()", | |
] | |
def f(): | |
print(A[0]) | |
for v in A: | |
print(chr(34) + v + chr(34) + ',') | |
print(A[1]) | |
for v in A[2:]: | |
print(v) | |
f() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment