Skip to content

Instantly share code, notes, and snippets.

@bcuz
Created October 28, 2016 16:27
Show Gist options
  • Save bcuz/355c3c48c14c805a8219d3d43975a9d2 to your computer and use it in GitHub Desktop.
Save bcuz/355c3c48c14c805a8219d3d43975a9d2 to your computer and use it in GitHub Desktop.
list = [1, 2, 3]
list2 = [3]
for n in list:
if n in list2:
del list2[list2.index(n)]
if len(list2) == 0:
print "all numbers in list 2 appear in list"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment