How to remove the white spaces from the string aaa bbb ccc ddd eee

0 votes

Can anyone help me, how to remove the white spaces from the string mentioned above?

Jun 26, 2020 in Python by Roshni
• 10,520 points
1,541 views

1 answer to this question.

0 votes

Hi, @Roshni,

You can do it Using join, read the code below:

s='aaa bbb ccc ddd eee'

s1=''.join(s.split())

s1

Output

‘aaabbbcccdddeee’
answered Jun 26, 2020 by Gitika
• 65,890 points
thank u so much bro

Related Questions In Python

0 votes
1 answer

How to remove blank spaces from Python string?

You can use the strip method to do ...READ MORE

answered Apr 4, 2019 in Python by Rishi
1,069 views
0 votes
1 answer
0 votes
1 answer

How to get the size of a string in Python?

If you are talking about the length ...READ MORE

answered Jun 4, 2018 in Python by aryya
• 7,460 points
1,357 views
–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

answered Mar 29, 2019 in Python by rajesh
• 1,270 points
2,064 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,397 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,004 views
0 votes
1 answer

How to remove the last object from a list?

Hi, @Roshni, Try running the following piece of ...READ MORE

answered Jun 26, 2020 in Python by Gitika
• 65,890 points
774 views
0 votes
1 answer

How to Remove specific characters from a string in Python?

Strings in Python are immutable (can't be changed). Because ...READ MORE

answered Jan 5, 2021 in Python by Gitika
• 65,890 points
931 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP