map() returns an iterator (see the documentation).
When you call list(double) in the first print() statement this iterator gets incremented and incremented until it reaches the end. Afterwards you can think of the iterator as “consumed”.
So when you use double again, there are no more elements, so the sum() adds up zero elements and returns 0.
Try your snipped again, but this time without the first print(). You will see the correct value.