python 设计程序,外部输入列表元素(元素之间用空格隔开),将输入的元素存到列表中,并将列表打印出.
示例
输入:
你好 hello 98 语文
输出:
['你好', 'hello', '98', '语文']
代码:
list=input()
a=list.split(" ")
print(a)
python 设计程序,外部输入列表元素(元素之间用空格隔开),将输入的元素存到列表中,并将列表打印出.
示例
输入:
你好 hello 98 语文
输出:
['你好', 'hello', '98', '语文']
代码:
list=input()
a=list.split(" ")
print(a)