Created
January 9, 2017 02:47
-
-
Save leonchen417/84e68901f67486ef4035866b105683e0 to your computer and use it in GitHub Desktop.
null created by leonchen417 - https://repl.it/FDVs/35
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
drinks = { | |
'martini':{'vodka','vermouth'}, | |
'black russian' : {'vodka','kahlua'}, | |
'white russian' : {'cream','vodka','kahlua'} | |
} | |
bruss = drinks['black russian'] | |
wruss = drinks['white russian'] | |
#print(bruss|wruss) | |
things = ['robot','rocket','pizza'] | |
things2 =[] | |
''' | |
for element in things: | |
jk = str(element).capitalize() | |
things2.append(jk) | |
print(things2) | |
''' | |
surprise = ["Groucho","Chico","Harpo"] | |
things = [item.capitalize() for item in things] | |
#print(things) | |
surprise = [item.lower() for item in surprise] | |
surprise[2] = surprise[2][::-1] | |
surprise = [item.capitalize() for item in surprise] | |
#print(surprise) | |
e2f = {'dog':'chien','cat':'chat','walrus':'morse'} | |
#dict((value, key) for key, value in my_dict.iteritems()) | |
f2e = dict((value , key) for key, value in e2f.items()) # switch keys and values | |
#print(f2e.values()) | |
life = { | |
'animals':{'cat':['Henry','Grumpy','Lucy'],'octopi':[],'emus':[]}, | |
'plants':{}, | |
'others':{} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment