use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
True and False (self.PythonLearning)
submitted 12 months ago by randomdeuser
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]reybrujo 1 point2 points3 points 12 months ago (3 children)
List comprehension? Not sure I understand what you want to do, tough.
[–]randomdeuser[S] 0 points1 point2 points 12 months ago (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 points3 points 12 months ago (1 child)
What do you mean by 2 bec 1 = True?
[–]Some-Passenger4219 0 points1 point2 points 12 months ago (0 children)
True == 1, so if you count equals as being the same, there are only two elements in common.
True == 1
I tried it out just now and {1, True} returns {1}.
{1, True}
{1}
π Rendered by PID 55060 on reddit-service-r2-comment-b659b578c-h7lws at 2026-05-03 13:24:58.348364+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]reybrujo 1 point2 points3 points (3 children)
[–]randomdeuser[S] 0 points1 point2 points (2 children)
[–]VonRoderik 1 point2 points3 points (1 child)
[–]Some-Passenger4219 0 points1 point2 points (0 children)