我第三问不会求求大佬,告诉我代码怎么编?
没有完全理解题意啊
import re text = input("请输入内容\n") text_list = text.replace('\.','').split(' ') print(text_list) text_list.sort() print(text_list)
使用split切分,然后sort,sorted随便选一个。不懂就去百度python split . sort sorted的作用,