So this is a normal any() method checking if the iterable returns True in any of its elements:
list_a = ['test', 'hello']
list_b = ['test', 'bye']
name = 'test'
any(name == item for item in list_a)
True
But what about combining two iterables?
This works:
name = 'hello'
any(name == item_a for item_a in list_a or name == item_b for item_b in list_b)
True
This doesnt:
name = 'bye'
any(name == item_a for item_a in list_a or name == item_b for item_b in list_b)
False
This can be simplyfied to:
any([True] or [False]) vs any([False] or [True])
How can it be transformed to:
any([True, False]) or any([False, True])
Any way to combine those two iterators within the any() method?