Python Exercise Example60
# Python2.x Python Exercise Instance 60
[ Python 100 Examples](#)
**Question:** Calculate the length of a string.
**Program Analysis:** None.
## Instance(Python 2.0+)
```python
#!/usr/bin/python
# -*- coding: UTF-8 -*-
sStr1 = 'strlen'
print len(sStr1)
The output of the above instance is:
6
[ Python 100 Examples](#)
YouTip