[Tutor] (no subject)

Adam Cripps kabads at gmail.com
Sat Sep 4 20:05:34 CEST 2004


----- Original Message -----
From: Jon Kolbe <jonnorkol at yahoo.com>
Date: Sat, 4 Sep 2004 09:15:06 -0700 (PDT)
Subject: Re: [Tutor] (no subject)
To: Adam Cripps <kabads at gmail.com>


Adam Cripps <kabads at gmail.com> wrote: 
 


Something like this should get you the sort of thing you are aiming for:

cliche = []
power = raw_input ("What power would you like?")
cliche.Add(power)

This would store the input into the first 'slot' of the list (in this
case power[0]).

However, to me it sounds like your problem would better resolved with
an object oriented approach. Does anyone else think this might suit
Jon better?

Adam
 
 

Thanks, I didn't even consider using objects (They look scary). I'll
try out that approach and see if it works.

Jon


I'm not sure if it will suit your problem, but I had a similar
situation when I was trying to write a magazine catalogue system. To
save myself entering information over and over again, I created
objects and stored the data within objects.

In fact, I was scared of Oo design until I wrote it in Python (my
previous experience was Java). Python actually makes Oo very clear and
easy to understand.

Why not have a quick go - you've not got much to lose. 
Adam
--
proj: http://jiletters.sf.net
site: http://www.monkeez.org
wiki: http://wiki.monkeez.org


More information about the Tutor mailing list