! Welcome to the forum :)
I'd like to second Crimson King
's advice, and let you know that you're more likely to get a response if you provide all that, on top of removing extraneous code to your question (for example, Pygame code, or even the rest of the function if it's not relevant to your question). I highly recommend you do all this the best of your ability. If you want to further optimize your question so that it can be answered with less back and forth, try reviewing this
Join the #python-forum IRC channel on irc.freenode.net for off-topic chat!
Please prefer not to PM members. The point of the forum is so that anyone can benefit. We don't want to help you over PMs/emails/Skype chats that others can't benefit from