3 ms·
You can use ast.literal_eval[1] which is supposedly safe (only accepts literal values, not code). [1] http://docs.python.org/2/library/ast.html#ast.literal_eva
by icebraining 13y ago
You can use ast.literal_eval[1] which is supposedly safe (only accepts literal values, not code).
[1] http://docs.python.org/2/library/ast.html#ast.literal_eval http://docs.python.org/2/library/ast.html#ast.literal_eval