Copy Input to Output II
# Script to copy standard input to standard output, one line at a time,
# now using a break.
# Loop until terminated by the break statement.
# Get the line, exit if none.
line = sys.stdin.readline()
if not line:
# Print the line read.
This gets around the problem of not being able to assign in the
while test and
lets you write the loop without repeating the read.