4 ms·
Something like this I find ok (just a filter): [x for x in y if x is not z] Sometimes though, facilitated by Jupyter's notebooks making executing as you b
by teekert 4y ago
Something like this I find ok (just a filter):
[x for x in y if x is not z]
Sometimes though, facilitated by Jupyter's notebooks making executing as you build the code very easy, I create a beast like this:
[os.path.join([x for x in y if x is not z]) + '/bin' for a in b if 'temp' not in a]
Yes this is fictional and probably contains an error but you get the point, you can filter lists of lists like this, but it's really unfriendly to anyone trying to understand it later.