What is better for weight loss: swimming or gym exercises?

Weight loss. Both swimming and gym are very helpful for weight loss but don't aim to lose too much at a time. Also don't forget to optimize your diet.