import numpy as np

# Write a function that takes as input a list of numbers, and returns
# the list of values given by the softmax function.


def softmax(L):
    expL = np.exp(L)
    return np.divide(expL, expL.sum())


# e.g. [1, 2, 3, 4]
arr1 = [1, 2, 3, 4]
out = softmax(arr1)
print("\nOutput array : \n", out)
