Building up strings like this should be avoided in Python since strings are immutable, which means you're creating a new string every time which has to copy over the characters one by one. Instead, add each substring to a list and `''.join` the list after the loop terminates. [1]

http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Strings