Choose the op

Write a function choose_op(ls,op)choose\_op(ls, op) that receives a list of positive integers and a string opop. The string is one of "add", "mul", "cnt". It must return the result of adding together, multiplying together, or counting the digits of all the integers in the list, respectively.

Problem information

Author: José Luis Balcázar / Lluís Padró

Generation: 2026-01-25T17:08:20.323Z

© Jutge.org, 2006–2026.
https://jutge.org