• + 0 comments

    For those getting an error with this code:

    import numpy as np from scipy import stats

    size = int(input()) numbers = list(map(int, input().split())) print(np.mean(numbers)) print(np.median(numbers)) print(*stats.mode(numbers)[0]))

    This unpacks the list element "mode" and prints as an integer value.