No description!!!

Input  :: [10,20,25,0]

Output :: ["+0", "+10", "+15", "-10"] 

`Show some love, rank and upvote!`

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Data structures

Ad-hoc

Starter code: def equalize(arr):
	

Solutions:
def equalize(arr):
	return ['{:+d}'.format(i - arr[0]) for i in arr]


def equalize(arr):
	return [f'{n - arr[0]:+d}' for n in arr]


def equalize(arr):
	return [f'{e - arr[0]:+d}' for e in arr]


def equalize(arr):
	return [f'{nb - arr[0]:+d}' for nb in arr]


def equalize(arr):
	return ['{:+d}'.format(n - arr[0]) for n in arr]


def equalize(xs):
	return [f'{x - xs[0]:+d}' for x in xs]


from itertools import product

def equalize(xs):
	return ['{:+d}'.format(x - xs[0]) for x in xs]


def equalize(arr):
	return [format(x - arr[0], '+') for x in arr]


equalize = lambda A: ['%+d' % (i - A[0]) for i in A]


def equalize(arr):
	return ['+' + str(x - arr[0]) if x >= arr[0] else '-' + str(arr[0] - x) for x in arr]