Chalarangelo / 30-seconds-of-python

Short Python code snippets for all your development needs
https://www.30secondsofcode.org/python/p/1
Creative Commons Attribution 4.0 International
8.83k stars 1.26k forks source link

Use built-in set intersection #338

Closed psyonara closed 4 years ago

psyonara commented 4 years ago

Use the intersection operator of sets to get elements contained in both lists.