Advertisement
vivaladiva

Untitled

Nov 3rd, 2020
2,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. def removeBigValues(tup):
  5.     result = []
  6.  
  7.     for i in list(tup):
  8.         result.append(-1 if i > 100 else i)
  9.  
  10.     tup = tuple(result)
  11.     return tup
  12.  
  13. # Tests
  14. testTuple = (1,5,199,544)
  15. print(removeBigValues(testTuple))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement