python语言中如何判断一个字符串有多少位

2025-04-14 01:04:14
推荐回答(1个)
回答1:

用自带的len函数就行了,比如
a = "hello"
print len(a)
结果就是5