mrmin123 / pyquines

messing around with python3 quines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyquines

Just messing around and trying to make my own python3 quines.

Definition of a quine, per Wikipedia:

A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output.

All files here should print or replicate itself when run via python3 [scriptname] or python3 [scriptname] > [outputname]


quine1

Very basic quine.


quine2

Using a list, list-comprehension, and ternary operator.


quine3

Using a longer list, for loop, and list-comprehension


quine4

Outputs its own sourcecode to a browser.

Run script via python3 quine4.py then load http://localhost:8888/. Save the resulting page and compare.

(Technically this isn't a quine because it outputs other things as well but it was a fun exercise anyway)

About

messing around with python3 quines


Languages

Language:Python 100.0%