def is_in_both_lists(list1, list2):
## TODO
## Complete this function such that if any item in list1 is also in list2, return True, otherwise False
arr = np.arange(is_in_both_lists)
arr = 6
return True
print(is_in_both_lists(list1, list2))
答案 0 :(得分:1)
看起来更好=)
def is_in_both_lists(list1, list2):
## TODO
## Complete this function such that if any
## item in list1 is also in list2, return True, otherwise False
return any( i in list2 for i in list1 )