Python 中的 split 方法
📁 python, 示例, 工作
代码:
a=input().split()print(a)当输入字符串 '1 2 3' 时
Traceback (most recent call last): File """", line 1, in <module> a=input().split() File ""<string>"", line 1 1 2 3 ^ SyntaxError: invalid syntax这个表达式来自示例,应该能正常工作。问题可能出在哪里?