Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to find the value of bool

x =[1,2,3,4,5,6]
y = [1,2,3,4,5]
if x == y:
    print("Numbers found")
else:
    print("Numbers not found")

I want to print the numbers which are not present in list y.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You can do like this:

x = [1,2,3,4,5,6]
y = [1,2,3,4,5]

for i in x:
    if i not in y:
        print(i)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading