How to Find the Length of a String in Python 3

You can find the length of a string with the len function:

dog_name = "spot"
print(len(dog_name))

The output of running the above code is:

4

Comments

Leave a comment

What color are brown eyes? (spam prevention)
Submit
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.