I have a list of names, like this
names =['Jack','Jerry',Jerry','Jerry','Jerry','Jerry','Phillips','Phillips','Phillips','Phillips','Harry','Harry','Harry','Harry','Harry'.....]
I want to rename duplicates as the resulting list should be like
names = ['Jack','Jerry',Jerry_2','Jerry_3','Jerry_4','Jerry_5','Phillips','Phillips_2','Phillips_3','Phillips_4','Harry','Harry_2','Harry_3','Harry_4','Harry_5'.....]
i have tried codes but my logic isn't well, is there anyone who can help me?