Medium
Take While, Drop While
Read numbers. Using
itertools.takewhile print the numbers before the first negative one, then using dropwhile print the rest (starting at the first negative). Print an empty line for an empty part.Input
One line.
Output
Two lines.
Sample 1
Input
1 2 -3 4
Output
1 2 -3 4
Sample 2
Input
-1 2
Output
-1 2
Output appears here