Returns the nth item or a default value

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

def nth(iterable, n, default=None):
        """Returns the nth item or a default value

        Arguments
        ---------
        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)