isinstance can be used to check if the object which is the first argument is an instance or subclass of classinfo class which is the second argument.
a = 1
b = [1]
isinstance(a,list)
isinstance(b,list)
Is there a similar way to check if an operator validate in Python? Something like
isoperator('=')
isoperator(':=')
isoperator('<-')
I am trying to build an online executor for Python very beginner.
When they input like this
they would get a hint, the operator is not supported rather than current error message.