Answer:
num=[]
a=input("Enter the number count")
i=0
for i in range(0,int(a)):
b=input("Enter the number")
num.append(b)
def safe_int(num):
i=0
for i in range(0,int(a)-1):
if( num[i].isdigit()):
num[i]=num[i]
else:
num[i]=0
safe_int(num)
print(num)
Explanation:
Above we have entered a list, and then pass it to the function. There we check if each item of list is an integer, and if it is an integer it is left as it is, or else 0 is stored for it in the list.