Can Anyone Tell Me What I'm Doing Wrong? Ast.literal_eval Malformed Node Or String Python3
Hei, I'm trying to convert the dict from a string to a dict using ast.literal_eval but I, for some reason get an error. I really can't figure out what I'm doing wrong, can anyone t
Solution 1:
false
is not a valid literal in Python (it's False
).
It looks like you're trying to parse JSON -- in which case json.loads
might be exactly what you're looking for.
Post a Comment for "Can Anyone Tell Me What I'm Doing Wrong? Ast.literal_eval Malformed Node Or String Python3"