The language's creator, Guido van Rossum, was a fan of the show and chose the name because he found it short, unique, and slightly mysterious, much like the comedy group's humor.
It's worth noting that Python the snake is also a common association with the language, but the connection is purely coincidental and secondary to the Monty Python inspiration.