list1 = []list2 = []list3 = []for i in range(0,3): if i < 5: print("第",i+1,"个数") x = float(input('请用户输入数值:')) list1.append(x)print("所有数据列表:",list1)list2 = [list2.append(list1[i]) for i in range(0,3) if float(list1[i]) > 0]list3 = [list3.append(list1[i]) for i in range(0,3) if float(list1[i]) < 0]#for i in range(0,3): # if float(list1[i]) > 0: # list2.append(list1[i])# elif float(list1[i]) < 0:# list3.append(list1[i])print("正数列表:",list2)print("负数列表:",list3)