def last(iterable, *default):
	"""Return the last item of an iterable or 'default' if there's none."""

	try:
		iterable = reversed(iterable)
	except TypeError:
		pass
	else:
		return next(iterable, *default)

	iterable = iter(iterable)
	x = next(iterable, *default)
	for x in iterable:
		pass
	return x