try:
number = [1,2,3,4,5]
number1 = [1,2,3,4,0]
for i in number:
for j in number1:
a = i/j
print(a)
except ZeroDivisionError:
print('error')
import numpy as np
a1 = np.array([1,2,3,4,5], dtype=np.float64)
a2 = np.array([1,2,3,4,0], dtype=np.float64)
print (a1 / a2)
[ 1. 1. 1. 1. inf]