input() returning wrong type

Asked by GZ on 2019-05-25

In python I can do the following:
> list(input())
> 3,12
which will return this:
[3, 12]

Sadly this doesn't work in Sikuli because the type of the object from the input will be "unicode" which can not be turned into a list of integers easily.

I hope there is an easy solution to this..

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
GZ
Solved:
2019-05-25
Last query:
2019-05-25
Last reply:
GZ (g-zr) said : #1

Ok, solved it: map(int, [input()][0].split(","))

RaiMan (raimund-hocke) said : #2

uups, to fast for me ;-) and very creative.

I would have answered:
eval(input)

GZ (g-zr) said : #3

Thank you RaiMan! :)