Skip to content

Instantly share code, notes, and snippets.

@GlenDC
Created December 6, 2015 04:46
Show Gist options
  • Save GlenDC/5ec5528c7fcac5468715 to your computer and use it in GitHub Desktop.
Save GlenDC/5ec5528c7fcac5468715 to your computer and use it in GitHub Desktop.
My python version for the Quine Challenge
#!/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