Hi I'm trying to do a Roman to integer leetcode problem, I did everything I assigned a value to everything and with a map function and I get the exact letter, the input is like this
Input: s = "LVIII" Output: 58 Explanation: L = 50, V= 5, III = 3.
the problem is I get the letters as a string like ['L']['V']['I']['I']['I'] How can I make the "L" as a string to be The variable that is assigned a value of 50
I = 1
V = 5
X = 10
L = 50
C = 100
D = 500
M = 1000
s = "LVIII"
length = len(s)
numbers = list(map(list, s))
x = 0
while x < length:
print(numbers[x])
x = x + 1