Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Python

Idiom #182 Quine program

Output the source of the current program. A quine is a computer program that takes no input and produces a copy of its own source code as its only output.

Reading the source file from disk is cheating.

s = 's = %r\nprint(s%%s)'
print(s%s)
int main(){char*s="int main(){char*s=%c%s%c;printf(s,34,s,34);return 0;}";printf(s,34,s,34);return 0;}

New implementation...
< >
a