From ab9d8f3874ba550bea0103e0891160b8d9145208 Mon Sep 17 00:00:00 2001 From: Jeremias Moreira Gomes Date: Sun, 30 Oct 2022 08:09:23 -0300 Subject: [PATCH] Adding a Quine in Python. (#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> --- other/quine.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 other/quine.py diff --git a/other/quine.py b/other/quine.py new file mode 100644 index 000000000..01e03bbb0 --- /dev/null +++ b/other/quine.py @@ -0,0 +1,10 @@ +#!/bin/python3 +""" +Quine: + +A quine is a computer program which takes no input and produces a copy of its +own source code as its only output (disregarding this docstring and the shebang). + +More info on: https://en.wikipedia.org/wiki/Quine_(computing) +""" +print((lambda quine: quine % quine)("print((lambda quine: quine %% quine)(%r))"))