How can I convert the string (s) into required string (ans)? This is simple string manipulation in python.
s = '(107, 163, 138, 255)'
ans = '(107,163,138,255)'
How can I convert the string (s) into required string (ans)? This is simple string manipulation in python.
s = '(107, 163, 138, 255)'
ans = '(107,163,138,255)'
Use the replace method to replace the whitespace with nothing:
>>> s = '(107, 163, 138, 255)'
>>> s.replace(" ", "")
'(107,163,138,255)'