WorldQuant Interview

return count, sum and average of all numbers in json

def stats(json_str: str):
    pass
    
    

input = '{"a":1,"b":2,"c":{"d":3,"e":"f"},"g":[5,6,7,{"h":8}, [[[[1]]],2], [6,7]]}'
output = stats(input)
print(output)

Anyone can help here?

Comments (4)
No comments yet.