Fire, I need to disagree on this one. When I trained to get my open water lifeguard certification, I ended up ripped and shredded. Laps after laps on massive intensity, me 37 and swimming with all those squads swimmers, swimming against the clock with only 5 to 10 seconds break, a 1000 mt as a warmup, then laps, laps, more laps and underwater swimming.
If you put the intensity, meaning you are out of breath, unable to talk and all you body aches and you can hardly pull yourself out of the water, you will lose weight.
You get home at 10 pm so exhausted you crush on the bed forgetting to eat your dinner.
OF course if you swim gently , strolling around the pool and much on cookies and chips in the next hour you won't .
Anyone looking to lose weight in the pool should enrol in a lifeguard program. There are several levels, open waters is the hardest swimming pool the easiest. Great skills for life and the first aid course will stay with you all your life.