"Matt Herzog" <m...@blisses.org> wrote
remembered that strings are immutable. So how was I able to change the strings for my dotted quad?
You didn't.
LASTKNOWN = '173.48.204.168' lns = cf.readlines() lns = "".join(lns) lns = re.sub(LASTKNOWN, CURRENT, lns)
I assume this is the line in question? sub() returns a new string containing the substitutions. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor