trident.roman.from_roman

trident.roman.from_roman(s)[source]

Convert a Roman numeral to an integer.

Parameters

S

string

String representing Roman numeral. Examples: ‘I’, “II’, ‘XI’, “MCMXC”.

Returns

Integer value equivalent to s Roman numeral argument.

Example

>>> num = from_roman('V')