Skip to content

Instantly share code, notes, and snippets.

@ipid
Last active May 10, 2021 16:20
Show Gist options
  • Save ipid/92436af940450f823ba5bf90b85a39cf to your computer and use it in GitHub Desktop.
Save ipid/92436af940450f823ba5bf90b85a39cf to your computer and use it in GitHub Desktop.
Python Quine 中文版
# Python 自打印程序示例
# 直接运行本程序,控制台就会输出这个程序本身的代码!
打印内容 = '''# Python 自打印程序示例
# 直接运行本程序,控制台就会输出这个程序本身的代码!
print_content = {引号}{引号}{引号}{替换内容}{引号}{引号}{引号}
print(打印内容.format(引号="'", 替换内容=打印内容))'''
print(打印内容.format(引号="'", 替换内容=打印内容))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment