top of page
Writer's pictureDavid Bolis

How To Compare The values of Two Lists In Python

Welcome Back Everyone in this Quick Tutorial I will be Showing You How to compare the values of Two Lists in Python. For This Tutorial You can Either Watch The detailed step by step Video, or simply Copy the Code Snippet Below.


 

Comparing The Values Of Two Lists in Python



a = [1, 2, 4, 1, 5, 6, 7, 8, 9, 10]
b = [2, 1, 5, 3, 6, 0, 55, 9, 10]
c = []

for number in a:
    if number in b:
       if number not in c:
          c.append(number)
print(c)

 



 

Please Feel Free To View the Rest of my Youtube Channel to view Detailed Youtube Tutorials on Python and Mobile Development in IOS and Android.

15 views1 comment

Recent Posts

See All

How to perform web scrapping via Python

Learn how to create your very own web scraping tool using #python with this comprehensive tutorial. Web scraping has become an essential sk

1 則留言


themadogstudio
2020年6月26日

Great Start

按讚
bottom of page