0

How to remove space in a string in python

Eg: Iam proud to - Iamproudto

30th Jan 2021, 2:33 PM
Akshay H
Akshay H - avatar
5 Answers
+ 5
Just replace spaces with empty strings.
30th Jan 2021, 2:37 PM
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~ - avatar
30th Jan 2021, 2:38 PM
Noobmaster
Noobmaster - avatar
+ 2
str = "I am proud to".replace(" ","") print(str)
30th Jan 2021, 2:38 PM
visph
visph - avatar
+ 2
Replace spaces with empty strings. It will works.
31st Jan 2021, 12:00 AM
â€ïžđŸ˜PreranađŸ˜â€ïž
â€ïžđŸ˜PreranađŸ˜â€ïž - avatar
30th Jan 2021, 2:43 PM
Akshay H
Akshay H - avatar