We will take two lists as input & iterate all the values one by one with the python loop with the help of the below-given steps. Print True if there are any common elements between lists.
Common elements between lists:
Steps to solve the program
- Take two lists as input.
- Use a for loop to iterate over elements in the first list.
- Using an If statement check whether an element exists in both lists or not.
- If yes print True.
Output :
Related Articles
Python program to print a specific list after removing the 1st, 3rd, and 6th elements from the list.
Python program to remove negative values from the list.
Python program to get a list of all elements which are divided by 3 and 7.
Python program to check whether the given list is palindrome or not.
Python Program to get a list of words which has vowels in the given string.
Python program to add 2 lists with extend method.