return the last item in a list

David Bear David.Bear at asu.edu
Wed Mar 30 12:48:17 EST 2005


I've googled for the above and get way too many hits.. 

I'm looking for an 'easy' way to have the last item in a list returned.

I've thought about

list[len(list)-1]

but thought there would be a more gracefull way.




More information about the Python-list mailing list