Scientists can infer that pythons evolved from ancestors that had fully developed legs, but over time, they have lost the need for these limbs due to their primarily ground-dwelling and constricting hunting behaviors. This adaptation has allowed them to become more efficient predators and move more stealthily through their environments.