Ad
  • Custom User Avatar

    not for very large numbers

  • Custom User Avatar

    How is that best practice or clever? Why create a whole list if you can just find the first one that doesn't repeat and stop?

  • Custom User Avatar

    you don't need the else part

  • Custom User Avatar

    My question was: why I don't get the error when I run sample tests.

    (edit) I looked closer at the test cases. My mistake was that I assumed that they were the same as the sample tests (they do look very similar). I spotted the difference now, sorry, my bad :)

  • Custom User Avatar

    My solution (Python) works when I run sample tests but when I try to submit my code it throws an error already on the first test (which I assume is the same as the first sample test?). The error says "ValueError: substring not found". I don't get why sample tests don't give me the error. Can someone, please, explain.