I have a list of dictionary :
list=[{'step' : '1' , 'name' : 'A'}]
and I want to check type of the value of step key in a if condition.
I have tried :
if (x=isinstance(list[0]['step'],str)) :
But i got this error :
TypeError: isinstance() arg 2 must be a type or tuple of types
Also I tried :
list[0]['step'].__class__ == str
but got an error as well. What is the right way to do it?