Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.
from collections import Counter from string import ascii_uppercase as letters def gen(L): c = Counter(L) for elt, count in c.items(): if count == 1: yield elt else: for letter in letters[:count]: yield elt + letter
>>> L = ['T1','T2','T2','T2','T2','T3','T3'] >>> list(gen(L)) ['T2A', 'T2B', 'T2C', 'T2D', 'T3A', 'T3B', 'T1']
Join the community of 500,000 technology professionals and ask your questions.