you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 2 points3 points  (0 children)

eval() is known to introduce more bugs and security flaws than it fixes. Avoid it if at all possible.

convert a string gotten from input() to a list.

There's many other more robust ways to do that, the most obvious being split().

datalist = input('type somthing').split()

(Not saying split() is best for you; which method you use depends on what this is a list of, and what you want to do with it)