Advertisement
kika_86

Untitled

Oct 20th, 2019
1,303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list = [5, 1, 3, 2, -5]
  2. list_2 = [-1, 5, 7, -3.0, -5]
  3.  
  4.  
  5. def print_all_negative_n(list):
  6.     for n in list:
  7.         if n < 0:
  8.             print(n)
  9.     return None
  10.  
  11.  
  12. print(print_all_negative_n(list))
  13. print("--------------")
  14. print(print_all_negative_n(list_2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement