Method split in python
In the case of an entry point
'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
The expression was taken from an example, and should be worked. What could be a nail?
split- That's it.
inputIt's an exception. Why? Indulgence. https://docs.python.org/2/library/functions.html#input Says that...
inputMakes two things:
(1) Reading from stdin.
(2) Everything that's read is done.
1 2 3cannot be performed because of the wrong syntax. Py3 conduct
input()They changed so people don't get confused anymore. Use it. https://docs.python.org/2/library/functions.html#raw_input ♪ Or Python3. You can also use the library. https://pythonhosted.org/six/ so that when you suddenly move to another version, your code doesn't break because Py3 is a function.