Can i switch iphone 4s carrier?

I about to buy an iphone for t-mobile at full price and adding it to my family's line but our contract expires in September and we're looking to switch to sprint or Verizon. My question is after the contract expires can i still use my iphone for the other carrier we choose

I'm pretty sure you can.

You have to unlock it in order to be able to use it with another carrier