How to rid of spaces in line, python

st = " with, or,  without ,  spaces            ";
st = st.replace(" ","")
print(st)
with,or,without,spaces

Leave a Comment