In Java the numeric types all descend from Number so I would use

(x instanceof Number).

What is the python equivalent?

5 Answers
5

Leave a Reply

Your email address will not be published. Required fields are marked *