codewar consecutive,Type error

一个来自codewar的题目,在pycharm上可以运行但在codewar上报错,向大家请教
Create the function consecutive(arr) that takes an array of integers and return the minimum number of integers needed to make the contents of arr consecutive from the lowest number to the highest number.

For example:
If arr contains [4, 8, 6] then the output should be 2 because two numbers need to be added to the array (5 and 7) to make it a consecutive array of numbers from 4 to 8. Numbers in arr will be unique.

本人写的:

def consecutive(*args):
    lst1 =[*args]
    lst1.sort()
    end = len(lst1)
    end1 = lst1[end - 1]
    start = lst1[0]
    lst2 = list(range(lst1[0], end1 + 1))  # range(start,end)----不包括end
    outcome = len(lst2) - len(lst1)
    print(outcome)
consecutive(4,1,3)

报错内容:
Unexpected exception raised
Traceback (most recent call last):
File "/workspace/default/lib/python3.8/site-packages/codewars_test/test_framework.py", line 111, in wrapper
func()
File "tests.py", line 9, in basic_tests
test.assert_equals(consecutive([4,8,6]), 2)
File "/workspace/default/solution.py", line 6, in consecutive
end2=end1+1
TypeError: can only concatenate list (not "int") to list
Completed in 0.41ms
Completed in 0.43ms

这个错误提示是指在solution.py文件中,第6行的end2=end1+1出现了类型错误,因为end1是一个列表,不能直接加1,应该改为end2=end1[-1]+1,即取出end1列表中最后一个元素,再加1。