Python的一些基础方法
2019-11-26 本文已影响0人
Winnnter
- 判断字符串中是否包含子字符串,可以使用
in
操作符:
root = "The Long Goodbye."
if "bye" not in root :
print("root contains 'bye'.")
in
操作符:root = "The Long Goodbye."
if "bye" not in root :
print("root contains 'bye'.")