Advertisement
Spocoman

01. Invert Values

Jan 22nd, 2022 (edited)
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. numbers = list(map(int, input().split(' ')))
  2. output = [-x for x in numbers]
  3. print(output)
  4.  
  5.  
  6. Тарикатско решение:)
  7.  
  8. print([-x for x in list(map(int, input().split(' ')))])
  9.  
  10. Или с ламбда:
  11.  
  12. print(list(map(lambda x: int(x) * -1, input().split(' '))))
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement