def sum_in(numbers, sum_):
"""whether any two numbers from `numbers` form `sum_`."""
return any((sum_-n) in numbers for n in numbers)
It basically takes a list, and checks if any two numbers from it form a sum equalling sum_. I can't seem to get how that sum_-n verifies that TWO numbers equal the sum. Wouldn't it just be checking with one n each loop?!