Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36528

Re: Best way to do this? List loop (matrix?) iteration

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <andydtaylor@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.117
X-Spam-Level *
X-Spam-Evidence '*H*': 0.78; '*S*': 0.01; 'paths': 0.05; 'api': 0.09; '(0,': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python- list': 0.10; 'andy': 0.16; 'determining': 0.16; 'pairs': 0.16; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'topic': 0.27; 'skip:q 20': 0.29; 'probably': 0.29; 'this.': 0.29; 'that.': 0.30; 'query': 0.30; 'subject:List': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'received:209.85': 0.35; 'something': 0.35; 'but': 0.36; "i'll": 0.36; 'subject: (': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'help': 0.40; 'your': 0.60; 'from:no real name:2**0': 0.60; 'range': 0.60; 'most': 0.61; 'stuck': 0.65; 'station': 0.66; 'obvious': 0.71; 'subject:this': 0.84; 'duration.': 0.84; 'works!': 0.84; 'stations': 0.91; 'subject:Best': 0.91; 'journey': 0.93
Newsgroups comp.lang.python
Date Wed, 9 Jan 2013 15:24:49 -0800 (PST)
In-Reply-To <mailman.300.1357697174.2939.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=86.27.139.172; posting-account=ojw3_QoAAAB4Zzcen71hZ3z681_sEkyv
References <25c1f151-7323-42de-833f-15639b6eff71@googlegroups.com> <mailman.300.1357697174.2939.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 86.27.139.172
MIME-Version 1.0
Subject Re: Best way to do this? List loop (matrix?) iteration
From andydtaylor@gmail.com
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.345.1357773894.2939.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1357773894 news.xs4all.nl 6933 [2001:888:2000:d::a6]:41153
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:36528

Show key headers only | View raw


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
         query_origin_stop = stn_list_long[rowcount]
         query_destination_stop = stn_list_long[colcount]
         # 4. Paths for determining duration. "station x = station x" has journey time 0
         # 4a. Stations are SAME


....etc. and this part works! I am now stuck on something else though, but I'll start a new topic for that.

Thanks

Andy

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Best way to do this? List loop (matrix?) iteration andydtaylor@gmail.com - 2013-01-08 16:19 -0800
  Re: Best way to do this? List loop (matrix?) iteration Mitya Sirenef <msirenef@lightbird.net> - 2013-01-08 19:33 -0500
  Re: Best way to do this? List loop (matrix?) iteration Chris Angelico <rosuav@gmail.com> - 2013-01-09 13:06 +1100
    Re: Best way to do this? List loop (matrix?) iteration andydtaylor@gmail.com - 2013-01-09 15:24 -0800
      Re: Best way to do this? List loop (matrix?) iteration Dave Angel <d@davea.name> - 2013-01-09 18:49 -0500
    Re: Best way to do this? List loop (matrix?) iteration andydtaylor@gmail.com - 2013-01-09 15:24 -0800

csiph-web