Built-in function len() returns the length of a string : String Length « String « Python






Built-in function len() returns the length of a string

Built-in function len() returns the length of a string



s = 'supercalifragilisticexpialidocious'
print len(s)

           
       








Related examples in the same category

1.Get the length: number of items inside a stringGet the length: number of items inside a string
2.keeps '\' (Back splash) literallykeeps '\' (Back splash) literally
3.Get the length of a string with escape characters insideGet the length of a string with escape characters inside
4.Output and get length of a string with special characters
5.For Statements to list the string length For Statements to list the string length