Re: [Tutor] Syntax error and EOL Error

2015-09-15 Thread Nym City via Tutor
-Thank you very much for your feedback. It was definitely helpful. I will try to stay consistent with my coding style in the future projects.   On Sunday, September 13, 2015 3:01 PM, Danny Yoo wrote: On Sun, Sep 13, 2015 at 7:20 AM, Nym City via Tutor wrote: > Hello, > Sorry fo

Re: [Tutor] Syntax error and EOL Error

2015-09-13 Thread Danny Yoo
On Sun, Sep 13, 2015 at 7:20 AM, Nym City via Tutor wrote: > Hello, > Sorry for the late response. It took me sometime to find the solution. Below > is my updated code which seems to be working fine now. Just wanted to share > with the group here. > > import csv > DomainList = [] > > domains = o

Re: [Tutor] Syntax error and EOL Error

2015-09-13 Thread Nym City via Tutor
Hello, Sorry for the late response. It took me sometime to find the solution. Below is my updated code which seems to be working fine now. Just wanted to share with the group here. import csv DomainList = [] domains = open('domainlist.csv', 'r') DomainList = csv.reader(domains) DomainList = [co

Re: [Tutor] Syntax error and EOL Error

2015-09-07 Thread Alan Gauld
On 07/09/15 01:40, Nym City via Tutor wrote: Hello, Thank you for your response. I have made updates and here is the new code: import csv DomainList = [] domains = open('domainlist.csv', 'rb') DomainList = csv.reader(domains) DomainList = [column[1] for column in DomainList(str.rstrip('/'))] S

Re: [Tutor] Syntax error and EOL Error

2015-09-07 Thread Nym City via Tutor
Hello, Thank you for your response. I have made updates and here is the new code: import csv DomainList = [] domains = open('domainlist.csv', 'rb') DomainList = csv.reader(domains) DomainList = [column[1] for column in DomainList(str.rstrip('/'))] print(DomainList) For "DomainList = [column[1] for

Re: [Tutor] Syntax error and EOL Error

2015-09-04 Thread Peter Otten
Nym City via Tutor wrote: > import csv > DomainList = [] > > domains = open('domainlist.csv', 'r') > DomainList = csv.reader(domains) > DomainList = [column[1] for column in DomainList] > DomainList = (str(DomainList).rstrip('/') > print('\n'.join(DomainList)) > > > I keep getting EOL error on

[Tutor] Syntax error and EOL Error

2015-09-03 Thread Nym City via Tutor
Hello, I am working with a csv file that has following sample data: Rank    URL    Linking Root Domains 1    facebook.com/    9616487 2    twitter.com/    6454936 3    google.com/    5868081 4    youtube.com/    5442206 5    wordpress.org/    4051288 In my program, I am reading in this csv file, t