longueur de liste sans fonction len

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)
Clumsy Caterpillar