def kendallTauDistance(order1, order2):
	""" Returns the Kendall's tau distance between two orders.

		:param order1: The first order.
		:type order1: tuple
		:param order2: The second order.
		:type order2: tuple

		:return: The Kendall's tau distance between the two orders.
		:rtype: int
	"""
	if len(order1) != len(order2):
		raise ValueError("Rankings must have the same length to compute their Kendall's tau distance")
	res = 0
	norm = 0
	for j1 in range(len(order1)):
		for j2 in range(j1 + 1, len(order1)):
			if (order2.index(order1[j1]) > order2.index(order1[j2])):
				res += 1
			norm += 1
	return res / norm