The code shown doesn't produce the error shown
def function_1(x): if x < 0: return -1000000000 else: return (x ** (1-2)-1)/(1-2) my_list = [1, 2, 3, 4,] print([function_1(i) for i in my_list])
Output:[-0.0, 0.5, 0.6666666666666667, 0.75]
Note: don't over write the built in list
and please post the full error trace back when you have an error.