Exercise: Reverting Lines of a File

Write a program revert.py that takes a filename from the commandline, and outputs every line of the file with the line’s characters reversed. (Take care to strip off the linefeeds, or otherwise the linefeed will come first in the reversed line.)