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
3

I accidently stumbled on a quine.

darkdarcool
darkdarcool

Hi!

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
1