LANGUAGE » PYTHON » PACKAGE

Ast

Usage

MethodDescription
literal_evalSafely evaluate a string containing a Python literal.

Example

python
my_dict = ast.literal_eval('{"key": "value"}')