Last 4 Letters of String

Tim Chase python.list at tim.thechases.com
Mon Feb 25 14:34:12 CET 2008


> How would you get the last 4 items of a list?

Did you try the same "get the last 4 items" solution that worked 
for a string?

   lst[-4:]

-tkc





More information about the Python-list mailing list