Re: [Tutor] Python incrementing problem

2012-10-17 Thread eryksun
On Thu, Oct 11, 2012 at 3:29 PM, Stephen Hooker wrote: > > I try to store 1 result it works fine. If I try to store more than 1 result > I get one or the other, never both. The code is below (not the whole > program) > > for i in range(2): > pos = random.randrange(0,len(rolling_stock_OS)) > pick =

[Tutor] Python incrementing problem

2012-10-17 Thread Stephen Hooker
Hello, I'm using Python 2.6 to generate switch lists for a model railroad. I had some help before, possibly from this site but have encountered another problem. I realise the code could be better written, but learning Python is a work in progress. The program works much as expected except when I t