Can i jailbreak my iphone 5 without losing the sim card unlock?

I have an iphone 4s version 6.1 its a sprint phone unlocked to tmobile i want to jail break it would it mess up the unlock?

If the baseband changes you will lose the unlock

No it won't mess with your unlock. If it has been factory unlock, even if you restore it or jailbreak it you will still have the factory unlock.