[Tutor] List of ints

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Mar 4 00:44:16 CET 2015


On 03/03/2015 23:09, Phil wrote:
> On 03/03/15 17:46, Mark Lawrence wrote:
>>
>> You are trying to increment the first element of count which is itself a
>> list containing one element.  You actually need:-
>>
>> count[0][0] +=1
>>
>
> Thank you Lawrence, Alan, and Danny,
>
> The solution is embarrassingly obvious. It's been a long time since I've
> attempted any programming and I'd even forgotten that I needed a nested
> loop to access the cells in a two-dimensional array, or list. In this
> case I didn't need a two-dimensional array anyway.
>
> I'd been away from home for five weeks and during a quiet period I
> installed QPython on my tablet with the aim of porting a programme that
> I'd written in C++ 15 years ago to Python. Cutting and pasting and even
> moving around the IDE turned out to be a truly frustrating exercise.
>
> I wonder if it was just my clumsiness or if others have had the same
> experience?
>

Having never heard of QPython I've just looked it up, so for those who 
don't know from http://qpython.com/ it's "a script engine which runs 
Python programs on android devices".  I doubt if there is much 
experience on this list with it although you might get lucky.

I am aware though of http://bugs.python.org/issue23496 "Steps for 
Android Native Build of Python 3.4.2" which may be of interest.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list