Re: suppress newlines in my script

2013-05-24 Thread Jason Friedman
> Here are two lines from the CSV file: > ,,172.20.{0}.0/27,172.20.{0}.32/27,172.20.{0}.64/27,29,172.20.{0}.96/27172.21.{0}.0/27,172.21.{0}.32/27,172.21.{0}.64/27,29,172.21.{0}.96/27 > GW:,,172.20.{0}.1,172.20.{0}.33,172.20.{0}.65,,172.20.{0}.97,,GW:,,172.21.{0}.1,172.21.{0}.33,172.21.{0}.65,,1

Re: suppress newlines in my script

2013-05-24 Thread Dave Angel
On 05/24/2013 09:59 AM, sloan...@gmail.com wrote: http://wiki.python.org/moin/GoogleGroupsPython > print PE2.format(count) Thanks for the tip about the CSV module. I did not know about that. So why aren't you using it? There's not much point in solving "the newlines pro

Re: suppress newlines in my script

2013-05-24 Thread sloan949
On Thursday, May 23, 2013 1:49:02 PM UTC-7, sloa...@gmail.com wrote: > I am importing lines from an external csv file and when I iterate through the > lines and increment, new lines are introduced. > > How would I cut out the newlines. I have attempted several pythonic strip() > and rstrip() ho

suppress newlines in my script

2013-05-23 Thread sloan949
I am importing lines from an external csv file and when I iterate through the lines and increment, new lines are introduced. How would I cut out the newlines. I have attempted several pythonic strip() and rstrip() how can i implent this? import sys, os f=open('europe_csv') lines=f.readlines()