how to use str.partition