Python 100例
題目:計算字符串長度。
程序分析:無。
程序源代碼:
#!/usr/bin/python # -*- coding: UTF-8 -*- sStr1 = 'strlen' print len(sStr1)
以上實例輸出結果為:
6