The length of a string

As with any other Python sequence, we can determine the length of a string with the built-in len() function.

>>> len("llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch")
58

The sign for the railway station at Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogo
gogoch
on the Welsh island of Anglesey – the longest place name in Europe:

Figure 5.1: The longest place name in Europe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset