Created
April 17, 2012 05:34
-
-
Save fortune/2403721 to your computer and use it in GitHub Desktop.
Quine プログラム。この Python スクリプトを実行すると、スクリプト自身が出力される。
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
b = '''def q(d): | |
s = "b = '" | |
s += """''""" | |
s += d | |
s += "''" | |
s += "'" | |
s += """ | |
""" | |
return s | |
a = q(b) | |
self_data = a + b | |
print self_data''' | |
def q(d): | |
s = "b = '" | |
s += """''""" | |
s += d | |
s += "''" | |
s += "'" | |
s += """ | |
""" | |
return s | |
a = q(b) | |
self_data = a + b | |
print self_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment