"It's peeing," William said as the snake relieved itself. "It's obviously very relaxed."
The brothers were also offered their choice of snakes to be named for them at the Mokolodi Education Center.
"Big brother chooses the python, little brother gets the common brown," said William, who was given first pick. "It's the same color as your hair."
"Mine will bite you," Harry joked in return.
Prince William is a patron of the charity Tusk Trust, which supports the nature center financially.