joshvm
searching PlanetScale…
- 1.▲
- 2.▲
- 3.▲
- 4.▲
- 5.▲
- 6.▲
156 ms·
- 1471.▲
- 1472.▲
- 1473.▲
- 1474.▲
- 1475.▲
- 1476.▲
- 1477.▲
- 1478.▲
- 1479.▲
- 1480.▲
- 1481.▲
- 1482.▲
- 1483.▲
- 1484.▲
- 1485.▲
- 1486.▲
- 1487.▲
- 1488.▲
- 1489.▲
- 1490.▲
- 1491.▲
- 1492.▲
- 1493.▲
- 1494.▲
- 1495.▲
- 1496.▲
- 1497.▲
- 1498.▲
- 1499.▲
I thought it seemed odd that Python supported the AND operator on lists, but it doesn't. You do need to convert to a set first, e.g. [1,2,3] & [1,2]
gives a TypeError, while set([1,2,3]) & set([1,2])
gives set([1, - 1500.▲
More ›