Created
October 28, 2016 16:27
-
-
Save bcuz/355c3c48c14c805a8219d3d43975a9d2 to your computer and use it in GitHub Desktop.
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
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