Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution:
- def flipAndInvertImage(self, image: List[List[int]]) -> List[List[int]]:
- for i in range(len(image)):
- image[i] = image[i][::-1]
- for j in range(len(image[i])):
- if image[i][j] == 0:
- image[i][j] = 1
- else:
- image[i][j] = 0
- return image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement