Let's break it.
print (sum(int(x) for x in raw_input().split()))
Also expressed as
sequence = raw_input().split() conv = [] for i in sequence: conv.append(int(i)) print sum(conv)
Now we can combine this into one line using
[int(x) for x in raw_input().split()]
But this is not lazy. Therefore, to make it lazy, we simply replace [ with (
(int(x) for x in raw_input().split())
Now, since this is an iterable object, we can pass this to sum()
And this is what happens.
source share