The prestigious American Journal of Sports Medicine compared three exercise groups over the course of three months - one walked every day, one cycled every day, while the third swam every day.
After three months they found that those on the walking program had lost an average of 17 pounds, those in the cycling group had lost an average of 19 pounds - and the swim group? They actually gained an average of 5 pounds!
While the mechanism of weight gain is not certain, and some of it could have been muscle, researchers speculated that the most likely explanation was that they must have eaten more. They theorized that whereas running and cycling raise your body temperature and thus suppress hunger, swimming in cold water stimulates the appetite - so although it burns calories, people tend to eat more after swimming.
It is undoubtedly true that competitive swimmers have body fat levels higher than those of runners or cyclists - indeed, when swim coaches want their athletes to lose weight, they prescribe 'land training' (running or cycling) in addition to their swimming.
Indeed, one survey that compared collegiate swimmers and distance runners found that the runners carried significantly less body fat (see table below).