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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -