manuel aldana wrote:hey, i am scripting in python. i am quite annoyed that i can't pop() an list element without removing it. is there a built-in way to get the last element and still keep it in the list?
Lasse Koskela wrote: >>> list = [ "first", "second", "third" ] >>> list ['first', 'second', 'third'] >>> list[-1] 'third' >>> list ['first', 'second', 'third']
This message was edited 1 time. Last update was at Jul 27, 2011 02:04:00 by akhter wahab
more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture