摘要: 1、计算字符串最后一个单词的长度,单词以空格隔开 #!/usr/bin/python a=input().strip() a=a[-1::-1] count=0 for i in a: if i!=" ": count+=1 else: break print(count) a=input().st 阅读全文
posted @ 2020-12-13 17:21 闲云野鹤cs 阅读(386) 评论(0) 推荐(0) 编辑