Python Forum
How to remove space between strings - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/Forum-Python-Coding)
+--- Forum: General Coding Help (https://python-forum.io/Forum-General-Coding-Help)
+--- Thread: How to remove space between strings (/Thread-How-to-remove-space-between-strings)



How to remove space between strings - sunnyarora - May-03-2019

Hi there,
how can we remove space if there is a space between values in a string.
for example
'abcdef @gmail.com'



RE: REMOVING SPACE BETWEEN THE STRING - Prince_Bhatia - May-03-2019

a = 'abcdef @gmail.com'
dm = a.replace(" ","")
print(dm)



RE: REMOVING SPACE BETWEEN THE STRING - perfringo - May-03-2019

.join method can do the trick.

And please - no more capslock. My eyes and ears are hurt.