get last two in a length of unknown length?
Skip Montanaro
skip at pobox.com
Wed Aug 18 22:58:52 EDT 2004
MC> I have a list of varying length. Would someone know the way to get
MC> the last two values for this?
mylist[-2:]
Skip
More information about the Python-list
mailing list