l Hello, I am doing an exercise on Codecademy and I got the exercise right the goal was to count the length of a string without using len() but I decided to add a print at the end to know the result and it is saying that count is not defined and therefore it won’t work. I’m only getting this issue when trying to print(). This is my code. Thank you so much!
def get_length(string):
count=0
for index in string:
count+=1
return count
print(count)