Multi-line string

2018-01-12  本文已影响6人  成江

use triple quotes to start and end them.

s = """ this is a very
        long string if I had the
        energy to type more and more ..."""

You can use single quotes too (3 of them of course at start and end) and treat the resulting string s just like any other string.

上一篇下一篇

猜你喜欢

热点阅读