LoginSignup
1
0

More than 5 years have passed since last update.

python tips ヒヤドキュメント

Last updated at Posted at 2018-07-07

このtips は、ヒヤドキュメントを実行(exec)したい人向けです。
そういった人は、ほとんどいないと思いますが、さらに、ヒヤドキュメント内に、
ヒヤドキュメントを配置したいと思う人は更にいないでしょう。

ま、自分向けのメモです。

x="""
print('start\\n')
xx=\"""
tanuki
buta
\"""[1:-1]
print(xx)
"""[1:-1]

で、これを実行します。
exec(x)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0