Imagine you start on the 5th floor of a building, then travel down to the 2nd floor, then back up to the 8th floor. You have travelled a total of 3 + 6 = 9 floors of distance.

Given an array representing a series of floors you must reach by elevator, return an integer representing the total distance travelled for visiting each floor in the array in order. 

```
// simple examples
elevatorDistance([5,2,8]) = 9
elevatorDistance([1,2,3]) = 2
elevatorDistance([7,1,7,1]) = 18

// if two consecutive floors are the same,
//distance travelled between them is 0
elevatorDistance([3,3]) = 0
```

Array will always contain at least 2 floors. Random tests will contain 2-20 elements in array, and floor values between 0 and 30.

Difficulty: EASY
Starter code: def elevator_distance(array):
	

Solutions:
def elevator_distance(array):
	return sum((abs(a - b) for (a, b) in zip(array, array[1:])))


def elevator_distance(array):
	return sum((abs(array[i + 1] - array[i]) for i in range(len(array) - 1)))


def elevator_distance(floors):
	return sum((abs(floors[i + 1] - floors[i]) for i in range(len(floors) - 1)))


def elevator_distance(array):
	a = 0
	for i in range(0, len(array) - 1):
		a += abs(int(array[i]) - int(array[i + 1]))
	return a


def elevator_distance(array):
	return sum((abs(x - y) for (x, y) in zip(array[:-1], array[1:])))


def elevator_distance(array):
	n = len(array)
	m = 0
	total_dist = 0
	while n >= 2:
		distance = abs(array[m] - array[m + 1])
		total_dist += distance
		n -= 1
		m += 1
	return total_dist


def elevator_distance(ls):
	return sum((abs(x - y) for (x, y) in zip(ls, ls[1:])))


from functools import reduce

def elevator_distance(lst):
	return sum((abs(a - b) for (a, b) in zip(lst, lst[1:])))