On 10/07/13 13:05, Dave Angel wrote:
mylist = [(row[0],0) for row in rows]
I'll guess it's the list comprehension that confuses you. That line is
roughly equivalent to:
mylist = []
for row in rows:
mylist.append( (row[0], row) )
Except the second element in the tuple to append should be
On 07/06/2013 11:18 PM, bluepresley wrote:
I'm reading the book Programming Collective Intelligence by Toby Segaran.
I'm having a lot of difficulty understanding the some of the code from
chapter four (the code for this chapter is available online at
https://github.com/cataska/programming-collect
I'm reading the book Programming Collective Intelligence by Toby Segaran.
I'm having a lot of difficulty understanding the some of the code from
chapter four (the code for this chapter is available online at
https://github.com/cataska/programming-collective-intelligence-code/blob/master/chapter4/se