How to create a script that list itself ?

Duncan Booth duncan.booth at invalid.invalid
Tue Jan 10 10:07:53 CET 2006


Dave Hansen wrote:

> Stealing from the old C chestnut:
> 
> s="s=%c%s%c;print s%%(34,s,34)";print s%(34,s,34)

Or a bit shorter:

s='s=%s;print s%%`s`';print s%`s`



More information about the Python-list mailing list