Really stuck here and need some advice please....
I have a list ...
transposedlist = [('-', '*', '*', '1'), ('7', '6', '6', '1'), ('-', '*', '1', '*'), ('-', '*', '*', '*'), ('1', '3', '3', '*'), ('-', ' ', ' ', '*'),
each group in the transposedlist above represents a column in a Matrix.
I would like to delete any group which contains NO numbers.
Heres my attempt thus far...
for i, group in enumerate(Listoflists):
if "-" in group[1:] == group[:-1] or "*" in group[1:] == group[:-1] or group[1:] None == group[:1]:
Matrix.DeleteColumn(i)
The code above checks of the 1st item is the same as the last item in the group, if it is then it should delete the column, this is not ideal obviously because it ignores the items in the middle.
Any suggestions?