使用成员操作符 in
>>> s='nihao,shijie'
>>> t='nihao'
>>> result = t in s
>>> print result
True
判断字符串是否包含子串 python
最新推荐文章于 2024-01-05 08:13:08 发布
使用成员操作符 in
>>> s='nihao,shijie'
>>> t='nihao'
>>> result = t in s
>>> print result
True