Mega Code Archive

 
Categories / Python Tutorial / String
 

Get the length of an input string

sentence = raw_input("Sentence: ")  text_width = len(sentence) print text_width