En Mon, 14 Apr 2008 01:41:55 -0300, reetesh nigam  
<[EMAIL PROTECTED]> escribió:

> hi,
> l=['5\n', '2\n', '7\n', '3\n', '6\n']
>
> how to remove \n from the given list

l is is very poor name... I'll use lines instead:

lines[:] = [line.rstrip('\n') for line in lines]

-- 
Gabriel Genellina

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

Reply via email to