输入一个字符串,对该字符串进行逆序,输出逆序后的字符串输入格式:
输出格式:
输入样例:
输出样例:
代码如下:
lists = input().split(', ') lists.reverse() print(lists)
运行结果(输入为:1, 2, 3, 4, 5):
望采纳。