Don't leave them unattended, and keep other pets away. Ball pythons are capable of moving faster than you'd expect, especially if they see what they'd perceive to be a threat (giagantic hooman, big doggo, cat, etc.) coming at them or in the vacinity. In the wild, anything that would be predacious toward a ball python would attack from above because they're a terrestrial snake, so things that loom overhead are scary. If you have a cat make sure it's not near your python ever, as even slight injury from a cat can result in horrible infections. Dogs can cause injury from being excitable and may step on your snake among other things, so it's best to keep them away also.
Most cases of snake escapes are from easily escapable habs or taking your eyes off the snake while it's exploring. Always be close enough that you can pick your snake up easily, so within hands reach.