I have a list of several lists letters. Each letter correspond to a number.
h = 1
w = 2
wh = 3
list = [["w, w, h, w, w, w, h"], ["w, h, w, w, h, wh, h"]]
I need to the list of letters to print:
print(list[0])
>> w, w, h, w, w, w, h
Then I need to strip the quotes away so I can get
print(stripped_list)
>>2, 2, 1, 2, 2, 2, 1
I'm getting an error when I try the string method (strip, replace, etc). Is there another method or a better way of displaying my info to get both the original letters as well as a list of the corresponding numbers. Thank you.