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

Newsgroups comp.lang.python
Date 2013-01-09 15:24 -0800
References <25c1f151-7323-42de-833f-15639b6eff71@googlegroups.com> <mailman.300.1357697174.2939.python-list@python.org>
Subject Re: Best way to do this? List loop (matrix?) iteration
From andydtaylor@gmail.com
Message-ID <mailman.345.1357773894.2939.python-list@python.org> (permalink)

Show all headers | 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