numbers = list(map(float, numbers.split(',')))
average_function = {'mean': np.average, 'median': np.median, 'mode': np.
    mode, 'range': np.arange}
try:
    print(average_function[welcomeString](numbers))
except KeyError:
    sys.exit('You entered an invalid average type!')
eval(input())
Using Numpy to find Mean,Median,Mode or Range of inputted set of numbers