On Oct 12, 11:32 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I have a file containing following data. But the dimension can be
> different.
>
> A B C D E F G
> 3 4 1 5 6 2 4
> 7 2 4 1 6 9 3
> 3 4 1 5 6 2 4
> 7 2 4 1 6 9 3
> .
> .
> .
> .
>
> What is the best approach to make a column vector with the name such
> as A B, etc?

Use a dict.  dict objects are the main way we map names to objects on
the fly.  Simple example:

columns = {}
columns["A"] = [3,7,3,3]
columns["B"] = [4,2,4,2]


Filling in the columns with data from your file is left as an
exercise.


Carl Banks

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to