Advertisement
vivaladiva

Untitled

Oct 27th, 2020
2,018
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def removeNegatives(listOfIntegers):
  2.     result = []
  3.     for i in listOfIntegers:
  4.         if i >= 0:
  5.             result.append(i)
  6.  
  7.     listOfIntegers = result
  8.  
  9.     return listOfIntegers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement