Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs

I accidently stumbled on a quine.



So, while I was just messing around in python, I stumbled upon something that I actually kind hard to do. Which is make a quine.
I'll quickly sum up what a quine is. It is bassicly making a coding language print it's own source code. And is a lot harder than it sounds(seriously try one).

So, think it's kinda funny that I accidentally stumbled on one.

Here is the code

from sys import * def open_file(filename): data = open(filename, "r").read() print(data) def run(): data = open_file(argv[0]) run()

I put the repl under this, but you can copy paste the code above for yourself.

So, yeh. Short post. So uh. Bye?

2 years ago
You are viewing a single comment. View All


nothing, its useless, watch the art of code on youtube, they explain it better and show you more things you can do with it(everything is useless though), but you may learn something you didn't know before.

2 years ago