How do I get the length of a string?

Asked by blessing007 · 6 months ago

1 Answer

58
amorebise · 6 months ago Top Answer

We use the len() function. If you say len("Suya"), it will give you 4. It’s short for 'length'.

This is useful for making sure a password isn't too short or a message isn't too long. I use it constantly in my projects to keep data clean.

Log in to add a comment.