Skip to main content
added 126 characters in body
Source Link
xnor
  • 149.7k
  • 26
  • 287
  • 676

Python 2, 38 bytes

1 id=id<3and-~id exec"print id|1"*0**0 

Try it online! (doubled, tripled)

Outputs 1, 1, or 3.


Python 2, 28 bytes

Python 2, 33 bytes

1 True+=1 print`7%True`*0**0exec"print 7%True"*0**0 

Try it online!Try it online! (doubleddoubled, tripledtripled)

If leading newlines are OK. Outputs 1,1,3. Uses the True-modifying idea by Aidan F. Pierce from Xcoder's solution.

Python 2, 38 bytes

1 id=id<3and-~id exec"print id|1"*0**0 

Try it online! (doubled, tripled)

Outputs 1, 1, or 3.


Python 2, 28 bytes

1 True+=1 print`7%True`*0**0 

Try it online! (doubled, tripled)

If leading newlines are OK. Outputs 1,1,3. Uses the True-modifying idea by Aidan F. Pierce from Xcoder's solution.

Python 2, 38 bytes

1 id=id<3and-~id exec"print id|1"*0**0 

Try it online! (doubled, tripled)

Outputs 1, 1, or 3.


Python 2, 33 bytes

1 True+=1 exec"print 7%True"*0**0 

Try it online! (doubled, tripled)

Outputs 1,1,3. Uses the True-modifying idea by Aidan F. Pierce from Xcoder's solution.

added 689 characters in body
Source Link
xnor
  • 149.7k
  • 26
  • 287
  • 676

Python 2, 38 bytes

1 id=id<3and-~id exec"print id|1"*0**0 

Try it online! (doubled, tripled)

Outputs 1, 1, or 3.


Python 2, 28 bytes

1 True+=1 print`7%True`*0**0 

Try it online! (doubled, tripled)

If leading newlines are OK. Outputs 1,1,3. Uses the True-modifying idea by Aidan F. Pierce from Xcoder's solution.

Python 2, 38 bytes

1 id=id<3and-~id exec"print id|1"*0**0 

Try it online! (doubled, tripled)

Outputs 1, 1, or 3.

Python 2, 38 bytes

1 id=id<3and-~id exec"print id|1"*0**0 

Try it online! (doubled, tripled)

Outputs 1, 1, or 3.


Python 2, 28 bytes

1 True+=1 print`7%True`*0**0 

Try it online! (doubled, tripled)

If leading newlines are OK. Outputs 1,1,3. Uses the True-modifying idea by Aidan F. Pierce from Xcoder's solution.

Source Link
xnor
  • 149.7k
  • 26
  • 287
  • 676

Python 2, 38 bytes

1 id=id<3and-~id exec"print id|1"*0**0 

Try it online! (doubled, tripled)

Outputs 1, 1, or 3.