如何确定字符串是否在每个列表列表中?例如:
listEven = ["0", "2", "4", "6", "8"]
listOdd = ["1", "3", "5", "7", "9"]
listPrimes = ["2", "3", "5", "7"]
listOfLists = ["listOdd", "listPrimes"]
if "9" in each(listOfLists):
print("Math is broken")
else:
print("Good, 9 is still not prime")
基本上,是否有一个函数可以检查列表中的每个列表中是否有某些内容?