73416/how-remove-the-white-spaces-from-the-string-aaa-bbb-ccc-ddd-eee
Can anyone help me, how to remove the white spaces from the string mentioned above?
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’
You can use the strip method to do ...READ MORE
You can do it as follows: idx = ...READ MORE
If you are talking about the length ...READ MORE
following way to find length of string x ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
Hi, @Roshni, Try running the following piece of ...READ MORE
Strings in Python are immutable (can't be changed). Because ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.