📅  最后修改于: 2022-03-11 14:45:12.005000             🧑  作者: Mango
def string_length(my_string):
"""returns the length of a string
"""
counter = 0
for char in my_string:
counter += 1
return counter
# taking user input
string_input = input("enter string :")
length = string_length(string_input)
print("length is ", length)