On 01/09/2013 06:24 PM, andydtay...@gmail.com wrote:
> Thanks for your help - this is what I did - though it's probably obvious to
> most people reading this.
>
>for rowcount in range (0, stn_count):
> row_durations.append(stn_list_short[rowcount])
> for colcount in range (0, stn_c
Thanks for your help - this is what I did - though it's probably obvious to
most people reading this.
for rowcount in range (0, stn_count):
row_durations.append(stn_list_short[rowcount])
for colcount in range (0, stn_count):
# 3. Determine Station pairs for API query
On Wed, Jan 9, 2013 at 11:19 AM, wrote:
>stn_count = len(stn_list_short)
>for rowcount in range (0, stn_count):
> for colcount in range (0, stn_count):
> print stn_list_long[rowcount] stn_list_long[colcount]
First off, you can iterate over the list directly:
for row in st
On Tue 08 Jan 2013 07:19:59 PM EST, andydtay...@gmail.com wrote:
Hi!
I might be missing the obvious, or I may have found something more complicated
than the VBA I am used to. Could it be I need to use a maths library?
For a given list of k items I'd like to turn it into an k*k matrix of item
On Dec 3, 1:38 pm, thor <[EMAIL PROTECTED]> wrote:
> >>> c = [(5, 3), (6, 8)]
> >>> [x for t in zip(*c) for x in t]
> [5, 6, 3, 8]
The zip here is superfluous.
>>> c = [(5, 3), (6, 8)]
>>> zip(*c)
[(5, 6), (3, 8)]
Unless you're -only- using it to ensure your result is the same order
as the OP...
On Dec 2, 10:09 pm, TP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> >>> c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
> >>> [i for (i,j) in c] + [ j for (i,j) in c]
>
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
>
>>> c = [(5, 3), (
On Dec 2, 2:09 pm, TP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> >>> c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
> >>> [i for (i,j) in c] + [ j for (i,j) in c]
>
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
>
One list comprehens
TP <[EMAIL PROTECTED]> writes:
> Hi everybody,
>
c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
[i for (i,j) in c] + [ j for (i,j) in c]
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
Quicker? Hard to say. Using itertools el
TP wrote:
> Hi everybody,
>
c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
[i for (i,j) in c] + [ j for (i,j) in c]
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
dunno if it's faster, but less cluttered:
list(sum(c, ()))
hmm - but I want to store the data in memory eather than a filesystem
... it is not an issue if the program terminates - it is almost needed
while running and does not need to remember where it is ..
the dirctionary is detail = {}
will try the list() function - thanks
Tonino
--
http://mail.pyt
Am Tue, 17 May 2005 05:26:15 -0700 schrieb Tonino:
> Hi ALL,
>
> I am having a issue with a particular storage of data problem and
> wanted to know if I am going about it the wrong way.
>
> I have a list of reference numbers associated with a product and I have
> a socket that listens on a port.
11 matches
Mail list logo