#try to avoid input function a = [1,2,3,4,3,-7,-90,-5,3,0,-43,-3,-1,54,8] b = [] c = [] for i in a: if i > -1: b.append(i) else: c.append(i) print("Positive elements list is :"+str(b),"Negative elements list is :"+str(c))
Click the run button. Try to avoid input() function.