In this program 10 inputs are taken into a list and now need to add a condition that is the input data should be between -20 and +20 and if the value is anything beyond the condition an exception error is to be shown. How do i do it ?
CODE:
lst=[]
print("Enter 10 numbers : \n")
for i in range(0,10):
lst1=int(input())
lst.append(lst1)
print("\nThe entered list is : ",lst)