3 ms·
How To Write A Quine
- peregrine 16y agoCouldn't you write a program that loads its own file and prints out each line __main__(): prgm = file("prgm.py") for line in prgm: print(line) or does that break the rules?
- Irfaan 16y agoLike you surmised - that breaks the rules. And since a quine is generally "just" a brain-teaser rather then a useful tool - where's the fun in breaking the rules? :)