I have the following list:
poly = ['rs1', 'rs1', 'rs2', 'rs2', 'rs3', 'rs3', 'rs4', 'rs4', 'rs5', 'rs5']
All I need is to add a underscore to duplicate values, in order to get something like this:
['rs1', 'rs1_', 'rs2', 'rs2_', 'rs3', 'rs3_', 'rs4', 'rs4_', 'rs5', 'rs5_']
I've checked some similiar public questions but only menage to add a number after each value (therefore getting something like:
['rs11', 'rs12', 'rs21', 'rs22', 'rs31', 'rs32', 'rs41', 'rs42', 'rs51', 'rs52']
which is definitely far from my aim).
Any ideas?
Thank you.