def convertToDico(*mots): result = dict() for m in mots: num = mots.index(m) + 1 key = "Clé " + str(num) result[key] = m return result print( convertToDico("un","cheval","blanc") )