[Python] how to remove spaces in between of a string in python?

Discussão em 'Python' iniciado por Stack, Julho 13, 2025.

  1. Stack

    Stack Membro Participativo

    Suppose I have a string : ' Swarnendu Pal is a good boy ' Here I want to remove all the spaces in between the strings, that means the leading and the last spaces should be remain same but all other spaces should be removed. My final expected output will be : ' SwarnenduPalisagoodboy '

    Continue reading...

Compartilhe esta Página