title: Suggestions on how to improve script
body: <p>can you kindly give me feedback about this small Python script. If you can suggest a better way to accomplish the conversion from Roman numeral to integer, please let me know. No error handling yet for simplicity. Thank you very much.</p>
  
  <pre><code>#Script to convert Roman numeral to Integer.
  #Note no error handling yet for simplicity.
  
  def roman(mystring):
      roman_dict = {'I':'1',
                    'V':'5', 
                    'X':'10',
                    'L':'50',
                    'C':'100',
                    'D':'500',
                    'M':'1000'}
      x = roman_dict[mystring]
      return (x)
  
  def get_myinput(myinput):
      sum = 0
      char_before = ''
      for char in myinput:
          if char_before  == '':
              subtract = 0
              pass
          elif char_before == 'I' and (char == 'V' or char == 'X'):
              subtract = 1
          elif char_before == 'X' and (char == 'L' or char == 'C'):
              subtract = 10
          elif char_before == 'C' and (char == 'D' or char == 'M'):
              subtract = 100
          else:
              subtract = 0
              pass
  
          converted = int(roman(char)) - subtract
          sum = sum + int(converted) - subtract
          char_before = char
      return (sum)
  
  if __name__ == "__main__" :
      myinteger = get_myinput('MCMXCIV')
      print(myinteger)
  </code></pre>