I have a list that is pulled into python from Google Sheets. Some of the cells are empty and return a value of None.
I checked the class type for these \'None\' values a
for i, val in enumerate(some_list):
if val is not None:
print (i,val)
If you wish to skip None and blank values:
for i, val in enumerate(some_list):
if val is not None and val != "":
print (i,val)
In case, when gapes in i
are not needed:
for i, val in enumerate([x for x in some_list if x]):
...