We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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:
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!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all 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:
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:
What does (score,[]) + [name] do in:
Thanks in advance!