enter number> squared is enter number>bye herethe input txt file automates the input we would normally type interactively--the script reads from this file rather than from the keyboard standard output can be similarly redirected to go to file with the filename shell syntax in factwe can combine input and output redirection in single commandc:\pp \system\streamspython teststreams py output txt :\pp \system\streamstype output txt hello stream world enter number> squared is enter number> squared is enter number>bye this timethe python script' input and output are both mapped to text filesnot to the interactive console session chaining programs with pipes on windows and unix-like platformsit' also possible to send the standard output of one program to the standard input of another using the shell character between two commands this is usually called "pipeoperation because the shell creates pipeline that connects the output and input of two commands let' send the output of the python script to the standard more command-line program' input to see how this worksc:\pp \system\streamspython teststreams py input txt more hello stream world enter number> squared is enter number> squared is enter number>bye hereteststreams' standard input comes from file againbut its output (written by print callsis sent to another programnot to file or window the receiving program is morea standard command-line paging program available on windows and unix-like platforms because python ties scripts into the standard stream modelthoughpython scripts can be used on both ends one python script' output can always be piped into another python script' inputc:\pp \system\streamstype writer py print("helphelpi' being repressed!"print( :\pp \system\streamstype reader py print('got this"% "input()import sys data sys stdin readline()[:- print('the meaning of life is'dataint(data script execution context