if
original = 'MK320MK180FM340SH230LL2HHH22TGF22',
Then I have stripped a string list such that looks like this (string --> tuple):
list = {('MK320',), ('MK180',), ('FM340',), ('SH230',), ('LL2',), ('HHH22',), ('TGF22',)}
I want to get rid of the comma inside the parentheses. That is, I want to make these tuples to be string back again. What I did was:
for i in range(len(list)):
''.join(list[i])
But it didn't get any better. Then I wanted to pass this to a different command, which is Counter. However, that actually included Counter{(blabla)}, which I didn't really like. What I wished to get a result as a dictionary, looking like this:
{('MK320': 1, 'MK180': 1, 'FM340': 1, 'SH230': 1, 'LL2': 1, 'HHH22' : 1, 'TGF22': 1}
Which eventually counts the frequency of each product name.