First you'll need to learn how to use code tags. As your code stands, it is unreadable because all indentation has been lost. If you use code tags, your code is not only readable, but forum members can easily copy and paste it into their code editors to tinker with.
Code tags go like this:
[code=python] # My code goes between these code tags
If you ever post in another forum you can replace "python" with any other syntax (php, perl, html, java, etc.)
So on a brief over look of your code I'm confused by string.sum() .. What does that do? I don't have a sum() function for the built-in string module. Is this a custom module? Also, I don't think you should bother importing the string module.
name = name.lower() will do the same thing.