------------------------------------------------------------------------------
MC logo
Copy Input to Output III
[^] Code Examples
------------------------------------------------------------------------------
<<Copy Input to Output II copy3.py User Lister>>
#!/usr/bin/python3

# Script to copy standard input to standard output using the readlines
# operation which (at least virtually) reads the entire file.

import sys

# Loop through each input line.
for line in sys.stdin.readlines():
    # Print the line read.
    print(line[:-1])

Now, that's a concise loop.
<<Copy Input to Output II User Lister>>