FWIW, there's been studies of wild ball pythons and they've found young males in trees, for whatever reasons. Perhaps to escape predators, other larger dominant males in the area, or to hunt for food (small birds or smaller arboreal mammals). Meanwhile, the larger adults are always found on or in the ground.