The assignment:
Write a function called splitList(myList, option) that takes, as input, a list and an option, which is either 0 or 1. If the
splitList(myList, option)
def splitList(myList, option): return [i for i in myList if i<0] if option==0 else [i for i in myList if i>0] # test >>> myList=[2, 3, -1, 4, -7] >>> splitList(myList, 0) [-1, -7] >>> splitList(myList, 1) [2, 3, 4] >>>