import stringbadSentence = "ttThis sentence has problems. "#Strip trailing spacesprint "Length = " + str(len(badSentence))print "Without trailing spaces = " + str(len(badSentence.rstrip(' ')))
Name (required)
email (will not be published) (required)
Website