Narcissist: Difference between revisions
Content added Content deleted
(Add Go.) |
(Added one for Python (tested in 2.7)) |
||
Line 68: | Line 68: | ||
<pre>: (narcissist "(Str) (= Str (str narcissist))") |
<pre>: (narcissist "(Str) (= Str (str narcissist))") |
||
-> T</pre> |
-> T</pre> |
||
=={{header|Python}}== |
|||
For Python 2.x: |
|||
<lang Python> |
|||
import sys |
|||
with open(sys.argv[0]) as quine: |
|||
code = raw_input("Enter source code: ") |
|||
if code == quine.read(): |
|||
print("Accept") |
|||
else: |
|||
print("Reject") |
|||
</lang> |
|||
=={{header|REXX}}== |
=={{header|REXX}}== |