how to use str.istitle in python