Skip to main content
Commonmark migration
Source Link

#Python, 19 15 14 bytes

Python, 19 15 14 bytes

a.py

00000000  70 72 69 6e 00 28 32 50  69 0a 74 22 41 22        |prin.(2Pi.t"A"|

b.py

00000000  70 72 69 6e 74 22 42 22  00 64 00 00 02 00        |print"B".d....|

c.py

00000000  00 00 00 00 74 0a 70 72  69 6e 74 22 43 22        |....t.print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line.

Shortened by 1 bytes once I realized that the space after print wasn't needed. And shortened by 4 more bytes once I realized that the NUL character also cause the newline to be ignored so I can use it to break lines in the middle of a keyword.

#Python, 19 15 14 bytes

a.py

00000000  70 72 69 6e 00 28 32 50  69 0a 74 22 41 22        |prin.(2Pi.t"A"|

b.py

00000000  70 72 69 6e 74 22 42 22  00 64 00 00 02 00        |print"B".d....|

c.py

00000000  00 00 00 00 74 0a 70 72  69 6e 74 22 43 22        |....t.print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line.

Shortened by 1 bytes once I realized that the space after print wasn't needed. And shortened by 4 more bytes once I realized that the NUL character also cause the newline to be ignored so I can use it to break lines in the middle of a keyword.

Python, 19 15 14 bytes

a.py

00000000  70 72 69 6e 00 28 32 50  69 0a 74 22 41 22        |prin.(2Pi.t"A"|

b.py

00000000  70 72 69 6e 74 22 42 22  00 64 00 00 02 00        |print"B".d....|

c.py

00000000  00 00 00 00 74 0a 70 72  69 6e 74 22 43 22        |....t.print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line.

Shortened by 1 bytes once I realized that the space after print wasn't needed. And shortened by 4 more bytes once I realized that the NUL character also cause the newline to be ignored so I can use it to break lines in the middle of a keyword.

added 79 characters in body
Source Link
kasperd
  • 819
  • 5
  • 14

#Python, 19 1515 14 bytes

a.py

00000000  70 72 69 6e 74 00 28 32  50 69 5c69 0a 74 22 41 22     |print   |prin.(2Pi\2Pi."A"|t"A"|

b.py

00000000  70 72 69 6e 74 20 22 42  22  00 3264 7e00 00 02 00     |print "B"  |print"B".2~d....|

c.py

00000000  00 00 00 00 00 2074 0a 70  72  69 6e 74 22 43 22        |..... t.print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line. 

Shortened by 3 bytes once I figured out how the NUL character interacts with line continuation, and shortened by 1 bytes once I realized that the space after print wasn't needed. And shortened by 4 more bytes once I realized that the NUL character also cause the newline to be ignored so I can use it to break lines in the middle of a keyword.

#Python, 19 15 bytes

a.py

00000000  70 72 69 6e 74 00 28 32  50 69 5c 0a 22 41 22     |print.(2Pi\."A"|

b.py

00000000  70 72 69 6e 74 20 22 42  22 00 32 7e 00 02 00     |print "B".2~...|

c.py

00000000  00 00 00 00 00 20 0a 70  72 69 6e 74 22 43 22     |..... .print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line. Shortened by 3 bytes once I figured out how the NUL character interacts with line continuation, and shortened by 1 bytes once I realized that the space after print wasn't needed.

#Python, 19 15 14 bytes

a.py

00000000  70 72 69 6e 00 28 32 50  69 0a 74 22 41 22        |prin.(2Pi.t"A"|

b.py

00000000  70 72 69 6e 74 22 42 22  00 64 00 00 02 00        |print"B".d....|

c.py

00000000  00 00 00 00 74 0a 70 72  69 6e 74 22 43 22        |....t.print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line. 

Shortened by 1 bytes once I realized that the space after print wasn't needed. And shortened by 4 more bytes once I realized that the NUL character also cause the newline to be ignored so I can use it to break lines in the middle of a keyword.

deleted 23 characters in body
Source Link
kasperd
  • 819
  • 5
  • 14

#Python, 1919 15 bytes

a.py

00000000  70 72 69 6e 74 20 22 41  22 0a 00 00 00 00 00 00  |print "A".......|
00000010  00 00 00                            28 32  50 69 5c 0a 22 41 22     |.|print.(2Pi\.|"A"|

b.py

00000000  70 72 69 6e 74 20 22 42  22 00 7032 727e 6900 6e02 7400 20    |print "B".print 2~...|
00000010  22 43 22                                          |"C"|

c.py

00000000  00 00 00 00 00 00 00 03  0020 0a 70  72 69 6e 74 20  |..........print |
00000010  22 43 22                                         |..... |"C"|.print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line. Shortened by 3 bytes once I figured out how the NUL character interacts with line continuation, and shortened by 1 bytes once I realized that the space after print wasn't needed.

#Python, 19 bytes

a.py

00000000  70 72 69 6e 74 20 22 41  22 0a 00 00 00 00 00 00  |print "A".......|
00000010  00 00 00                                          |...|

b.py

00000000  70 72 69 6e 74 20 22 42  22 00 70 72 69 6e 74 20  |print "B".print |
00000010  22 43 22                                          |"C"|

c.py

00000000  00 00 00 00 00 00 00 03  00 0a 70 72 69 6e 74 20  |..........print |
00000010  22 43 22                                          |"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line.

#Python, 19 15 bytes

a.py

00000000  70 72 69 6e 74 00 28 32  50 69 5c 0a 22 41 22     |print.(2Pi\."A"|

b.py

00000000  70 72 69 6e 74 20 22 42  22 00 32 7e 00 02 00     |print "B".2~...|

c.py

00000000  00 00 00 00 00 20 0a 70  72 69 6e 74 22 43 22     |..... .print"C"|

I came up with this solution when I noticed that python (2.7.6 on Ubuntu 14.04) after seeing a NUL character will ignore the rest of that line. Shortened by 3 bytes once I figured out how the NUL character interacts with line continuation, and shortened by 1 bytes once I realized that the space after print wasn't needed.

Source Link
kasperd
  • 819
  • 5
  • 14
Loading