How to remove all white spaces in a string in Python

preview_player
Показать описание
If you want to truly remove any space in a string, leaving only the characters, the best solution is to use a regular expression.

You can also read about it if you prefer on:

📚 Buy my book Python Fundamentals

👍 Please leave a LIKE and SUBSCRIBE for more content! 👍

⭐️ Tags ⭐️
- Python

#️⃣ Hashtags #️⃣
#Python
Рекомендации по теме
Комментарии
Автор

Thankyou very much.
I have been trying to solve this problem using the same functio but with "_" as first option

edsonsabino
Автор

why did'nt we use feature rstrip() ?

fevzik
Автор

can anyone write that code in comment so that i can copy paste

NIKKI-dtfu