Type of Value

Published by Mubashir Hassan in

Create a function that takes a value as an argument and returns the type of this value.

Examples

get_type(1) ➞ "int"

get_type("a") ➞ "str"

get_type(true) ➞ "bool"

get_type([]) ➞ "array"

Notes

N/A

Watch a quick demo on how Edabit works.