On Wed, Jul 15, 2009 at 11:19 AM, chris Hynes<cjhyne...@hotmail.com> wrote: > I guess I have to start somewhere to ask............ > > I want the user to input a name, say "Chris". I know I can use the code: > > name=raw_input() > > I now want: > > "Chris"=zeros((3,3)) > > so that when I type: > > print Chris > > the return will be an array of zero's 3x3
The usual way to solve this is to use a dictionary: name = raw_input() values = dict() values[name] = zeros((3, 3)) print values[name] Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor