Introduction: Python Programming - Len Function

Short Python program that used the "len" function to determine the number of characters in a string. Code is attached and below.

===========================================

print ("This program will determine the number of characters entered.")

StringEntered = input("Enter a word or sentence; spaces are ok: ")

print("The word or sentence that was entered was: ", StringEntered)

NumberOfCharacters = len(StringEntered)

print ("The number of characters in the string that was entered is: ", NumberOfCharacters)

Comments

About This Instructable

279views

11favorites

License:

More by matt392:Multi-bit Screwdriver Using PVC PipeReplace Letters on Computer KeyboardMulti-Bit Screwdriver From Pine 1x2
Add instructable to: