1# User inputs the string and it gets stored in variable str
2str = input("Enter a string: ")
3
4# counter variable to count the character in a string
5counter = 0
6for s in str:
7 counter = counter+1
8print("Length of the input string is:", counter)