s='s=%r;print s%%s';print s%s
This wikipedia article on Quines is a very good place to learn how these things work
s='s=%r;print s%%s';print s%s
qsort = lambda seq: [] if not seq else qsort(filter(lambda n: n<=seq[0], seq[1:]))+[seq[0]]+qsort(filter(lambda n: n>seq[0], seq[1:]))