parameters: (self, s)
return_statement: return result + roman[s[-1]]
docstring: :type s: str
          :rtype: int
docstring_summary: :type s: str
          :rtype: int
docstring_tokens: : type s : str : rtype : int
function: def romanToInt(self, s):
          """
          :type s: str
          :rtype: int
          """
          roman = {'M': 1000,'D': 500 ,'C': 100,'L': 50,'X': 10,'V': 5,'I': 1}
          result = 0
          for i in range(0, len(s) - 1):
              if roman[s[i]] < roman[s[i+1]]:
                  result -= roman[s[i]]
              else:
                  result += roman[s[i]]
          return result + roman[s[-1]]
function_tokens: def romanToInt ( self , s ) : roman = { 'M' : 1000 , 'D' : 500 , 'C' : 100 , 'L' : 50 , 'X' : 10 , 'V' : 5 , 'I' : 1 } result = 0 for i in range ( 0 , len ( s ) - 1 ) : if roman [ s [ i ] ] < roman [ s [ i + 1 ] ] : result -= roman [ s [ i ] ] else : result += roman [ s [ i ] ] return result + roman [ s [ - 1 ] ]