How to see if an object of a particular type is in a Python list? -


how check specific object type in python list? example want check ast module object subscript or _ast.subscript in list l:

if subscript in l:     return true 

but has not been working. problem appreciated.

also object prints <_ast.subscript object @ 0x7ff7f7f7f7ff>

see below:

#if subscript instance of type if type(subscript) in map(type,l):     return true  # or if subscript type such class if subscript in map(type,l):     return true 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -