To display the same number of character iterations

Asked 2 years ago, Updated 2 years ago, 37 views

Why is there an error? The list is empty.I don't think you made the list empty;;;;

;;;;

If a string is entered and the same character is repeated consecutively To compress and display a string by displaying the number of iterations ''' Input example: aaabbxxxxxa Output example: a3b2x6a1 '''

python string

2022-09-21 21:31

1 Answers

Looking at the error phrase pop from empty list, The list is empty, but I think there was an error trying to pop it.

Please make an exception when the list is empty.


2022-09-21 21:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.