Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions ( http://sports.yahoo.com/nba/players?type=lastnamefirst=1query=go=GO!). Unfortunately, when I do this I have no choice but to include a single

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Peter Otten
Guillaume Chorn wrote: Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions ( http://sports.yahoo.com/nba/players?type=lastnamefirst=1query=go=GO!). Unfortunately, when I do this I have no choice

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
Le 29/02/2012 09:25, Guillaume Chorn a écrit : Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions (http://sports.yahoo.com/nba/players?type=lastnamefirst=1query=go=GO!

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
Le 29/02/2012 10:01, Karim a écrit : Le 29/02/2012 09:25, Guillaume Chorn a écrit : Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
Thanks, the suggestion print name.decode(utf-8).strip() worked like a charm. When I did the print repr(name) I got exactly what you predicted. I'm not yet sure what all of this means, but I'm going to read this http://docs.python.org/howto/unicode.html in the hopes of finding out. Anyway

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Dave Angel
On 02/29/2012 04:05 AM, Guillaume Chorn wrote: Thanks, the suggestion print name.decode(utf-8).strip() worked like a charm. When I did the print repr(name) I got exactly what you predicted. I'm not yet sure what all of this means, but I'm going to read