当前位置:首页 >> python 统计一句话中最长单词 >>

python 统计一句话中最长单词

if __name__ == '__main__': say_words = rawinput(“请输入要测试的一句话”) word_list = say_words.split(',') //用逗号转换为列表 word_len_list = [len(word) for word in say_words] max_word_len = max(word_len_list) for word in say_wor...

def num_input(): count=1 data_list=[] while True: count += 1 data=input("enter a number:") if data == "": print(count-2,"numbers entered") break number=float(data) data_list.append(number) print("sum:",sum(data_list),"max:", ma...

照看[zhào kàn] look after; attend to; keep an eye on:例句: attend to a patient; 照看病人take care of a child; baby-sitting; 照看婴儿

网站首页 | 网站地图
All rights reserved Powered by www.wlbk.net
copyright ©right 2010-2021。