Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7562243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:22:03+00:00 2026-05-30T13:22:03+00:00

For Example, i Have 3 lists list1=[‘Oh’,’My’,’god’,’I’,’A’,’List!’] list2=[‘Oh’,’What’,’You’,’Dramatic?’] Keyword=[‘I’,’Dunno’,’What’,’You’,’Talking’,’About’,’DOT’] EDIT I Want to compare

  • 0

For Example, i Have 3 lists

list1=['Oh','My','god','I','A','List!']

list2=['Oh','What','You','Dramatic?']

Keyword=['I','Dunno','What','You','Talking','About','DOT']

EDIT

I Want to compare keywords with list 1 and 2 separately. so it would become:

EDIT

common=['What','I','You']

What if i had more than 10 lists? <– optional question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:22:04+00:00Added an answer on May 30, 2026 at 1:22 pm

    Since your comment indicates that you want items that exist in both Keyword and either list1 or list2, you probably don’t want an intersection of all three. Instead you should get the union of list1 and list2, and then get the intersection of that result and Keyword.

    Something like the following should give you what you want:

    common = list((set(list1) | set(list2)) & set(Keyword))
    

    Or an alternative approach that is more extensible (thanks to Karl for the shortened version):

    lists = [list1, list2, list3, list4, list5, list6, list7, list8, list9, list10]
    common = list(set().union(*lists).intersection(Keyword))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have lists where strings correspond with values. For example, in a company list
Possible Duplicate: Python, compute list difference I have two lists For example: A =
I have two lists of entities. Imagine list1 is remote and list2 is local
For example, I have a list like this: list1 = ['good', 'bad', 'tall', 'big']
Let's assume I have 2 List<T> List1 and List2 that look like this: List
Just some example code here, but I have lists of strings that I want
For example, I have two lists of the same length: a = [[1,2],[2,2],[3,3],[4,2],[5,6]] b
I have an application that makes use of frequently updated lists. So for example,
How to sort list of date object ? For example I have unsorted list
I have List where myObj has it own list of objects called example mySubObj.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.