原博文
2017-11-02 15:18 −
因写多了判断语句,看着短短的代码却占据来好几行,于是便搜下if-else简洁的写法,结果也是发现新大陆 4种: 第1种:__就是普通写法 a, b, c 1, 2, 3 if a>b: c a else: c b 第二种:一行…
Python中输入多行字符串:
方法一:使用三引号>>> str1 Le vent se lve, il faut tenter de vivre.
起风了,唯有努力生存。
(纵有疾风起,人生不言弃。)
>>> str1
Le vent se lve, il faut…