← Back to challenges

Type of Value

PythonHardstringsvalidation

Instructions

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

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Even All the Way