Ad
  • Custom User Avatar

    You can simnplify your code by using list comprehension for creating 'phrase_list' and 'new_indexes'. You could also use enumerate(indexes) to loop through the indexes and insert the word at a specified location.

  • Default User Avatar

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

  • Custom User Avatar

    In the attempt I've passed all test, but it return this error:

    ===
    TypeError: Cannot read property 'length' of null
    at comp
    at /home/codewarrior/index.js:34:19
    at /runner/frameworks/javascript/cw-2.js:152:11
    at Promise._execute
    at Promise._resolveFromExecutor
    at new Promise
    at describe
    at /home/codewarrior/index.js:16:5
    at /home/codewarrior/index.js:117:5
    at Object.handleError

    I have tried my solution on node.js and it doesn't complain about this error.

  • Custom User Avatar

    I'm not sure it's the only problem with your code, but it returns False if both arrays are empty (the description requires to return False if they are None, but not if they are empty).

  • Default User Avatar

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