Link to home
Start Free TrialLog in
Avatar of ScriberUK
ScriberUK

asked on

Python, how can I remove whitespaces from a string?

How can I remove whitespaces from a string (two examples below) so that they just have one whitespace between the words or no whitespaces if applied to the third example?

1. 'The       International Association for Computing'
2. 'From    Qubit'
3. '    Test'

Cheers,
ASKER CERTIFIED SOLUTION
Avatar of LunarNRG
LunarNRG
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of HonorGod
HonorGod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ScriberUK
ScriberUK

ASKER

Thank you all for your help. I have now read up on join, split and re ;)
Thank you for the assist, and the points.

Good luck & have a great day.