Re: Explanation about for

2012-01-11 Thread RainyDay
On Jan 10, 6:37 am, Νικόλαος Κούρας wrote: > On 10 Ιαν, 12:57, Thomas Rachel > > > > > > > > > a470-7603bd3aa...@spamschutz.glglgl.de> wrote: > > Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας: > > > > --- > > > | HOST    | HITS    | AGENT     | DATE | > >

Re: Explanation about for

2012-01-11 Thread Νικόλαος Κούρας
Thank you All for the detailed examples. I tried them all in IDLE and i finally understood them. Thanks for your patience with me until i understand! 2012/1/10 Nick Dokos > Νικόλαος Κούρας wrote: > > > On 10 Ιαν, 03:11, Ian Kelly wrote: > > > 2012/1/9 Íéêüëáïò Êïýñáò : > > > > > > > if the M

Re: Explanation about for

2012-01-10 Thread Thomas Rachel
Am 10.01.2012 12:37 schrieb Νικόλαος Κούρας: So that means that for host, hits, agent, date in dataset: is: for host, hits, agent, date in (foo,7,IE6,1/1/11) and then: for host, hits, agent, date in (bar,42,Firefox,2/2/10) and then: for host, hits, agent, date in (baz,4,Chrome,3/3/09)

Re: Explanation about for

2012-01-10 Thread Nick Dokos
Νικόλαος Κούρας wrote: > On 10 Ιαν, 03:11, Ian Kelly wrote: > > 2012/1/9 Íéêüëáïò Êïýñáò : > > > > > if the MySQL query was: > > > > > cursor.execute( '''SELECT host, hits, agent, date FROM visitors WHERE pin > > > = > > > %s ORDER BY date DESC''', pin ) > > > > > can you help me imagine how th

Re: Explanation about for

2012-01-10 Thread Frank Millman
" ??" wrote in message news:afd612b7-2366-40be-badf-13c97655f...@o12g2000vbd.googlegroups.com... > > So that means that > > for host, hits, agent, date in dataset: > > is: > > for host, hits, agent, date in (foo,7,IE6,1/1/11) > > and then: > > for host, hits, agent, date in (bar,42

Re: Explanation about for

2012-01-10 Thread Jussi Piitulainen
Νικόλαος Κούρας writes: > So that means that > > for host, hits, agent, date in dataset: > > is: > > for host, hits, agent, date in (foo,7,IE6,1/1/11) > > and then: > > for host, hits, agent, date in (bar,42,Firefox,2/2/10) > > and then: > > for host, hits, agent, date in (baz,4,Chrome,3

Re: Explanation about for

2012-01-10 Thread Νικόλαος Κούρας
On 10 Ιαν, 12:57, Thomas Rachel wrote: > Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας: > > > --- > > | HOST    | HITS    | AGENT     | DATE | > > --- > > | foo     | 7       | IE6       | 1/1/11 | > > --

Re: Explanation about for

2012-01-10 Thread Νικόλαος Κούρας
On 10 Ιαν, 12:57, Thomas Rachel wrote: > Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας: > > > --- > > | HOST    | HITS    | AGENT     | DATE | > > --- > > | foo     | 7       | IE6       | 1/1/11 | > > --

Re: Explanation about for

2012-01-10 Thread Thomas Rachel
Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας: --- | HOST| HITS| AGENT | DATE | --- | foo | 7 | IE6 | 1/1/11 | --- | bar | 42 | Fi

Re: Explanation about for

2012-01-10 Thread Νικόλαος Κούρας
On 10 Ιαν, 03:11, Ian Kelly wrote: > 2012/1/9 Íéêüëáïò Êïýñáò : > > > if the MySQL query was: > > > cursor.execute( '''SELECT host, hits, agent, date FROM visitors WHERE pin = > > %s ORDER BY date DESC''', pin ) > > > can you help me imagine how the mysql database cursor that holds the query > > r

Re: Explanation about for

2012-01-09 Thread Ian Kelly
2012/1/9 Νικόλαος Κούρας : > if the MySQL query was: > > cursor.execute( '''SELECT host, hits, agent, date FROM visitors WHERE pin = > %s ORDER BY date DESC''', pin ) > > can you help me imagine how the mysql database cursor that holds the query > results would look like? I must somehow visualize i

Re: Explanation about for

2012-01-09 Thread Νικόλαος Κούρας
Στις 10 Ιανουαρίου 2012 1:42 π.μ., ο χρήστης Ian Kelly < ian.g.ke...@gmail.com> έγραψε: > > > b) In the 2nd example we have for 'host, hits, agent, date in > > dataset'. How does these 4 variables take their values out of dataset? > > How dataset is being splitted? > > The second example works the

Re: Explanation about for

2012-01-09 Thread Chris Rebert
On Mon, Jan 9, 2012 at 3:23 PM, Νικόλαος Κούρας wrote: > > dataset = cursor.fetchall() > > for row in dataset: >    print ( "" ) > >    for item in row: >        print ( " %s " % item ) > > > and this: > Your second snippet makes u

Re: Explanation about for

2012-01-09 Thread Ian Kelly
2012/1/9 Νικόλαος Κούρας : > > dataset = cursor.fetchall() > > for row in dataset: >    print ( "" ) > >    for item in row: >        print ( " %s " % item ) > > > and this: > > > dataset = cursor.fet

Re: Explanation about for loop

2007-01-11 Thread Gabriel Genellina
At Friday 12/1/2007 01:48, raghu wrote: can any one help me explaining for loop and its execution and its syntax with a simple example. This section of Dive Into Python explain for loops: http://diveintopython.org/file_handling/for_loops.html (And you could read the whole book too) -- Gabrie

Re: Explanation about for loop

2007-01-11 Thread Paul McGuire
"raghu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > can any one help me explaining for loop and its execution and its > syntax with a simple example. > Bookmark this page: http://docs.python.org/ref/ref.html "for loop" reference page: http://docs.python.org/ref/for.html Bookmark

Re: Explanation about for loop

2007-01-11 Thread Amit Khemka
On 11 Jan 2007 20:48:19 -0800, raghu <[EMAIL PROTECTED]> wrote: > can any one help me explaining for loop and its execution and its > syntax with a simple example. Well Guido did that: http://docs.python.org/tut/node6.html#SECTION00620 -- Amit Khemka -- onyomo.com Home Page