32ms, Python (with comments)
If you find this post helpful, please Upvote :)\n\nclass Solution(object):\n    def flipAndInvertImage(self, image):\n        """\n        :type image: List[Lis
If you find this post helpful, please **Upvote** :)\n```\nclass Solution(object):\n    def flipAndInvertImage(self, image):\n        """\n        :type image: List[List[int]]\n        :rtype: List[List[int]]\n        """\n\t\t#create a variable to store the result\n        result = []\n\t\t#create a variable for storing the number of elements in each sublist as we need it later, saving some computation time, by declaring it as a constant\n        length = len(image[0])\n\t\t#looping through each pixel in the images list\n        for pixel in image:\n\t\t#mapping each element in the pixel with xor of 1, ^1, because it returns the opposite of 0,1!\n\t\t#We also reverse the list by slicing\n          temp = map(operator.xor,pixel,[1]*length)[::-1]\n\t\t  #Add each sublist in the desired formate in the result list\n          result.append(temp)\n        return result\n```\n![image](https://assets.leetcode.com/users/images/3e28b665-f943-43f6-89b4-87068b566358_1621757552.7224703.png)\nPlease comment if you have any doubts or suggestions :)
['Python', 'Python3']