I have a large data set of numbers that I would like to import so I need help writing a program that can do the following.
1. Find the first negative number within the set. 2. Once first negative number is found, note the positive number that came right before the first negative number found, and remove all data entries until that positive number is found again.
Some examples are…
test1 = [9,-7,7,1,10,-9,9] would print newtest1 = [9 9]
or test2 = [1, 2, 4, -2, 7, 8, 4] would print newtest2 = [1, 2, 4, 4]
Best Answer