您可以any()在这里使用:def checks(a,b): return any (b[1] == item[1] for item in a)>>> checks(['5v','7y'],'6y')True>>> checks(['5v','7z'],'6y')False帮助any:>>> print any.__doc__any(iterable) -> boolReturn True if bool(x) is True for any x in the iterable.If the iterable is empty, return False.