I have string:
lote1 = 'GO, DF, MS'
lote1.strip()
print(lote1)
GO, DF, MS
I need:
GO,DF,MS
I have string:
lote1 = 'GO, DF, MS'
lote1.strip()
print(lote1)
GO, DF, MS
I need:
GO,DF,MS
 
    
     
    
    Try the following:
''.join(line.split())
 
    
    The question is too vague.
Just in case you need just to strip space both at the beginning and the end of comma-delimited strings:
> s = "   foo bar bar  baar  ,   foo bar , foo bar bar bar "
> ",".join(x.strip() for x in s.split(","))
'foo bar bar  baar,foo bar,foo bar bar bar'
