It would be incredibly rare if not impossible for head lice
to be passed in a swimming
They are almost always passed from direct head to head contact, and less often through use of contaminated hair care items (brushes for example) or clothing (hats, scarves). Lice can't jump or fly, and i'm pretty sure they don't swim either. ;-).