Q:

Write a Python program to calculate the length of a string

0

Write a Python program to calculate the length of a string.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def string_length(str1):
    count = 0
    for char in str1:
        count += 1
    return count
print(string_length('w3resource.com'))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now