Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 3rd, 2020 162 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Jeffrey Zhang
  2. #March 10, 2020
  3. #Dictionaries
  4.  
  5. my_dictionary= {
  6.   'lol': 'laughing out loud',
  7.   'brb': 'be right back',
  8.   'btw': 'by the way',
  9.   'lmk': 'let me know',
  10.   'gtg': 'got to go',
  11.   'stfu': 'shut the freak up',
  12.   'smh': 'shaking my head',
  13.   'ikr': 'ikr know right'
  14. }
  15.  
  16. while True:
  17.   ask = input ("What do you want to do: get, add, delete, get entire dictionary ")
  18.   if ask == "get":
  19.     key = input ("What is the key? ")
  20.     print (my_dictionary.get(key, "Sorry, I could not find the definition"))
  21.   if ask == "add":
  22.     key = input ("What word would you like added? ")
  23.     value = input ("What definition do you want to go along with the key? ")
  24.     my_dictionary[key] = value
  25.     print (my_dictionary)
  26.   if ask == "delete":
  27.     key = input ("What would you like removed? ")
  28.     del my_dictionary[key]
  29.     print (my_dictionary)
  30.   if ask == "get entire dictionary":  
  31.     print (my_dictionary)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top