JJoeven

Exercises / python

Parse a JSON action

parse_action(text) returns a dict with keys tool and args only. Reject extra keys and non-objects. Print the valid action and the error from the bad one.

Live Pythonpython
Output
Run to execute this in your browser. Nothing is sent to a server.