Code not working showing typeerror and runtime error

a=input(“enter a list”)
sum1=0
print(a)
for i in a:
sum1+=i
if sum1>0:
print (i)
elif sum1<0:
break
else:
pass

For reading a list from input you must use the following statement:
a = [num for num in input.split()]

The first line in your code wrongly assigns a list.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

i have tried using that code even that you suggested but the compiler still showing same error. I tried using on python idle and jupyter notebook and that worked fine on these platforms.