Re: list comprehension

2019-02-21 Thread Joan Pujol Tarrés
>> >> Example 1: {l for l in L} >> >> Example 2: {(k, x) for k in K for x in X if P(x)} >> >> >> >> This is another example in Python: >> >> >> >> s = {v for v in 'ABCDABCD' if v not in 'CB'} >> >> >> >> https://

Re: list comprehension

2019-02-21 Thread Joan Pujol Tarrés
>> >> Example 1: {l for l in L} >> >> Example 2: {(k, x) for k in K for x in X if P(x)} >> >> >> >> This is another example in Python: >> >> >> >> s = {v for v in 'ABCDABCD' if v not in 'CB'} >> >> >> >> https://