xaos_xv
xaos_xv

Reputation: 769

Python3 - Make space after each word in mixed string

I've got a string:

SzczęśliwyNumereknadzień06październikato:

and I want to make a space after each word. So the final result should look like this:

Szczęśliwy Numerek na dzień 06 października to:

How can I reach that?

Here is my original string:

    Szczęśliwy Numerek na dzień 
    06 października 
    to:

Later I removed whitespace, so my string was looking like that:

SzczęśliwyNumereknadzień
06października
to:

And after that, I converted it to one line string, and it's now looking like this:

SzczęśliwyNumereknadzień06październikato:

Upvotes: 0

Views: 63

Answers (1)

whackamadoodle3000
whackamadoodle3000

Reputation: 6748

Try this.

string="""                            Szczęśliwy Numerek na dzień 
                            06 października 
                            to:
"""
strings=' '.join(string.split())

Upvotes: 1

Related Questions