I am trying to use list comprehension to filter this list:
inp = [['Fire 46.0.1', 'vlc 2.2.3','opt 0.9.9.10'],
['opt 0.9.9.11', 'notepad 6.9', 'adobe. 6.9', 'vlc 2.3.3']]
into
out = [['Fire 46.0.1', 'vlc 2.2.3',],
['notepad 6.9', 'adobe. 6.9', 'vlc 2.3.3']]
i.e. removing all the strings that start with 'opt'. I am trying something like
[soft for ls in inp if soft not soft.startswith('opt')]
But something is wrong with the syntax. Any help?