i need some help.
I have dynamic string like this:
S31
S4
S2M1L10XL8
S1M2L0XL0
S0M5L6XL8
and need change it to key value like:
{"S":31}
{"S":4}
{"S":2, "M":1, "L":10, "XL":8}
{"S":1, "M":2, "L":0, "XL":0}
{"S":0, "M":5, "L":6, "XL":8}
I try with
new_string = re.findall('(\d+|[A-Za-z]+)', string)
but can't find hoe to solve