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,480 points
1,561 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,770 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,089 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,373 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,107 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,434 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,070 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,770 points
797 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,770 points
951 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