title: Convert python dictionary to uppercase
body: <p>For some reason my code refuses to convert to uppercase and I cant figure out why. Im trying to then write the dictionary to a file with the uppercase dictionary values being inputted into a sort of template file. </p>
  
  <pre><code>#!/usr/bin/env python3
  import fileinput
  from collections import Counter
  
  
  #take every word from a file and put into dictionary
  newDict = {}
  dict2 = {}
  with open('words.txt', 'r') as f:
          for line in f:
              k,v = line.strip().split(' ')
              newDict[k.strip()] = v.strip()
  print(newDict)
  choice = input('Enter 1 for all uppercase keys or 2 for all lowercase, 3 for capitalized case or 0 for unchanged \n')
  print("Your choice was " + choice)
  
  if choice == 1:
      for k,v in newDict.items():
          newDict.update({k.upper(): v.upper()})
  if choice == 2:
      for k,v in newDict.items():
          dict2.update({k.lower(): v})
  
  
  #find keys and replace with word
  
  print(newDict)
  with open("tester.txt", "rt") as fin:
      with open("outwords.txt", "wt") as fout:
          for line in fin:
              fout.write(line.replace('{PETNAME}', str(newDict['PETNAME:'])))
              fout.write(line.replace('{ACTIVITY}', str(newDict['ACTIVITY:'])))
  
  myfile = open("outwords.txt")
  txt = myfile.read()
  print(txt)
  myfile.close()
  </code></pre>