check if object in array python code example
Example 1: if string is in array python
if item in my_list:
# whatever
Example 2: check if object is array like python
if hasattr(N, "__len__")
if item in my_list:
# whatever
if hasattr(N, "__len__")