On 9/12/2012 10:41 AM, dkato...@gmail.com wrote:

it's not really homework, i found a lab exercise on the web
> and i;m trying to study with it. maybe not the most efficient way.

i have a file with hostnames ordered line by line.

Key fact for this exercise: open files are iterable.
So your top level structure is...

for line in open(<hostname file>):
  <process hostname in line>

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to