Return Types

Published by Werdna in

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]) ➞ [Fixnum, Fixnum]

list_values_types([["hello", 1], 10]) ➞ [Array, Fixnum]

list_values_types(["shashwat", 10, 90]) ➞ [String, Fixnum, Fixnum]

Notes

  • Check the Resources tab for help if needed.
  • Output for integer will be Fixnum instead of Integer.
Watch a quick demo on how Edabit works.