Python编程之计算字符串长度

版权声明:此篇博文为博主心血o(╥﹏╥)o,如要转载请注明来源,勿忘心安! https://blog.csdn.net/dyq1995/article/details/88963756

问题描述:计算字符串长度。 

源代码:


#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
sStr1 = 'strhgnuidlen'
print len(sStr1)

输出结果如下:

12

猜你喜欢

转载自blog.csdn.net/dyq1995/article/details/88963756