+ 5

list to list using python

Here are two examples: 1. ['a', 'b', 'c', 'b', 'a'] expected result is ['a', 'b', 'c', 'b_1', 'a_1']. 2. ['z', 'z', 'z', 'z', 'z'] expected result is ['z', 'z_1', 'z_2', 'z_3', 'z_4']. I have been trieng to solve it two days already/

29th Sep 2020, 8:09 PM
Andrey Shintar
Andrey Shintar - avatar
5 Answers
+ 7
Since you have been trying to solve it since two long days, try to get an idea from this code and implement it again on your own. https://code.sololearn.com/c7Epn1z2dh6z
29th Sep 2020, 8:31 PM
minirkk
minirkk - avatar
+ 9
So, where is your code?
29th Sep 2020, 8:11 PM
Alexander KovalđŸ‡§đŸ‡Ÿ
Alexander KovalđŸ‡§đŸ‡Ÿ - avatar
29th Sep 2020, 10:05 PM
Vitaly Sokol
Vitaly Sokol - avatar
+ 4
Show your source code. Or make the question a little clearer.🙏
29th Sep 2020, 8:17 PM
Light
Light - avatar
+ 2
RKK, useful advice, i've done so, thanks a lot! I also done it in lambda function, but it less convenient way in this case. https://code.sololearn.com/ctLlWrh8gkNd/?ref=app
30th Sep 2020, 7:38 AM
Andrey Shintar
Andrey Shintar - avatar