programming-examples/python/String/Calculate the length of a string.py

6 lines
142 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
def string_length(str1):
count = 0
for char in str1:
count += 1
return count
print(string_length('sadsadsadasd.com'))