You cannot extend an integer to a list, you can only append it. Also, your code fails for cases like tribonacci([1, 1, 1], 1) (your code returns [1, 1, 1] whilst the output should be [1])
tribonacci([1, 1, 1], 1)
[1, 1, 1]
[1]
Nice
This comment is hidden because it contains spoiler information about the solution
Loading collection data...
You cannot extend an integer to a list, you can only append it. Also, your code fails for cases like
tribonacci([1, 1, 1], 1)
(your code returns[1, 1, 1]
whilst the output should be[1]
)Nice
This comment is hidden because it contains spoiler information about the solution