Am 26.09.19 um 08:34 schrieb ast:
Hello

A line of code which produce itself when executed

 >>> s='s=%r;print(s%%s)';print(s%s)
s='s=%r;print(s%%s)';print(s%s)

Thats funny !

This is called a "quine" and there exist several methods how to do this.

https://en.wikipedia.org/wiki/Quine_(computing)

        Christian
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to