Python string extension