Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lists union and intersecion
#5
Hi buran

Thank you for your help. This exactly what I am looking for.

However I do not understand
Quote:you need to use list comprehension or loop
when I see that
result2 = set(dia).intersection(set(mots))
leads to the intersection of the sets.

Arbiel
Reply


Messages In This Thread
Lists union and intersecion - by arbiel - Mar-27-2020, 05:51 PM
RE: Lists union and intersecion - by buran - Mar-27-2020, 05:53 PM
RE: Lists union and intersecion - by arbiel - Mar-27-2020, 08:00 PM
RE: Lists union and intersecion - by buran - Mar-27-2020, 08:21 PM
RE: Lists union and intersecion - by arbiel - Mar-27-2020, 11:01 PM
RE: Lists union and intersecion - by buran - Mar-28-2020, 05:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Inheritance vs Union gserranowong 3 2,364 Jun-29-2021, 06:13 PM
Last Post: gserranowong
  ImportError: cannot import name 'Union' from '_ctypes' (unknown location) ciuffoly 15 10,692 Oct-09-2020, 06:58 AM
Last Post: ciuffoly
  Split dict of lists into smaller dicts of lists. pcs3rd 3 2,520 Sep-19-2020, 09:12 AM
Last Post: ibreeden
  sort lists of lists with multiple criteria: similar values need to be treated equal stillsen 2 3,399 Mar-20-2019, 08:01 PM
Last Post: stillsen
  Union of dictionaries (taking max value on collision) meee 5 3,894 Jan-17-2018, 09:14 PM
Last Post: Mekire

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020