[Tutor] Indexing sequences with long integers

Jon Cosby Jon Cosby" <jcosby@wolfenet.com
Mon, 17 May 1999 10:11:18 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01BEA04D.9B426BE0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi - Is there any way to index sequences with long integers? I see you =
can't multiply sequences with long values, or assign them to the range =
function. I'd like to be able to apply the following code,

     for i in range(min, max, 2):
         if primeTest(i) =3D=3D 1:
           pl.append(i)
     return pl

to long values for min amd max. Any suggestion? Thanks,

Jon Cosby

------=_NextPart_000_0005_01BEA04D.9B426BE0
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.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi - Is there any way to index sequences with long =
integers? I=20
see you can't multiply sequences with long values, or assign them to the =
range=20
function. I'd like to be able to apply the following code,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; for i in range(min, max,=20
2):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if primeTest(i) =
=3D=3D=20
1:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
pl.append(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp; return pl</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>to long values for min amd max. Any suggestion?=20
Thanks,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>Jon Cosby</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01BEA04D.9B426BE0--