In this program, we will take two lists as input. Find the difference between two lists with the help of the below-given steps.
Difference between two lists:
Steps to solve the program
- Take two lists as input.
- Print the elements from the list1 who are not in list2.
- Use for loop and an if statement for this purpose.
Output :
Related Articles
Python program to reverse each element of the list.
Python program to combine two list elements as a sublist in a list.
Python program to get keys and values from the list of dictionaries.
Python program to get all the unique numbers in the list.
Python program to convert a string into a list.
Python program to replace the last and the first number of the list with the word.