← Back to challenges

Return Types

PythonHardhigher_order_functionssortingarraysalgorithmsloops

Instructions

Create a function that takes a list lst and returns the types of values (data types) in a new list.

Examples

list_values_types([1, 10]) ➞ ["int", "int"])

list_values_types([["hello" , 1] , 10]) ➞ ["list", "int"])

list_values_types(["shashwat", 10, 90]) ➞ ["str", "int", "int"])

Notes

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Barbecue Skewers