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,440 points
309 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,870 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
332 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,440 points
419 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,230 points
491 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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,033 views
0 votes
0 answers
+4 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,810 points
1,556 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,870 points
119 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 in Python by Gitika
• 65,870 points
80 views