Ad
  • Custom User Avatar

    oh yes my bad

    permutations refers to the name of the function i.e., the user is using a recursive function as his solution

  • Custom User Avatar

    e.g.,

    permutations = 'abcde'
    print(permutations[:2]+permutations[2+1:])
    
    

    will return

    abde
    
  • Custom User Avatar

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

  • Default User Avatar

    Here are 2 similar examples you can copy into your IDE and see if it makes sense:

    list_of_nums = [3,4,5,6,7,98,99]
    
    true_or_false_1 = any(x>4 for x in list_of_nums)
    true_or_false_2 = any(x>100 for x in list_of_nums)
    
    print(true_or_false_1) # should print True, there is AT LEAST ONE x in list_of_nums that is > 4
    print(true_or_false_2) # should print False, there are NOT any x's in list_of_nums that are > 100