[Solved] Python Form a List based from the values in dictionary


dictA = {"f1" : ["m"],
        "f2" : ["p","y","o","a","s","d","f","g"],
        "f3" : ["w","t"],
         "f5" : ["z","x"],
         "f6" : ["c","v"]}

result = []
limit_size = 3
values_list = []
for values in dictA.itervalues():
    values_list.append(len(values))

for i in range(0,max(values_list)):
    keys = list(dictA.keys())
    count = 0
    while count < len(keys):
        try:
            result.append(dictA[keys[count]][i])
        except IndexError:
            dictA.pop(keys[count])
        count = count + 1
print "final ",result[0:limit_size]

solved Python Form a List based from the values in dictionary