-
-
Save Developer1Dev/ded066b13becbb7f9aa048a40092cb69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list_ex1=[1,5,7,-10,12,14,-16,-8,0] | |
pos=[] | |
neg=[] | |
neg.append(list_ex1[0]) if list_ex1[0]<0 else pos.append(list_ex1[0]) | |
neg.append(list_ex1[1]) if list_ex1[1]<0 else pos.append(list_ex1[1]) | |
neg.append(list_ex1[2]) if list_ex1[2]<0 else pos.append(list_ex1[2]) | |
neg.append(list_ex1[3]) if list_ex1[3]<0 else pos.append(list_ex1[3]) | |
neg.append(list_ex1[4]) if list_ex1[4]<0 else pos.append(list_ex1[4]) | |
neg.append(list_ex1[5]) if list_ex1[5]<0 else pos.append(list_ex1[5]) | |
neg.append(list_ex1[6]) if list_ex1[6]<0 else pos.append(list_ex1[6]) | |
neg.append(list_ex1[7]) if list_ex1[7]<0 else pos.append(list_ex1[7]) | |
neg.append(list_ex1[8]) if list_ex1[8]<0 else pos.append(list_ex1[8]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment