Created
May 5, 2013 21:21
-
-
Save Caleb2501/5522224 to your computer and use it in GitHub Desktop.
This one was too easy. Although, I am kind of glad after that last one!
This file contains 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
#Write a program that will compare two lists, | |
# and append any elements in the second list that doesn't exist in the first. | |
# this was ridiculously easy. | |
list1 = ['caw', 'tweet', 'chirp', 'quack'] | |
list2 = ['tweet', 'chirp', 'hoo', 'cheep'] | |
for s in list1: | |
if s not in list2: | |
list2.append(s) | |
print "Here is a full list of bird calls that I know:" | |
print list2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment