首页 > 编程语言 >python 中 if语句取反

python 中 if语句取反

时间:2022-11-02 16:37:22浏览次数:39  
标签:语句 ... python str1 取反 yes

 

001、

>>> str1 = ">aabbcc"
>>> if str1.startswith(">"):
...     print("yes")
...
yes
>>> if not str1.startswith(">"):    ## python中if语句取反
...     print("yes")
...

 

标签:语句,...,python,str1,取反,yes
From: https://www.cnblogs.com/liujiaxin2018/p/16851448.html

相关文章