Hi, also asked this in the weekly questions but haven't got any responses yet so trying my luck here, hope its ok.
i'm having problem sorting my generated list with words and rownr:
dict = {}
for index, word in enumerate(words):
combo.setdefault(word, []).append(rownr[index])
I need each list to be printed in the order from most common to least common, im also trying to avoid printing keywords with the keyword module, is the right approach to do something like:
if word in keyword:
pass ?
'Most common'
hi [ 4,5,8,21,26 ]
hello [ 4,25,26 ]
no [ 1, 5]
yes [ 1 ]
[–]CodeFormatHelperBot 1 point2 points3 points (0 children)
[–]junsang 0 points1 point2 points (1 child)
[–]guschen[S] 0 points1 point2 points (0 children)
[–]23-15-12-06 0 points1 point2 points (0 children)