HS

harsh_shukla

Intern at Microsoft July 30, 2020, 10:31 a.m. ⋅ 169 views

Python Get length of a string


To get length of a string you can use len() function of python. len() function can be used with several different types in Python - both built-in types and library types.

Have a look at example.

>>> len("HackersFriend")
13

We can also use len() function to get number of items in any python list.

>>> len([1,2,3])
3

 



Go back to feed

HackersFriend Updates





View more


Events


Nov. 28, 2018, 5:30 p.m.

Python from zero to hero

place Delhi

View details


Aug. 13, 2018, 5:30 p.m.

Python from zero to hero

place Bangalore ( HackersFriend office BTM Layout)

View details