Python Saved Program: placid-life

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


# Python program to display all the prime numbers within a given range

list1  = ["guru", "prasad", "pavan", "vijay"]
list2 = ["vijay","samba","mohan","pavan"]

for i in range(len(list1)):
    for j in range(len(list2)):
        if(list1[i]==list2[j]):
            print "common elements are:" + list1[i]
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs