Python challenge-simple input(not running)

list=[]
ele=input()
list.append(ele)
sum=sum+list[i]
while input in range[-1000,1001]:
if sum>0:
print (list[i])
else:
break

hi Ashita
in question we are giving input in form of single string ;
debugging:
so if we put input() = “1 2 3 4 5”
then list.append(ele) while append whole string i.e. list = [“1 2 3 4 5”] but we want list = [1,2,3,4,5] for this we have split function.
refer to python basics 3 input lecture video:https://online.codingblocks.com/player/11542/content/663/6048

one more thing dont make list with a name list because we have list() function that is use to make list from other data structres. if you use list() in future is will show list not callable because of list as object in memory.
so plz dont keep list with name list