Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pointless self replicating Python script
contents = '''contents = {0}{0}{0}{1}{0}{0}{0}
contents = contents.format('\{0}',contents)
with open("pointless.py", "w") as f:
f.write(contents)
'''
contents = contents.format('\'',contents)
with open("pointless.py", "w") as f:
f.write(contents)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment