Home / Python Numpy / How to Sort NumPy Arrays of Strings In this example we will show how to sort NumPy arrays of strings in Python. Source Code import numpy as np n = np.array(['z', 'r', 'Python', 'apple', 'Java']) print(np.sort(n)) Output: ['Java' 'Python' 'apple' 'r' 'z']