Cypress mulch, coconut fiber or a mix of the two!
Avoid aspen*, pine, cedar, sand, calci-sand and walnut shells.
In the humidity section of this care guide, we went over why ball pythons thrive best in higher humidity environments. The easiest way to keep the humidity up is through your selection of substrate, also known as bedding.
Substrate can be found all over the place online and in stores - and I suggest avoiding the usage of random dirt you find outside, even if the attributes of your backyard's soil are similar to those that I'll be suggesting today. Just plain soil dug up from the Earth often contains parasites and other organisms and bacteria that aren't always dangerous, but can end up either harming your pet, or becoming a breeding ground for bugs you probably don't want.
Alright, let's go ahead and jump in to my favorite substrate for ball pythons. 45% cypress mulch, 45% coconut fiber, and 10% sphagnum moss. I've tried around a dozen different substrates and substrate mixes for ball pythons, and this is definitely my favorite. Of course, your measurements don't have to be down to the percentile, I simply grab handfuls of each until I feel as though I have a nice mix of all three.
You certainly don't have to use all three of these, as you can use pure cypress or coconut fiber. However, I would not suggest you use pure sphagnum moss.
Cypress mulch, most often sold as "Forest Floor" by ZooMed are wood chips that fill enclosures quite nicely, hold humidity, and simply look nice.
Coconut fiber, most often sold as "Eco Earth" by ZooMed, or "Plantation Soil" by ExoTerra is a super soft dirt made from coconut which helps fill in the cracks, softens the mix all around, and makes traction easier for the snake in my experience.
Sphagnum moss, most often sold as... sphagnum moss... is a great addition to mix in, if you need even more humidity. It also adds air pockets into the substrate, helping plants and micro fauna thrive, if you choose to go that route.
Who knew substrate could get so complicated? But wait! There's more options.
ReptiBark is a frequent choice, but I'm personally not a fan, as it has a strong scent, and tends to dry out much more quickly in my use. Paper towel technically works too, but let's face it. It's boring.
*What about aspen? The reason I rarely suggest aspen, is because it's not capable of holding humidity. Aspen tends to rot or mold when wet, which means ball pythons have much more trouble shedding due to the lack of humidity. If you're in a very humid climate, aspen can work as a way to decrease moisture.