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.
why did you use sorted(scores)[1], why not [-2]
We need 2nd highest right? then if we sort then [-2] will be the second highest
could you please explain it to me brother 🤔
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 →
why did you use sorted(scores)[1], why not [-2] We need 2nd highest right? then if we sort then [-2] will be the second highest could you please explain it to me brother 🤔