Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

##Python 2, 52 bytes

Python 2, 52 bytes

from sys import*
while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

###OR, 25 bytes

OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

##Python 2, 52 bytes

from sys import*
while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

###OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

Python 2, 52 bytes

from sys import*
while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

added 4 characters in body
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101

##Python 2, 52 bytes

from sys import*;whileimport*
while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

###OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

##Python 2, 52 bytes

from sys import*;while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

###OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

##Python 2, 52 bytes

from sys import*
while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

###OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

added 128 characters in body
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101

##Python 2, 52 bytes

from sys import*;while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

###OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

##Python 2, 52 bytes

from sys import*;while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

##Python 2, 52 bytes

from sys import*;while 1:stdout.write(stdin.read(1))

Python will only echo when a newline has been pressed because by default the terminal only sends input to the program after a newline.

###OR, 25 bytes

while 1:print raw_input()

In this program, the code explicitly waits for a newline before printing

Rollback to Revision 3
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101
Loading
golfed after query
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101
Loading
Post Undeleted by Blue
fixed to spec
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101
Loading
Post Deleted by Blue
edited body
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101
Loading
Source Link
Blue
  • 28.8k
  • 8
  • 53
  • 101
Loading

AltStyle によって変換されたページ (->オリジナル) /