[Tutor] I am reading the tutorial alright?

bob gailer bgailer at alum.rpi.edu
Mon Mar 24 00:13:47 CET 2008


elis aeris wrote:
> t = 12345, 54321, "hello!"
> print t[0]
>
> the way the 3 items are saved and access fits my need, now how do I 
> make t have more than one entry so effectively I get this?
>
> t[n][n]
>
(1) are you going through the tutorials as requested?
(2) please learn how to ask meaningful questions
For example t[n][n] does not communicate the outcome you desire.
In Python t[n][n] would get you the nth element of the nth element of t. 
For example if n were 2 you'd get 3. If that is what you want you just 
answered your own question, as a simple test in the Python interactive 
window would reveal.

Otherwise we can only guess as to what you want and that wastes all of 
our time!

It would be far more effective to show us what the result would look 
like based on the data you entered into t.

PLEASE do as much as you can to solve problems yourself and express 
questions CLEARLY!

-- 
Bob Gailer
919-636-4239 Chapel Hill, NC



More information about the Tutor mailing list