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 just tested your code. The issue is with this line:
iflen(score)<2:return0
Remove that line and your code passes the tests.
Also, for efficiency, there is no need for the i += 1, since the for loop automatically increments i. You could also iterate directly through the scores instead of having to rely on using a range for index numbers. The parent example uses this method.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
I just tested your code. The issue is with this line:
Remove that line and your code passes the tests.
Also, for efficiency, there is no need for the
i += 1
, since the for loop automatically increments i. You could also iterate directly through the scores instead of having to rely on using a range for index numbers. The parent example uses this method.