Your task is to find the number couple with the greatest difference from a given array of number-couples. 

All number couples will be given as strings and all numbers in them will be positive integers.  

For instance: ['56-23','1-100']; in this case, you should identify '1-100' as the number couple with the greatest difference and return it.

In case there are more than one option, for instance ['1-3','5-7','2-3'], you should identify whichever is first, so in this case '1-3'. 

If there is no difference, like so ['11-11', '344-344'], return false.

Difficulty: introductory

Starter code:

def diff(arr):
	

Solutions:
def diff(arr):
    r = arr and max(arr, key = lambda x : abs(eval(x)))
    return bool(arr and eval(r)) and r

def diff(arr):
    r = [abs(eval(s)) for s in arr]
    return arr[r.index(max(r))] if r and max(r) else False


def diff(arr):
    r = [abs(int(w.split('-')[0])-int(w.split('-')[1])) for w in arr]
    return arr[r.index(max(r))] if sum(r) else False

def diff(arr):
    if not arr: return 0
    m = max(arr, key=lambda x: abs(eval(x)))
    return eval(m) and m

def difference(x):
    a, b = map(int, x.split('-'))
    return abs(a-b)


def diff(arr):
    if not arr:
        return False
    x = max(arr, key=difference)
    if difference(x) == 0:
        return False
    return x

def diff(pairs):
    max_diff = max_pair = 0
    for pair in pairs:
        a, b = pair.split('-')
        current = abs(int(a) - int(b))
        if current > max_diff:
            max_diff = current
            max_pair = pair
    return max_pair

def diff(arr):
    #your code here
    vals = [abs(eval(pair)) for pair in arr]
    return False if all(val == 0 for val in vals) else arr[vals.index(max(vals))]
    return val

def diff(arr):
    
    z = {}
    
    for i in range(0,len(arr)):
        
        s = arr[i].split('-')
        
        d = abs(int(s[0])-int(s[1]))
        
        z.update({arr[i]:d})
    
    w = {k:v for k,v in sorted(list(z.items()),reverse=True,key=lambda x:x[1])}

    if w=={} or max(w.values()) == 0:
        
        return False
    
    else:
        
        return max(w,key=w.get)


def diff(arr):
    diff = []
    if arr == []:
        return False
    for i in range(len(arr)):
        str = arr[i].split('-')
        diff.append(abs(int(str[1])-int(str[0])))
    if max(diff) == 0:
        return False
    for j in range(len(arr)):
        if diff[j] == max(diff):
            return arr[j]

def diff(arr):
    if not arr: return False
    def cust_key(s):
        a,b=map(int,s.split("-"))
        return abs(a-b)
    m=max(arr,key=cust_key)
    return m if len(set(m.split("-")))==2 else False