[Tutor] Arrays and tuples

Deirdre Hackett Deirdre Hackett" <deirdrehac@lycos.co.uk
Mon Jan 27 10:35:06 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0049_01C2C619.564A7F00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there,=20
Thanks for all the advice the last time. Worked out great!

I want to now put my 3 integer values into an array but it will not let =
me do

data[0] =3D int(x2string)
data[1] =3D int(y2string).... etc

instead I have to
data =3D (int(x2string), int(y2string), int(z2string))

and this is only a tuple in which the size cannot be changed.

Can you create an array that you can append values to it. You cannot =
append vales to a tuple - its size is static.

Not a big deal, but would like to know for the future.
Thanks
Deirdre

=20

------=_NextPart_000_0049_01C2C619.564A7F00
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi there, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for all the advice the last =
time. Worked out=20
great!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I want to now put my 3 integer values =
into an array=20
but it will not let me do</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>data[0] =3D int(x2string)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>data[1] =3D int(y2string).... =
etc</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>instead I have to</DIV>
<DIV>data =3D (int(x2string), int(y2string), int(z2string))</DIV>
<DIV>&nbsp;</DIV>
<DIV>and this is only a tuple in which the size cannot be changed.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Can you create an array that you can append values to it. You =
cannot append=20
vales to a tuple - its size is static.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Not a big deal, but would like to know for the future.</DIV>
<DIV>Thanks</DIV>
<DIV>Deirdre</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_0049_01C2C619.564A7F00--