list check in python code example
Example 1: check if list of list python
for item in list_of_lists:
isinstance(item, list)
Example 2: how to check an element in a list in python
thislist = ["apple", "banana", "cherry"]
if "apple" in thislist:
print("Yes, 'apple' is in the fruits list")