Python > import this > Easter eggを表示する > オンラインコード実行環境で試した
@ Introducing Python: Modern Computing in Simple Packages by Bill Lubanovic
(No. 432 / 12833)
import thisというのが掲載されていた。
@ paiza
https://paiza.io/?locale=ja-jp
にて「コード作成を試してみる(無料)」で実行。
// Here your code !
import this
print("XXXXXXXX")
txt:結果
main.swift:2:8: error: no such module 'this'
import this
(追記 2017/01/09)
@nukorouさんに確認いただきましたように、paizaでもEaster eggが表示されました。
@ ideone > Python (version 2?)
# your code goes here
import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
@ codinggroundのPython実行環境
# Hello World program in Python
import this
print "Hello World!\n"
sh-4.3$ python main.py
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Hello World!
sh-4.3$
@ codinggroundのbash実行環境
- 手順
- pythonと入力
- import thisと入力 (Easter eggが表示される)
- quit()で終了
備考
Python実装方法の違いが出る。
(内部の具体的な実装方法は不明だが)。
上記すべてでEaster eggが表示されました。
意図的に特定のimportをできないようにしているオンラインコード実行環境もある、という記事を見たことがある。
Author And Source
この問題について(Python > import this > Easter eggを表示する > オンラインコード実行環境で試した), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/337fc8a96ce343f31709著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .