Python Exercise Example 60
**Problem:** Calculate the length of a string.
**Analysis:** None.
Example (Python 2.0+)
#!/usr/bin/python
-- coding: UTF-8 --
sStr1
=
'
strlen
'
len
(
sStr1
)
The output of the above example is:
6
**Problem:** Calculate the length of a string.
**Analysis:** None.
#!/usr/bin/python
sStr1
=
'
strlen
'
len
(
sStr1
)
The output of the above example is:
6