Hi there,
how can we remove space if there is a space between values in a string.
for example
how can we remove space if there is a space between values in a string.
for example
'abcdef @gmail.com'
How to remove space between strings
|
Hi there,
how can we remove space if there is a space between values in a string. for example 'abcdef @gmail.com' a = 'abcdef @gmail.com' dm = a.replace(" ","") print(dm)
May-03-2019, 11:44 AM
.join method can do the trick.
And please - no more capslock. My eyes and ears are hurt.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame. |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Trying to understand strings and lists of strings | Konstantin23 | 2 | 1,819 |
Aug-06-2023, 11:42 AM Last Post: deanhystad |
|
Remove a space between a string and variable in print | sie | 5 | 2,941 |
Jul-27-2022, 02:36 PM Last Post: deanhystad |
|
Splitting strings in list of strings | jesse68 | 3 | 2,629 |
Mar-02-2022, 05:15 PM Last Post: DeaD_EyE |
|
from global space to local space | Skaperen | 4 | 3,230 |
Sep-08-2020, 04:59 PM Last Post: Skaperen |
|
How to give space when concaneting strings | deshanish | 1 | 2,035 |
Jul-15-2020, 03:08 AM Last Post: bowlofred |
|
Remove space after random.randrange(1, 11) | rs74 | 4 | 3,228 |
Jun-06-2020, 07:46 AM Last Post: rs74 |
|
Finding multiple strings between the two same strings | Slither | 1 | 3,298 |
Jun-05-2019, 09:02 PM Last Post: Yoriz |
|
lists, strings, and byte strings | Skaperen | 2 | 5,038 |
Mar-02-2018, 02:12 AM Last Post: Skaperen |