[Question]
  [
# Task
Given an \$m\times n\$ binary ascii "photo", return the negative of the photo
**Example:**
```
  #  
 # # 
#   #
 # # 
  # 
->
## ##
# # #
 ### 
# # #
## ##
```
# General rules:
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest answer in bytes wins
* [Standard rules](https://codegolf.meta.stackexchange.com/questions/2419/default-for-code-golf-program-function-or-snippet/2422#2422) and [default I/O rules](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods/) apply
* Your output characters must be the same as your input characters (e.g. `["#"," "] -> [" ","#"]`), which you are free to choose (but must be printable characters)
* Your output photo must have the same \$m\times n\$ dimensions as the input
* Trailing whitespace is allowed
# Test cases
Input 1:
```
  #  
 # # 
#   #
 # # 
  # 
```
Output 1:
```
## ##
# # #
 ### 
# # #
## ##
```
Input 2:
```
    # #
  #####
  # #  
#####  
# #    
```
Output 2:
```
#### # 
##     
## # ##
     ##
 # ####
```
Input 3:
```
##############################################################################################
#  ###  ##       ##  #######  #######       ######  ###  ##       ##       ##  #######      ##
#  ###  ##  #######  #######  #######  ###  ######  ###  ##  ###  ##  ###  ##  #######  ###  #
#       ##     ####  #######  #######  ###  ######  # #  ##  ###  ##       ##  #######  ###  #
#  ###  ##  #######  #######  #######  ###  ######   #   ##  ###  ##  #  ####  #######  ###  #
#  ###  ##       ##       ##       ##       ######  ###  ##       ##  ###  ##       ##      ##
##############################################################################################
```
Output 3:
```
 ##   ##  #######  ##       ##       #######      ##   ##  #######  #######  ##       ######  
 ##   ##  ##       ##       ##       ##   ##      ##   ##  ##   ##  ##   ##  ##       ##   ## 
 #######  #####    ##       ##       ##   ##      ## # ##  ##   ##  #######  ##       ##   ## 
 ##   ##  ##       ##       ##       ##   ##      ### ###  ##   ##  ## ##    ##       ##   ## 
 ##   ##  #######  #######  #######  #######      ##   ##  #######  ##   ##  #######  ######  
```
  
[Answer]
# [Python 3](https://docs.python.org/3/), 31 bytes
```
lambda s:s.translate(9*"# \n ")
```
[Try it online!](https://tio.run/##tZLNDsIgDIDvfYoGLsODF0@a@Ca7YOaiycRlcPHpcSvVYMFED@sB2tJ@6Q/jI1zubhf7YxsHezt1Fv3Bb8NknR9sODf7jdLYOlQmjtPVhaZvlFKgVxXQiPO1HJgkGSSZwk9vr0goM5PjA19StSAKfFXJY0DU8BseJbXaN@P/rh41yqJrhUl8OUqpfJt9HbHMflWZ/6YxkP9U6hRovrQYzTr5a@G0C@DegDcD3CiQ9UqE@AQ "Python 3 – Try It Online")
### How
The `9*"# \n "` is a string that has a "\n" at position 10 which matches its own code point, and at positions 32 and 35 it has copies of "#" and " " so these two are at each other's code point. `str.translate` uses this string as a lookup table replacing each character of `s` by the value associated with its code point. It will leave newlines in place and swap hashes and spaces.
[Answer]
# [sed](https://www.gnu.org/software/sed/), ~~23~~ 8 bytes
-15 bytes thanks to [Digital Trauma](https://codegolf.stackexchange.com/users/11259/digital-trauma)
```
y/# / #/
```
[Try it online!](https://tio.run/##tZIxDoAwCEV3TvETZtNLadxcjIOnRwvEVIqJDjK0lLYvn9@u0zjMyyayF0YBFxH@NYiBc6oDLGyh0SS@dVXDhf6mFW74nsqBGPBp0p6hoOEdHpGa9u34z@rBiKIzYRHfWxmTJ@9zRPX@359D2hmpn/oQ7LnVSVXUomknd568EdIVcAA "sed – Try It Online")
[Answer]
# [C (tcc)](http://savannah.nongnu.org/projects/tinycc), 33 bytes
Function that modifies its input.
```
f(char*s){*s^=1^*s%3;*++s&&f(s);}
```
[Try it online!](https://tio.run/##tVFLCsMgEN17iqGSoCZZlC6lVwkEQZpF0xKDm9CzW8dISYyFdpFZ6Jvfm@eomkkp5zRTt24Uhs/CtNdzK0xxkaKqTFlqZrh8uXvXD0zVlodCYeWsHyOTTaPkc@yHSbNTYQg51cJyrpnvtdjmACgA8QcF4hHQiEPcZ/Gm6KGFKNYHD2/0fB091FBYmEfDNFhATK5ATH2iScO@cwls6PesNGFM6LNgXUMSDb/RQ8qafXek/1t9@Lat6JywlH6/yhR8232eAnd/qL0B "C (tcc) – Try It Online")
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 3 bytes
```
1-_
```
Maybe this is too cheaty?
* The two characters are `0` and `1`
* [Submissions may use list of strings instead of multi-line strings](https://codegolf.meta.stackexchange.com/a/17095/16766), so the input can be a list of rows, each of which is a string containing `0`s and `1`s
* But [Lists of decimal digits and strings that match `^[0-9]*$` are interchangeable](https://codegolf.meta.stackexchange.com/a/17167/16766), so each row can be a list of digits
The solution is a function that takes and returns a list of lists of `0`s and `1`s. [Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgWbSSboFS7EKNpaUlaboWiw114yGsm_bR0QbWBtaGQGwQax0NYRmC2WAxEA9NHKE-lksTYsyCBRAaAA)
Explanation: subtract each number from 1.
---
Here's a **6-byte** version that's on much safer ground rules-wise. It's also a function, and it also uses `0` and `1`, but it takes and returns a multiline string:
```
_TRt01
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgWbSSboFS7EKNpaUlaboWy-JDgkoMDCGcm4pKBgaGBgZcQMLQgAvIMjCEssHiSlyaEIULFkBoAA)
Explanation: Transliterate the characters in `10` (the `t` builtin) to the characters in `01`.
[Answer]
# [JavaScript (V8)](https://v8.dev/), 25 bytes
```
s=>s.replace(/./g,i=>i^1)
```
[Try it online!](https://tio.run/##tZJNCoMwEIX3OUWXBlqd2RWKHqUYJIpFqpji9aMTQ9FJhHZhFvFlfj5exrzUpEw1tsPnNt1tfcmtyQuTjnroVKWTLM2aa5sX7ROlrfq36Tuddn2T1EkpABBALBuCWBSg12u8lPIhRNhDWaQaWq6Wqt2JvnQ67MZTF13CuUDnAVbhkxvhU98oawg718AOH1KRERk@KrY1gnn4DQ@cGr23x//t3v3MvemYMY4PR8nF0ezjCJr9uS@HnqudAQ "JavaScript (V8) – Try It Online")
Takes input as string of 0's, 1's, and newlines.
Explanation:
```
s => s.replace(
  /./g,       // '.' matches anything but newline, ie. 0 or 1 only.
              // 'g' marks regex as global, to replace everything
  i => i ^ 1  // JavaScript's aggressive type casting forces '0' or '1' string into a number
              // boolean XOR (^) with 1 transforms 0 -> 1 and 1 -> 0
)
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + coreutils, 12
```
tr '# ' ' #'
```
[Try it online!](https://tio.run/##tZIxDoAwCEV3TvEThp5LJ2f1/tgCMZViokMxqZTKy@fbdTk2kXNHYZT6cBHhqUEM1FdbYGEbjS7xo7saGsZOKzzwI5UDMeDTpP@GgoZveERqOrfjf6sHI4rOhEX8aGVM3rzPEc37uTeHdDJSP/VHsOdWJ1XRiqad3HnyQUh3wAU "Bash – Try It Online")
[Answer]
# [Lua](https://www.lua.org), 68 bytes
```
a=io.read('*a')b,d=a.gsub,' 'print((b(b(b(a,'#','!'),d,'#'),'!',d)))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=tZJBCsIwEEXB5ZxiJItpJHbtpjsvkhKVgqjU9jRuCsVD6cqjaDJB6jSCLjqF9mfSPP789tLvW9t117bZLle3tS2qY15vrMtoYUmXxhU2353b0hDSqa4OTZaV4bKGFBmakzbOS-21cVprZkVkd5891KQFCvH18Dfk4kWogYhb7644MD7JjQ_8mKoEUeCTYvgOCA-_4VFSk3NH_N_uUaE0nTIm8eMopfiWfRrhs5-0AMJkEPIMH0JFzX0ILnyTvUNMHuIgEFaI_Kc_AQ)
[![lol](https://i.stack.imgur.com/tcyMt.png)](https://i.stack.imgur.com/tcyMt.png)
[Answer]
# [Factor](https://factorcode.org/) + `pair-rocket`, 25 bytes
```
[ "# "=> " #"substitute ]
```
[Try it online!](https://tio.run/##LcgxCsJAEEbhfk7xM1PnAoppJY2NWInFZhlhyZKVmQk5/hrE5vHx3ilHs/64T7frCcm9ZccnFRus5UUDpWFRW7XiTMSAAHREQIcgf/8@U3@CBXwZwRD2bfYosYXi1XOqFbuV0P4F "Factor – Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 1 byte
```
⌐
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJhIiwidmZcXCAwdlZcXCMxdlYiLCLijJAiLCIwXFwgdlYxXFwjdlZ24bmF4oGLIiwiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI1xuIyAgIyMjICAjIyAgICAgICAjIyAgIyMjIyMjIyAgIyMjIyMjIyAgICAgICAjIyMjIyMgICMjIyAgIyMgICAgICAgIyMgICAgICAgIyMgICMjIyMjIyMgICAgICAjI1xuIyAgIyMjICAjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjICAjIyMjIyMgICMjIyAgIyMgICMjIyAgIyMgICMjIyAgIyMgICMjIyMjIyMgICMjIyAgI1xuIyAgICAgICAjIyAgICAgIyMjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjICAjIyMjIyMgICMgIyAgIyMgICMjIyAgIyMgICAgICAgIyMgICMjIyMjIyMgICMjIyAgI1xuIyAgIyMjICAjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjICAjIyMjIyMgICAjICAgIyMgICMjIyAgIyMgICMgICMjIyMgICMjIyMjIyMgICMjIyAgI1xuIyAgIyMjICAjIyAgICAgICAjIyAgICAgICAjIyAgICAgICAjIyAgICAgICAjIyMjIyMgICMjIyAgIyMgICAgICAgIyMgICMjIyAgIyMgICAgICAgIyMgICAgICAjI1xuIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyJd)
Same method as DLosc's 3 byte Pip answer. Takes a list of lists of either 0 or 1.
Simply computes `1 - n` for each digit. Alternatively,
## [Vyxal](https://github.com/Vyxal/Vyxal), 3 bytes
```
₀S*
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJhIiwiXFwgMHZWXFwjMXZW4oGLIiwi4oKAUyoiLCIwXFwgVjFcXCNWIiwiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI1xuIyAgIyMjICAjIyAgICAgICAjIyAgIyMjIyMjIyAgIyMjIyMjIyAgICAgICAjIyMjIyMgICMjIyAgIyMgICAgICAgIyMgICAgICAgIyMgICMjIyMjIyMgICAgICAjI1xuIyAgIyMjICAjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjICAjIyMjIyMgICMjIyAgIyMgICMjIyAgIyMgICMjIyAgIyMgICMjIyMjIyMgICMjIyAgI1xuIyAgICAgICAjIyAgICAgIyMjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjICAjIyMjIyMgICMgIyAgIyMgICMjIyAgIyMgICAgICAgIyMgICMjIyMjIyMgICMjIyAgI1xuIyAgIyMjICAjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjIyMjIyAgIyMjICAjIyMjIyMgICAjICAgIyMgICMjIyAgIyMgICMgICMjIyMgICMjIyMjIyMgICMjIyAgI1xuIyAgIyMjICAjIyAgICAgICAjIyAgICAgICAjIyAgICAgICAjIyAgICAgICAjIyMjIyMgICMjIyAgIyMgICAgICAgIyMgICMjIyAgIyMgICAgICAgIyMgICAgICAjI1xuIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyJd)
Takes a multiline string of 0s and 1s. The flag, header and footer are for allowing the test cases to be directly pasted in without having to change them.
## Explained
```
₀S*
₀S  # The string "10"
  * # Ring translate the input according to that - change 0 to 1, 1 to 0 and leave newlines as they are. 
```
[Answer]
# [Haskell](https://www.haskell.org/), 28 bytes
```
map g
g ' '='#'
g c=min ' 'c
```
[Try it online!](https://tio.run/##y0gszk7NyfmfZhvzPzexQCGdK11BXUHdVl1ZHchKts3NzAPxk4GSmXm2BaUlwSVFPnkKKgppSgrKQBiTp6AAoUA8pf//ktNyEtOL/@smFxQAAA "Haskell – Try It Online")
Acts on a string with newlines in it.
By the same rules-lawyering as [this Pip answer](https://codegolf.stackexchange.com/a/244187/3852) I guess `map$map(1-)` is a valid answer, but I don't really like it.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 1 [byte](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
Each line is a separated potential program:
```
_
≠
È
```
I/O as a matrix of 1s and 0s.
[Try it online](https://tio.run/##yy9OTMpM/f8//v//6GgDHQUgMgSTBrE6CtFwniFUACoHEcOqAtWMWAA) or [verify all test cases](https://tio.run/##yy9OTMpM/V@m5JlXUFpipaCkU@l1aLcOl5J/aQlM4H/8f5DYoW32/6Ojow10DHQMgdggVicawjIEs8FiIB6aOEI9kBNtAFMFVwliQyGSapgNcDk4HyoHNxGhYshBeKjBfQinERBZBiU0sIig6sJUi98GYuxEUoHH9cS41ZCAG/G7nngRHOYgpVjs4UBN1xsQdCvx8Y3qetqHvQESjdtOYkOMkOuJSZWEREhN96S4Apbuh26ZExsLAA).
Using the actual `#` and spaces as I/O, it would be 5 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage) instead:
```
„# Â‡
```
I/O as multiline strings with `#`s/spaces and potential newlines.
[Try it online](https://tio.run/##yy9OTMpM/f//UcM8ZYXDTY8aFv7/r6SkpExTwKWsoACkQIQCBEA4YIDEgErBRdE0YOqECKAYj2mqMpqJaMZjZSCr4UJzA3HGK6CbitXfUONJdr2CsgK6o7E5DN14zKBEZ@AKe@xGgMKepgCYNAE) or [verify all test cases](https://tio.run/##yy9OTMpM/V@m5JlXUFpipaCkU6nDpeRfWgLjufx/1DBPWeFw06OGhf91Dm2z/x@tpKCgrKAQkwcklYEUkK2gDOeB5ZR0gGpALGWwAAhAZMD6wHwwA8QHq1amKQC7EWynMthCBQgDKovEgErBRdE0YOqECKCaj2msMpqRaOZjZSCrgYQxkiuIM18B3VisPoeZT7L7wZGH6mxsLsMwHzM40Rm4wh@7EeDwpylQigUA).
**Explanation:**
```
      # Transform each 1 to 0 and each 0 to 1 in the (implicit) input-matrix,
_     #  using an ==0 check
≠     #  or !=1 check
È     #  or %2==0 (is_even) check
      # (after which the modified matrix is output implicitly)
„#    # Push string "# "
   Â  # Bifurcate it, short for Duplicate & Reverse copy
    ‡ # Transliterate all "#" to " " and vice-versa in the (implicit) input
      # (after which the modified string is output implicitly)
```
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 13 bytes
```
@(x)['' 67-x]
```
[Try it online!](https://tio.run/##tZK9CoMwEMd3n@IPR4kOFVRooUXoQ3QTh1J07VApvn2MSSi5M4F2MEvu@3e5y@s5PT6DHtuyLPUtn4tOKZzOx7nXB9yH94Tqkk3mrtBizE1UBnQKIEBdnQplNApU4wMlvS63LzIPqB2gFoA1jFjWengZ1oT1M8PqZ6jGoRqGol0Pm4ptkGxXcIKPCgTv@lpFwjbTGeKcbXkSpQUnKoQxfMtBV79xIMtHJyE5f7/Hbp4/I9ZhkrMdtxRS@4mXYPvZ97/1hV4A "Octave – Try It Online")
Takes the input as an array of `'# '` characters.
The sum of `'#'` and `' '` is 67, so all we need to do is subtract the input string from 67 and it will "negate" the characters.
Unfortunately we then have to spend a few bytes forcing the output back to being a character array rather than an integer, but ho hum.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
O^1Ọ
```
A monadic Link that accepts a list of lists of characters (from  and `!`) and yields a list of lists of characters with these characters swapped.
**[Try it online!](https://tio.run/##y0rNyan8/98/zvDh7p7/D3dvOdwe@f@/urp6DJeCoqKCAphQhAAIBwyQGFApuCiaBkydEAEU4zFNVUAzEc14rAxkNVxobiDOeEV0U7H6G2o8ya5XVFBEdzQ2h6EbjxmU6AxcYY/dCAUFYPQCAA "Jelly – Try It Online")**
### How?
```
O^1Ọ - Link: list of lists of characters
O    - ordinal (vectorises)   : ' ' -> 32  and '!' -> 33
  1  - one                    : 1
 ^   - XOR (vectorises)       : 32  -> 33  and 33  -> 32
   Ọ - character (vectorises) : 33  -> '!' and 32  -> ' '
```
---
If integers are allowed in place of characters as I/O then the one byte Link `¬` would suffice (vectorising loginal NOT).
[Answer]
# [R](https://www.r-project.org/), ~~38~~ 30 bytes
Or **23 bytes** by exchanging `function` for `\` using [R](https://www.r-project.org/)≥4.1: [Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuhbbYzQqNJMzEotKijSUlBWUdJQUlJV0KjQhsjfzkhNLNNI0uJSU4YBLWQEMoExlZTAbjQmRh4jiUAtmcyHMVeLShNq6YAGEBgA)
```
function(x)chartr("# "," #",x)
```
[Try it online!](https://tio.run/##K/qfZvs/rTQvuSQzP0@jQjM5I7GopEhDSVlBSUdJQVlJp0Lzf3JiiUaaBpeSMhxwKSuAAZSprAxmozEh8hBRHGrBbC6EuUpcmpr/AQ "R – Try It Online")
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), ~~28~~ 22 bytes
```
,[-------[->+++<]>+.,]
```
[Try it online!](https://tio.run/##SypKzMxLK03O/v9fJ1oXAqJ17bS1tW1i7bT1dGL//9cCAS6tLCDkArMB "brainfuck – Try It Online")
Switch `*`(42) and `j`(106). Long to make `\n`(10) same
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 13 bytes
```
L:::bdN\#dN\#
```
[Try it online!](https://tio.run/##K6gsyfj/38fKyiopxS9GGYT/Vyop0xRwKSsoACkQoQABEA4YIDGgUnBRNA2YOiECKMZjmqqMZiKa8VgZyGq40NxAnPEK6KZi9TfUeJJdr6CsgO5obA5DNx4zKNEZuMIeuxGgsKcpUPoPAA "Pyth – Try It Online")
[Answer]
# APL+WIN, 32 bytes
Prompts for m x n matrix
```
n←(⍴m←⎕)⍴' '⋄((,m=' ')/,n)←'#'⋄n
```
[Try it online! Thanks to Dyalog APL Classic](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcQJanP5BlyPWooz3tfx6QqfGod0sukAZKaQKZ6grqj7pbNDR0cm2BTE19nTxNoKS6Mkg07z9QF9f/NC5TBVOwUgVlBRBWRqXVuYA6uUCqzCGqIHIKyiCAha2goK4A0aLAZa5gaQLSpExbAHYAiFCAAGWYk1AYUClcGjB1QtUjKcY0FN0FyhgaMBl4XECc6QrohmL1NR6L8ZkOiXUUndjchcsFOBl4IgqLBhqnGGCqBgA "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 6 bytes
```
T`10`d
```
[Try it online!](https://tio.run/##tVG5DYAwDOwzxUleAHZhAJCgoKFA7A8@J0LECRIUcRGfv8vF2Zdj3aZzGCHjrK7vzM0an4AAQQ9BUARJOObVEQhDmqVZsIieERulqVGaXSh2HSJIxQdIpTvrBsrJmMjoS1ZxjI6@Cp49wWn4Rg/PWn13ov@t3v4tF10T5unLVXrwtvs6BXff1C4 "Retina 0.8.2 – Try It Online") Swaps `0` with `1` but link is to test suite that converts from  `#` to `01` and back. Explanation: `d` is shorthand for `0-9` or `0123456789` so this translates `1` to `0` and `0` to `1` (the extra target characters are ignored).
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 8 bytes
```
ＷＳ⟦⭆ι¬Σκ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/788IzMnVUHDM6@gtCS4pCgzL11DU1MhAMgo0YiGCPgmFmhk6ij45ZdoBJfmamRramrGalr//29AU8BlYGgIpECEIQRAOGCAxIBKwUXRNGDqhAigGI9pqgGaiWjGY2Ugq@FCcwNxxhuim4rV31DjSXa9oYEhuqOxOQzdeMygRGfgCnvsRoDCnrYp579uWQ4A "Charcoal – Try It Online") Link is to verbose version of code. Takes input as a list of newline-terminated strings of `0`s and `1`s. Explanation:
```
ＷＳ
```
While there are more strings in the input...
```
⟦⭆ι¬Σκ
```
... logically invert each character's decimal value and output the result on its own line.
[Answer]
# [R](https://www.r-project.org/), 14 bytes
-5 bytes by l4m2, using 1-m instead of abs(m-1) and +11 for providing the required function call.
```
function(m)1-m
```
[Try it online!](https://tio.run/##K/qfZvs/rTQvuSQzP08jV9NQN/d/mkZuYklRZoVGsoaBjgIQGYJJZLYhieIGmjoKecn5ObamQLoov1zBVsFUU/M/AA "R – Try It Online")
I do personally dislike the freedom of I/O in this challenge and allowing any other input characters than " " and "#". I learned something new from Dominic van Essen's answer actually as I was never aware of that function. But bending the rules to make life easier, nevertheless my answer. Input a 0-1 matrix and just reverse the values.
[Answer]
# [Python 3](https://docs.python.org/3/), 21 bytes
```
lambda s:s.swapcase()
```
Takes a multiline string consisting of `a` for spaces and `A` for `#`'s and outputs the string after swapping the case of each letter. Not quite as nice-looking (or interesting) as loopy walt's wonderful answer, but I'm happy to finally write an answer to one of these :)
[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUaHYqlivuDyxIDmxOFVD839BUWZeiUaahpKSEpcjTQGXY2IikAIRiRAA4YABEgMqBRdF04CpEyKAYjymqY5oJqIZj5WBrIYLzQ3EGZ@IbipWf0ONJ9n1iY6J6I7G5jB04zGDEp2BK@yxGwEKe5oCYNrU1ORCTqlgn3KBwxccMY5QNlgcm3JwXHBB/cYFjRkuqEe5wDyYxv8A "Python 3 – Try It Online")
[Answer]
# [Vim](https://github.com/vim/vim), 3 bytes
```
VG~
```
> 
> Your output characters must be the same as your input characters (e.g. ["#"," "] -> [" ","#"]), which you are free to choose (but must be printable characters)
> 
> 
> 
We will use the upper case and lower case version of any alphabetic character.
### Explanation
1. `V`: Select the whole line
2. `G`: Go to the end of the document
3. `~`: Swap case of the characters
[Try it online!](https://tio.run/##K/v/P8y97v//QJoCrsDCQiAFIgohAMIBAyQGVAouiqYBUydEAMV4TFMD0UxEMx4rA1kNF5obiDO@EN1UrP6GGk@y6wsDC9Edjc1h6MZjBiU6A1fYYzcCFPY0BQA "V (vim) – Try It Online") (Using: ["q","Q"] -> ["Q","q"])  
[Try it online!](https://tio.run/##K/tvpVqsr6xfqJ/OBWIp6AeCWMmJOTkKyaVFxflFGoY6Coaa/8Pc68BKC4GKIUoDgYrT/yvTFHApKygAKRChAAEQDhggMaBScFE0DZg6IQIoxmOaqoxmIprxWBnIarjQ3ECc8QropmL1N9R4kl2voKyA7mhsDkM3HjMo0Rm4wh67EaCwpykAAA "V (vim) – Try It Online") (Adding some replaces to fit the caracters in the examples)
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 1 byte
```
N
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLilqHigYtcXCNcXEFWXFwgXFxhViIsIk4iLCJcXGFcXCBWXFxBXFwjViIsIiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyNcbiMgICMjIyAgIyMgICAgICAgIyMgICMjIyMjIyMgICMjIyMjIyMgICAgICAgIyMjIyMjICAjIyMgICMjICAgICAgICMjICAgICAgICMjICAjIyMjIyMjICAgICAgIyNcbiMgICMjIyAgIyMgICMjIyMjIyMgICMjIyMjIyMgICMjIyMjIyMgICMjIyAgIyMjIyMjICAjIyMgICMjICAjIyMgICMjICAjIyMgICMjICAjIyMjIyMjICAjIyMgICNcbiMgICAgICAgIyMgICAgICMjIyMgICMjIyMjIyMgICMjIyMjIyMgICMjIyAgIyMjIyMjICAjICMgICMjICAjIyMgICMjICAgICAgICMjICAjIyMjIyMjICAjIyMgICNcbiMgICMjIyAgIyMgICMjIyMjIyMgICMjIyMjIyMgICMjIyMjIyMgICMjIyAgIyMjIyMjICAgIyAgICMjICAjIyMgICMjICAjICAjIyMjICAjIyMjIyMjICAjIyMgICNcbiMgICMjIyAgIyMgICAgICAgIyMgICAgICAgIyMgICAgICAgIyMgICAgICAgIyMjIyMjICAjIyMgICMjICAgICAgICMjICAjIyMgICMjICAgICAgICMjICAgICAgIyNcbiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMiXQ==)
A different Vyxal solution. Expects uppercase letters for `#` and lowercase letters for  or vice versa. `N` is the swap case element. The header and footer converts the test case format into the format that the program expects and vice versa.
[Answer]
## Batch, 60 bytes
```
@set/ps=
@set s=%s: =$%
@set s=%s:#= %
@echo(%s:$=#%
@%0
```
Swaps spaces with `#`s. Doesn't work well with file input as it needs to be interrupted with Ctrl+C to exit. Explanation:
```
@set/ps=
```
Read in the next line.
```
@set s=%s: =$%
```
Replace the spaces with `$`s.
```
@set s=%s:#= %
```
Replace the `#`s with spaces.
```
@echo(%s:$=#%
```
Replace the `$`s with `#`s and output the result.
```
@%0
```
Rinse and repeat.
[Answer]
[Elisp](https://www.gnu.org/software/emacs) + [s.el](https://github.com/magnars/s.el), 57 bytes
```
(s-replace"-""#"(s-replace"#"" "(s-replace" ""-"(read))))
```
[![enter image description here](https://i.stack.imgur.com/hTxnH.gif)](https://i.stack.imgur.com/hTxnH.gif)
[Answer]
# [Haskell](https://www.haskell.org/), 32 bytes
```
f l=[[x|c<-s,x<-"# ",x/=c]|s<-l]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00hxzY6uqIm2Ua3WKfCRldJWUFJp0LfNjm2pthGNyf2f25iZp6CrUJuYoGvQkFpSXBJkU@egopCWrSSgoKyAlCxEpACaQLqBIog8SHysf8B "Haskell – Try It Online")
Takes and returns a list of String
[Answer]
# Charcoal, 19 bytes
```
ＷＳ«Ｆι«≡κ ¦#¦ »Ｍ±Ｌι¹
```
[Try it online!](https://tio.run/##S85ILErOT8z5///9nu3v92w@tPr9nmXndh5a/ahz4bldCoeWKR9apnBo9/s9aw9tfL9nDVBm5///CgrKCgpcQEJZgQvIUlCGsqHiIBGQmIIyCIBFQeJgHogG8WB8mgGQw8D2KYNtU4AwoJJIDKgUXBRNA6ZOiACK8ZimKqOZiGY8VgayGi40NxBnvAK6qVj9DTWeZNeDow3V0dgchm48ZlCiM3CFPXYjQGFP25QDAA)
[Answer]
# [Gema](http://gema.sourceforge.net/), 7 characters
```
%=.;.=%
```
For this version choose the `%` and `.` characters.
[Try it online!](https://tio.run/##tZGxDoAgDER3/uPW@wHDxzgYJ/9/RK4QAwUTHegA1xYeZz2Pa08JkRsjUiJBhryAISui6lLPmwSUKqyshmXalekgloas2YOw51hEbTaitp6quzDeLIUOP1LhiA4/Fe2Z4Dx8w9NTp99d8b/d23/rTc@Mefw4Si/eZj9HaPZL4wY "Gema – Try It Online")
### Gema, 10 characters
```
\#=\ ;\ =#
```
This uses the original `#` and  characters. Unfortunately this needs escaping because
* `#` is metacharacter similar to `*` (`.*` in regex), but recursive
* is metacharacter and means one or more whitespace characters (`\s+` in regex)
[Try it online!](https://tio.run/##tZGxDoAgDER3vuKS@wzDn7A4GCf/f0SuEKMFEx3oANcWHmfdt2PNOTEmLAmROQMEQlmIUBTYdK2XTYJKFVZWwzLtynSQU0PW7EHac6iiNW@ita6qu9DfrIUHvqfSER1@KO5ngvPwDQ9PHX53w/92b//taXpkzOP7UXrxNvsxQrOfGic "Gema – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 4 bytes
```
5\Zc
```
Input is a char matrix containing  and `#`.
[Try it online!](https://tio.run/##y00syfn/3zQmKvn//2h1ZZoCdWsFdWUFBSALRChAAIQDBkgMqBRcFE0Dpk6IALoNmAYroxmKZgNWBrIaqA3ILiHOBgV0g7H6HmEDyX5QUFZAdzo2t2GxATNY0Rm44gG7EdB4oG1aigUA "MATL – Try It Online")
### How it works
```
     % Implicit input
5\   % Modulo 5 of (codepoints) of the input chars. This gives 2 for space, 0 for '#'
Zc   % Convert nonzeros to '#' and zeros to char(0)
     % Implicit display. char(0) is displayed as a space
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 18 bytes
```
->s{s.tr"# "," #"}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1664ulivpEhJWUFJR0lBWan2f0FRZl6JQppecmJOjoaSgoKyggIXkFBW4AKyFJShbLC4kqa2UkxeTJ4SFxe6LpC8MkgVCIBVg8wB80A0iAfSz8X1HwA "Ruby – Try It Online")
I suggested this to fix a Ruby answer but disappeared..
]