You will find a ball python would be better off in something around a 55. Fortunately it will not get very large so a 4' tank should work fine. I really would'nt do much smaller.
I've had a red tailed boa and a burmese python at times. When they outgrew the tank, I sold them instead of getting a larger tank.
The one thing you will want to do, is make sure the top is very secure. Snakes are very strong and will push the top off, then you will find them in the darndest places at the worst times.
A 6' burmese is a real PITA to remove from a toilet. Several feet of snake finds it's way to the trap and hangs on until IT'S ready to come out.