$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #150

Fill the blank

# guard: only numbers allowed
if not ____(v, (int, float)):
    raise TypeError

Answer: isinstance (also accepted: isinstance, isinstance())

isinstance() checks a value against a type or tuple of types.
Play Problem Solving ▸