Reverse Operation In Python