+ 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/
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
+ 9
So, where is your code?
+ 8
You can do it like this:
https://code.sololearn.com/cGapthz5b3D7/?ref=app
+ 4
Show your source code.
Or make the question a little clearer.đ
+ 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