Last active
March 29, 2019 18:11
-
-
Save bcowell/849b72d7b92f1f599702c2e71e538820 to your computer and use it in GitHub Desktop.
Flipping an image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flipAndInvertImage(self, A: List[List[int]]) -> List[List[int]]: | |
return [[int(not i) for i in row[::-1]] for row in A] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment