Skip to content

Commit ab9d8f3

Browse files
Adding a Quine in Python. (TheAlgorithms#6807)
* Adding a Quine in Python. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent cafbbab commit ab9d8f3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

other/quine.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/python3
2+
"""
3+
Quine:
4+
5+
A quine is a computer program which takes no input and produces a copy of its
6+
own source code as its only output (disregarding this docstring and the shebang).
7+
8+
More info on: https://en.wikipedia.org/wiki/Quine_(computing)
9+
"""
10+
print((lambda quine: quine % quine)("print((lambda quine: quine %% quine)(%r))"))

0 commit comments

Comments
 (0)