The strip() method returns a copy of the string by removing both the leading and the trailing characters (based on the string argument passed). For example, on your work case strip() would work on something like:
y = ',This is string, should be without commas, but is not working ,'
x = y.strip(',')
print(x)
This is string, should be without commas, but is not working
This will get you what you need:
y = 'This is string, should be without commas, but is not working'
x = y.replace(',','')
Which outputs:
print(x)
This is string should be without commas but is not working