In computing, a quine is a computer program which produces a copy of its own source code as its only output.
python # adapted from a Quine by Sean B. Palmer
print (lambda s='print (lambda s=%r: (s %% s))()': (s % s))()
# adapted from a Quine by Sean B. Palmer
print (lambda s='print (lambda s=%r: (s %% s))()': (s % s))()
python x='x=%r;print(x%%x)';print(x%x)
x='x=%r;print(x%%x)';print(x%x)
Submit a new solution for
python
There are 23 other solutions in
additional languages (
clojure,
cpp,
fantom,
fsharp ...)