Ad
  • Custom User Avatar

    That string will be replaced at index x which will be the input number with the second string.

    There's no mention that negative index should be handled. In fact the fact that you can use negative index in Python is because it's a sugar: in most other languages the valid indices are always from 0 to len(string) - 1.

  • Custom User Avatar

    Needs Random Tests.