• + 3 comments

    Hey Bruce!

    I am new to programming and have started with python. I like your code because i can comprehend it, but i am having difficulty understanding some parts of it. If you could help clarifying the concepts it'd be great:

    I dont understand this:

    xs = [x for x in top2 if x < score] + [score] + [x for x in top2 if x > score]
    

    First you mention x < score and then x > score, you consider both the cases (!) and how can you concat score in between. I'm like totally lost on this line. What is (xs[2], None) in:

    scores.pop(xs[2], None)
    

    What does (score,[]) + [name] do in:

    scores[score] = scores.get(score,[]) + [name]
    

    Thanks in advance!