Given an array of numbers, return a string made up of four parts:
a) a four character 'word', made up of the characters derived from the first two and last two numbers in the array. order should be as read left to right (first, second, second last, last),
b) the same as above, post sorting the array into ascending order,
c) the same as above, post sorting the array into descending order,
d) the same as above, post converting the array into ASCII characters and sorting alphabetically.
The four parts should form a single string, each part separated by a hyphen: '-'
example format of solution: 'asdf-tyui-ujng-wedg'
def extract(arr): return ''.join(arr[:2]+arr[-2:])

def sort_transform(arr):
    arr = list(map(chr,arr))
    w1  = extract(arr)
    arr.sort()
    w2  = extract(arr)
    return f'{w1}-{w2}-{w2[::-1]}-{w2}'
def extract(arr): return ''.join(arr[:2]+arr[-2:])

def sort_transform(arr):
    arr = list(map(chr,arr))
    w1  = extract(arr)
    arr.sort()
    w2  = extract(arr)
    return f'{w1}-{w2}-{w2[::-1]}-{w2}'