Alright, so I have a list of 296 data points and four blank spaces. I cannot edit this list of data points. i have another list of 300 data points. I want to multiply the lists together, with python skipping multiplying the data points when a blank space shows up. Here's what the lists look like:
a = [[6], [7], [], [7]]
b = [[100], [200], [300], [400]]
What sort of exception handling would I have to put in? My current code uses
for items in mathList:
try:
sumlist = [x * y for x,y in zip(grearp, rex)]
except:
print 'No data for',items