In their natural habitat, ball pythons live most of their lives underground and are very opportunistic animals. They will leave their burrows at night to seek prey, which will almost always be a rodent den. Once inside the den the Python will wait silently to ambush any passing rodents.
After a meal is achieved and there are no threats around they will stay inside the burrow to digest the recently obtained meal. When they are ready to feed again, they will search the burrow again for stragglers then move to the next burrow.
I'm assuming you're little one was just exhibiting some of its natural instincts, and you should feel very lucky to witness it! I'm honestly pretty jealous bc I really love the natural behaviors and habits these animals have. Thank you for posting!