Implement a function in Python that takes a list of string and sorts them alphabetically.
["apple", "banana", "mango", "pear"]
def sortStrings(wordsList):
    sorted_list = sorted(wordsList)
    return sorted_list
 
wordsList = ["apple", "banana", "mango", "pear"]
sorted_words = sortStrings(wordsList)
print(sorted_words)