📜  Python 如何在字符串中搜索 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:16.108000             🧑  作者: Mango

代码示例1
search_text = 'man'

str = 'You are good man.'

if search_text in str:
    print(f'Found "{search_text}" in string')
else:
    print('Not found')