Created
December 6, 2015 04:46
-
-
Save GlenDC/5ec5528c7fcac5468715 to your computer and use it in GitHub Desktop.
My python version for the Quine Challenge
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
#!/usr/bin/python | |
quote = chr(34) | |
source = [ | |
"#!/usr/bin/python", | |
"", | |
"quote = chr(34)", | |
"source = [", | |
" ]", | |
"", | |
"for i in range(4):", | |
" print source[i]", | |
"for line in source:", | |
" print ' ' + quote + line + quote + ','", | |
"for line in source[4:]:", | |
" print line", | |
"", | |
] | |
for i in range(4): | |
print source[i] | |
for line in source: | |
print ' ' + quote + line + quote + ',' | |
for line in source[4:]: | |
print line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment