Hi I have two lists list1 and list2 I want to extract all values that exist in list1 and don’t exist in list2. I tried this code: Read more
Quereact Latest Questions
Poll Results
Please login to vote and see the results.
Participate in Poll, Choose Your Answer.
Which sentence is correct to use ?:“If I was” or “If I were”? or Both are correct

Poll Results
Please login to vote and see the results.
Participate in Poll, Choose Your Answer.

What is your greatest weakness in english? You can choose multiple answers.
You can simly use a for loop with append to list. list1 = ['lion', 'dog', 'cat', 'tiger', 'cat', 'cat', 'zebra'] list2 = ['monkey', 'tiger', 'cow', 'mouse'] my_list = [] for animal in list1: #iterating over list1 if animal not in list2 and animal not in my_list: my_list.append(animal) #add item to tRead more
You can simly use a for loop with append to list.
[crayon-6843c047bc66f334094710/]
[crayon-6843c047bc673791851331/]
kind regards
See less