In python, given a string, create a new string with all the consecutive duplicates removed
Example: Input: AAABBBBCDDBBECE Output: ABCDBECE can anyone help me to solve this?
Ashir Rahman You have to try it out first. It is a good way of learning. If you have, then link your code here.
Hint: use a for loop and append current char in new list if it's not like prev char Join the new list
Aman Kumar Please make sure your code is working right before posting answers😃😃