Generate a script in Python that takes in a collection of numbers and returns a collection of the same numbers sorted in ascending order.
[2, 7, 10, 1]
def sortCollection(arr):
    sortedArr = arr.sort()
    return sortedArr