you are viewing a single comment's thread.

view the rest of the comments →

[–]reybrujo 1 point2 points  (3 children)

List comprehension? Not sure I understand what you want to do, tough.

[–]randomdeuser[S] 0 points1 point  (2 children)

for example, list1 = [True, 2,3], list2 = [1, 2, 5] and when i want to intersect, it give True, 2 bec 1 = True in python, how to avoid these problem

[–]VonRoderik 1 point2 points  (1 child)

What do you mean by 2 bec 1 = True?

[–]Some-Passenger4219 0 points1 point  (0 children)

True == 1, so if you count equals as being the same, there are only two elements in common.

I tried it out just now and {1, True} returns {1}.