Read keyboard input

The first way: 
Import SYS
sys.stdout.write ( "Please enter: \ the n-")
the while True:
Line = sys.stdin.readline ()
IF Line == "\ the n-":
BREAK
the else:
Print (Line)

first two ways:
SYS Import 
s_line = sys.stdin.readline ()
i_line = INPUT ()
Print (len (s_line))
Print (len (i_line))
# Note sys.stdin. readline (), after all the input acquisition, at the end add "\ n, input will" \ n "Ignore

Guess you like

Origin www.cnblogs.com/byh7595/p/11966318.html