Why doesn't this code return anything?

a = 333

def number_length(a: int) -> int:
return len(str(a))

>>> def number_length(a: int) -> int:
	return len(str(a))

>>> number_length(a)
3
>>> b = "333"
>>> number_length(b)
3
>>> 
3 Likes

You need to call the function for it to return the length of the variable