HF RL Explorer

Implement the Python function specified below. Return ONLY the indented function body, without repeating the…

Implement the Python function specified below. Return ONLY the indented function body, without repeating the…: a task in unslop-harbor (Harbor dataset). def by length(arr): """ Given an array of integers, sort the integers that are between 1 and 9 inclusive, reverse the resulting array, and then…

The task

def by_length(arr): """ Given an array of integers, sort the integers that are between 1 and 9 inclusive, reverse the resulting array, and then replace each digit by its corresponding name from "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine".

Part of rawmodels/unslop-harbor.