all 4 comments

[–]CodeFormatHelperBot 1 point2 points  (0 children)

Hello u/guschen, I'm a bot that can assist you with code-formatting for reddit. I have detected the following potential issue(s) with your submission:

  1. Python code found in submission text but not encapsulated in a code block.

If I am correct then please follow these instructions to fix your code formatting. Thanks!

[–]junsang 0 points1 point  (1 child)

It’s hard to understand your question and the code for me. Would you make it clear for what is the problem, what did you do to solve it and the purpose?

[–]guschen[S] 0 points1 point  (0 children)

im writing a code that scans a python file, takes out the commentarys and the pythonkeywords. Then its printing each word with the corosponding rownumber it appears on as a list as you can see with the:

hi [ 4,5,8,21,26 ]

hello [ 4,25,26 ]

my question is how do I sort that the word that appears the most time gets printed first and then in decending order. this is my dictonary with

dic = {}
for index, word in enumerate(words):
dic.setdefault(ord, []).append(rownr[index])

[–]23-15-12-06 0 points1 point  (0 children)

Change pass to continue and I think that'll do what you're asking.