Not A Good Quine

(aka. A Quine So Clever It’s Cheating)

# doesn't work in Python 3.9+
import inspect, __main__
print(inspect.getsource(__main__), end="")

(there should be a newline at the end btw)

May 30, 2023, 12:10 PM
2 0 3

comments (single view)

oh, so that’s a thing in Python 3.9+

pi@pie:~ $ python3 --version
Python 3.9.2
View all comments