> flout = open('/tmp/otherfile', 'w') > for line in open('/etc/passwd').readlines() : > if line.strip()[0] == '#': continue And if you're dealing with files that may have blank lines: if line.strip()[:1] in ('', '#'): continue has an advantage of not failing on resulting zero length strings. -- Emile van Sebille emile at fenx.com ---------