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 that:
[soft for ls in inp if soft not soft.startswith('opt')]
but something is wrong with the sintax.Any help?
