题解 | #字符串最后一个单词的长度#
计算某字母出现次数
http://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1
A=input("")
i=1
B=len(A)
while A[-i] != " ":
i+=1
if i-1==B:
break
print(i-1)
计算某字母出现次数
http://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1
A=input("")
i=1
B=len(A)
while A[-i] != " ":
i+=1
if i-1==B:
break
print(i-1)
相关推荐