Definitely not. Pine shavings can be toxic and oils from it can kill your snake. I recommend using either Cypress Mulch, Aspen Bedding, or Eco Earth. Those are great substrates for Ball pythons. I use Cypress Mulch for my BPs, and I've used Aspen on them before. Those are the best substrates to use for BPs, and here are some that you should never use:
-Soils
-Sands
-Pine
-Cedar
-Wood shavings
-Bark chips

Those substrates are not the best for Ball pythons. Sands and soils can get the snake impacted, Pine and Cedar are toxic, Wood shavings can injure your snake, and Bark chips can get your snake impacted if swallowed.