私信  •  关注

Prudhvi

Prudhvi 最近创建的主题
Prudhvi 最近回复了
4 年前
回复了 Prudhvi 创建的主题 » 如何在列表中搜索项目-python

你可以使用 in True 如果该元素出现在列表中,则 False

if Searchname in Names:
    found=True
    print('Found')
else:
    print('Not found')