Python BasicsEasy
Parsing a ReAct Action
~10 mincode completion
Implement parse_action(line) returning the list [tool, argument].
Where this shows up
~10 min
••••••
3 employers weight this skill
2 frontier labs, 1 AI product company. Top match scores 80.
Python
def parse_action(line):
"""
Split a ReAct action line into its tool name and argument.
Args:
line: string like "Action: search[some query]"
Returns:
list of two strings: [tool, argument]
"""
# YOUR CODE HERE
pass