Type of Value

Published by NoisNette 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([]) ➞ "list"

get_type(None) ➞ "NoneType"

Notes

N/A

Watch a quick demo on how Edabit works.