[Ilugc] Python list.reverse() [was: Re: [Fwd: [ilugcbe] Fifth Meeting Pics & Sri Shakthi Institute of Engineering and Technology updated in Open Street Map]]

  • From: noorul@xxxxxxxxxx (Noorul Islam K M)
  • Date: Tue, 15 Feb 2011 14:25:00 +0530

openbala <damodaran.balaji at gmail.com> writes:

On Mon, Feb 14, 2011 at 12:52 PM, Kenneth Gonsalves
<lawgon at thenilgiris.com> wrote:

-------- Forwarded Message --------
From: Biju .B <bijubkbk at gmail.com>
Reply-to: ilugcbe at googlegroups.com
To: ilugcbe at googlegroups.com
Subject: [ilugcbe] Fifth Meeting Pics & Sri Shakthi Institute of
Engineering and Technology updated in Open Street Map
Date: Sun, 13 Feb 2011 20:14:49 +0530

Hi all

The Pics of Fifth meeting is uploaded in the Following Link

https://picasaweb.google.com/lh/sredir?uname=108629989013115149881&target=ALBUM&id=5573081658520266161&authkey=Gv1sRgCJWEtoqK35eVDw&invite=CKT5y88L&feat=email


One picture showed that a person is demonstrating python REPL and
list.reverse() actually reverses the list's own - instead of not
modifying the list and just printing the output.
I downloaded python and tested it through REPL and it was indeed true.

Thanks for letting me know this 'gotchas' in python. Learned something
new today :)



What is wrong below?

numbers = [1, 2, 3, 4, 5]
numbers.reverse()
numbers
[5, 4, 3, 2, 1]
list.reverse(numbers)
numbers
[1, 2, 3, 4, 5]

Thanks and Regards
Noorul


The following is the link to the Position of Sri Shakthi Institute of
Engineering and Technology updated in Open Street Map

http://www.openstreetmap.org/?lat=11.04298&lon=77.07242&zoom=15&layers=M

Regards
Biju

--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Other related posts: