Suppose I have a csv file looks like:
(a,3,,,,)
(b,,,,,)
(c,2,,,,)
(d,,,,,)
(e,,,,,)
(f,1,,,,)
(g,,,,,)
I am trying to find out which alphabet (i.e a,b,c,d,e,f,g) has a value in column (let's say column 1 here).
The code I've written is here:
set3 = set([n[column] for n in new_marks])
if set3 != '':
print
print '{0} is not empty'.format(list(set3))
This code only prints value in column 1 not alphabets...
Can anyone help me with figuring out this problem?
Thank you
set3, being a set, is never going to equal the empty string.