[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

Re: [Tutor] Creating lists with definite (n) items without repetitions

2015-09-03 Thread Danny Yoo
> At first I thought you might want itertools.combinations() > import string, itertools for t in itertools.combinations(string.ascii_lowercase, 3): > ... print t # list(t) if you actually need a list > ... > ('a', 'b', 'c') > ('a', 'b', 'd') > ('a', 'b', 'e') > ('a', 'b', 'f') > ('a',

Re: [Tutor] Creating lists with definite (n) items without repetitions

2015-09-03 Thread Mark Lawrence
On 03/09/2015 14:32, Marcus Lütolf wrote: dear pythonistats as a newcomber I want to create a set of lists containing n items, for example n = 3: (['a','b','c'], ['a','d','e']...). The sequence of items in each list should be different. If the letters 'a''z' are used and n = 3 there

Re: [Tutor] Creating lists with definite (n) items without repetitions

2015-09-03 Thread Martin A. Brown
Greetings Marcus, Peter Otten has also responded, recommending itertools. I think both he and I are not sure how you wish to generate your result list (or lists). But, I have a comment or two. dear pythonistats as a newcomber I want to create a set of lists containing n items, for exampl

Re: [Tutor] Creating lists with definite (n) items without repetitions

2015-09-03 Thread Peter Otten
Marcus Lütolf wrote: > as a newcomber I want to create a set of lists containing n items, for > example n = 3: (['a','b','c'], ['a','d','e']...). > The sequence of items in each list should be different. If the letters > 'a''z' are used and n = 3 there is a maximum of 301 lists. > The

[Tutor] Creating lists with definite (n) items without repetitions

2015-09-03 Thread Marcus Lütolf
dear pythonistats as a newcomber I want to create a set of lists containing n items, for example n = 3: (['a','b','c'], ['a','d','e']...). The sequence of items in each list should be different. If the letters 'a''z' are used and n = 3 there is a maximum of 301 lists. The following