[Tutor] Q?

Rishi Maker rsmaker@bom7.vsnl.net.in
Fri, 1 Sep 2000 10:09:29 +0530


--y0ulUmNC+osPPQO6
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

This does not work for various reason .. Look at this script , you should f=
igure out why.
        # The while practice:
a=3D['hello','world','i','am','a','worker']
print a
i=3D0
x=3Dlen(a)-1
b=3D[]
while i<len(a):
        b.insert(i,a[x-i])
        i=3Di+1
print b



And Then  deng wei wrote .............=20
=20
> tutorHello:
>   The Python said this is wrong.But I think it's right.Why?
>=20
> 	# The while practice:
> 	a=3D['hello','world','i','am','a','worker']
> 	i=3D0
> 	while i<len(a):
> 		b[i]=3Da[len(a)-i]
> 		i=3Di+1
> 	print b
>=20
>=20
>                  =20
>=20
>             DengWei
>             deng@ms.shlftdc.net.cn
>=20
>=20
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://www.python.org/mailman/listinfo/tutor

--=20
---------------------------------------------------------------------------=
----
Signature Follows :-

Rishi Maker			|------------Quote Of The Mail----------------|
Web Developer			|The church saves sinners, but science seeks  |=09
rishim@cyberspace.org		|to stop their manufacture.   -- Elbert       |
Tel : 91-22-5374892		|Hubbard                                      |
ICQ UIN :-56551784		|                                             |
---------------------------------------------------------------------------=
----
----------------The Following has been stolen from fortune cookies---------=
----
---------------------------------------------------------------------------=
----
	| ----:----:----:-----:----:----:----:----:----:----:----:----:|
--------|	guru, n:  A computer owner who can read the manual.    |-------=
=09
	| ----:----:----:-----:----:----:----:----:----:----:----:----:|
---------------------------------------------------------------------------=
----
    if (argc > 1 && strcmp(argv[1], "-advice") =3D=3D 0) {
	printf("Don't Panic!\n");
	exit(42);
    }
(Arnold Robbins in the LJ of February '95, describing RCS)
---------------------------------------------------------------------------=
----
We are using Linux daily to UP our productivity - so UP yours!
(Adapted from Pat Paulsen by Joe Sloan)
---------------------------------------------------------------------------=
----
`When you say "I wrote a program that crashed Windows", people just stare at
you blankly and say "Hey, I got those with the system, *for free*".'
(By Linus Torvalds)
---------------------------------------------------------------------------=
----
			Copyleft --:- =AE=D8=A7h=EC M=E5k=EBr -:--
---------------------------------------------------------------------------=
----

--y0ulUmNC+osPPQO6
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: BkAtZlMcBXnBJJJ0CW/tQsS2NXGJzEyn

iQA/AwUBOa8zAMjbonC6FpvoEQKUjQCeL+63BE0IPOiHxz/b0/pb4v3VB2AAoIFF
3Rx4coXna78h+kVf2TLPjj9C
=w544
-----END PGP SIGNATURE-----

--y0ulUmNC+osPPQO6--