Yes, Pythons have small sharp teeth that face in towards their throats. They use these to grip their prey while they constrict. With the teeth positioned this way, it is to stop things from escaping as you would be pulling against the teeth.
Which I why, if you are bitten by a Python or a Boa (I own a boa) you aren't to pull your hand out because not only will you shred it, but chances are you'll also injure the snake.
If you are bitten by one, they'll either give you a nip as a warning or if they think your hand is edible they'll lock on. In this case the best way of getting one off, short of waiting patiently (people do) is to try and submerge it underwater. This can panic the snake into releasing. The other way which works well is to pour mouthwash over where you are being munched on, they detest the taste and chances are they will instantly let go.
I have no experience of being bitten on the junk though!