编写一个程序,接受逗号分隔的单词序列作为输入,按字母顺序排序后按逗号分隔的序列打印单词。假设向程序提供以下输入:without,hello,bag,world则输出为:bag,hello,without,world用python语言表达
收起
string = 'without,hello,bag,world' new = sorted(string.split(',')) print(','.join(new))
报告相同问题?