python中,获取字符串的长度不用len()函数
str1 = input()
count = 0
for py in str1:
count = count + 1
print(count)
如有错误或更好的方法欢迎评论指正。
python中,获取字符串的长度不用len()函数
str1 = input()
count = 0
for py in str1:
count = count + 1
print(count)
如有错误或更好的方法欢迎评论指正。