[Tutor] x and y
Alan Gauld
alan.gauld at btinternet.com
Sat Mar 22 23:48:40 CET 2008
"elis aeris" <hunter92383 at gmail.com> wrote
> on a different note, also on lists, I need to save two values, x
> and y.
>
> list = { int, int
> int, int
> int, int
>
> but i am not sure of the syntax, is it possible to just read both
> values
> from the same entry in the list ?
I have no idea what you mean by that, can you give a more
specific example?
Are you trying to extract 2 values out of a list into variables?
Are you trying to save two variable values into a list?
And what kind of list is your example?
It uses a built in function(list) to refer to something that looks
like a cross between a dictionary and an open list but filled
with the same value (or another built in function?)
Can you try using a Python example with real values and tell
us what you want to dowith them. (And try it at the >>> prompt
first, since the most obvious solution is often the right one in
Python!)
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list