I can't find any reference to that specific element being inspired by Monty Python, but J.K. Rowling has admitted to being a fan of Monty Python, and has hinted at it being one of her inspirations for the Dursleys and Hagrid.
As an adult reader, I loved the books and was surprised at how much humour is in them. The Dursleys sound like something out of Monty Python! Do you like British comedy?
J.K. Rowling: British comedy is an obsession of mine. I love Monty Python.
About the Books: transcript of J.K. Rowling's live interview on Scholastic.com," Scholastic.com, 16 October 2000
You were just saying how you read it to your daughter, to your 6 year old daughter. When we sat down, we read this chapter by chapter. Every night the kids couldn’t wait for the next night. The characters are so great you can come up with wonderful voices, reading out loud to your kids with Hagrid and Dumbledore. Did you get that with your daughter too? Were you getting into the voices?
J.K. Rowling: Well, I’m really into the voices and I really let myself go when I read to my daughter. I’m not quite that uninhibited when I’m reading to a lot of people.
Jo1, let’s hear what Dumbledore sounds like.
J.K. Rowling: Well, I use a little Sean Connery production. I put a little shurr into the s’s. (slurred Albus Dumbledore voice) But my favorite was Hagrid. He was more of a Monty Python character. (Does Hagrid voice)
(Laughs) One of the Gumbys
J.K. Rowling: No, he wasn't gumby wasn’t he?
(Still laughing) No, I don’t really see Hagrid as a gumby though I like your interpretation.
The Connection (WBUR Radio), 12 October, 1999
1. Note: A different transcript attributes these lines to the caller, whose name was Joe. I cannot find a copy of the original recording.