Last active
June 23, 2017 07:37
-
-
Save ls404/8d42790834730de7d0b5fc3b0392d301 to your computer and use it in GitHub Desktop.
Find dublicates in two python lists.Easy but not effective solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def dub(li, li1: list): | |
| #find dublicates in two list, easy but not effective solution | |
| print(set(li) & set(li1)) | |
| dub(["a","b","c","c","d","d","c","f","l"],["a","b","a"]) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/1388818/how-can-i-compare-two-lists-in-python-and-return-matches