[Solved] Strip method at Python doesn’t clear all


It strips the first two ‘[‘, it seems you have one long string, you have to split it first.

datalist = data.split[',']
for x in datalist:
    # code here

If you don’t want to split it and have it all in one string you need replace not strip (strip only works at the end and the beginning.

data = data.replace('[','')

2

solved Strip method at Python doesn’t clear all