newbie question

Sven R. Kunze srkunze at mail.de
Thu Mar 24 07:10:22 EDT 2016


On 24.03.2016 11:57, Matt Wheeler wrote:
>>>> import ast
>>>> s = "(1, 2, 3, 4)"
>>>> t = ast.literal_eval(s)
>>>> t
> (1, 2, 3, 4)

I suppose that's the better solution in terms of safety.



More information about the Python-list mailing list