最佳答案
我使用以下代码来检查item是否在my_list中:
if item in my_list:print("Desired item is in list")但有时,它找不到物品。这是为什么?
“if item in my_list:”是在列表中查找项目的最“pythonic”方式吗?