(iterable, n, default=None)
return next(islice(iterable, n, None), default)
Returns the nth item or a default value

        Parameters
        ----------
        iterable : iterable
        n : int
        default : default=None
            The default value to return
Returns the nth item or a default value
Returns the nth item or a default value
def nth(iterable, n, default=None):
        """Returns the nth item or a default value

        Parameters
        ----------
        iterable : iterable
        n : int
        default : default=None
            The default value to return
        """

        if type(n) != int:
            raise TypeError("n is not an integer")

        return next(islice(iterable, n, None), default)
def nth ( iterable , n , default = None ) : if type ( n ) != int : raise TypeError ( "n is not an integer" ) return next ( islice ( iterable , n , None ) , default )