Ad
  • Custom User Avatar

    Please use a spoiler flag when posting code, and use markdown format tags: https://docs.codewars.com/training/troubleshooting/#post-discourse

    Your loop is initialized with the original length of the list, so if you change the length of your list in the meanwhile this isn't actualized (in Python) and you get an index out of range. Anyway your appoach is not good, you need to realize it. I encourage you to print stuff to the console to understand what your code does and why it fails when it does. You need to learn to debug yourself your code, that's what programming is all about.

  • Custom User Avatar

    It says consecutive numbers.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution