You are viewing a single comment's thread. Return to all comments →
Depends if you really need to break.
If not -- simply:
## list comprehension to get only neg numbs a = [i for i in num_list if i < 0] ## if u want to break for i in num_list: if i >= 0: break
Plus Minus
You are viewing a single comment's thread. Return to all comments →
Depends if you really need to break.
If not -- simply: