def last(iterator, default=None):
    'Return last member of an `iterator`\n\n    Example:\n        >>> def it():\n        ...   yield 1\n        ...   yield 2\n        ...   yield 3\n        ...\n        >>> last(it())\n        3\n\n    '
    last = default
    for member in iterator:
        last = member
    return last
Return last member of an `iterator`

Example:
    >>> def it():
    ...   yield 1
    ...   yield 2
    ...   yield 3
    ...
    >>> last(it())
    3
def last(iterator, default=None):
    'Return last member of an `iterator`\n\n    Example:\n        >>> def it():\n        ...   yield 1\n        ...   yield 2\n        ...   yield 3\n        ...\n        >>> last(it())\n        3\n\n    '
    last = default
    for member in iterator:
        last = member
    return last