Hello,
I am trying to simplify this function at his maximum, how can I do?
def eleMax(items, start=0, end=None):
if end is None:
end = len(items)
return max(items[start:end])
I though of
def eleMax(items, start=0, end=-1):
return max(items[start:end])
But the last element is deleted from the list.
Thank for your help.