最短的python quine吗? [英] shortest python quine?

查看:200
本文介绍了最短的python quine吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

_='_=%r;print _%%_';print _%_

这是最短的python quine,还是可以做得更好?似乎对 Quine页面上的所有条目都有所改进.

Is this the shortest possible python quine, or can it be done better? This one seems to improve on all the entries on The Quine Page.

我不是在计算琐碎的空"程序,也不是在计算Terry Reedy提交的内容,这是因为双引号而引起的(如果允许的话,"hello world"是一个quine吗?没关系吗?)

I'm not counting the trivial 'empty' program, and I'm not counting Terry Reedy's submission which is sus because of the double quotes (if that's allowed, is "hello world" a quine? or "'" for that matter?)

推荐答案

我将把它留在这里(另存为exceptionQuine.py):

I'm just going to leave this here (save as exceptionQuine.py):

    File "exceptionQuine.py", line 1
        File "exceptionQuine.py", line 1
        ^
IndentationError: unexpected indent

这篇关于最短的python quine吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆