Skip to content

Conversation

@amirsoroush
Copy link

Hi, Current implementation needs two small changes to work correctly:

  1. The first if statement should be if index == 1: otherwise count is already 1 and it prevents the rest of the code to run.
  2. In elif part, index == index always evaluates to True. This also should be elif count == index.

I also changed if count <= index: so that if index is 4 it says that "The list has less number of elements" otherwise it silently skips the append and says nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant