import numpy as np

dtipe = [('nama','S10'),('tinggi',int)]

data = [
    ('Ucup',170),
    ('Otong',150),
    ('Mario',160),
]

a = np.array(data, dtype= dtipe)
print(a)

print(np.sort(a, order='tinggi'))
print(np.sort(a, order='nama'))
5b25ef55a9eba8447088d7ad696e916b98fe916b
<mask token>

<mask token>
print(a)
print(np.sort(a, order='tinggi'))
print(np.sort(a, order='nama'))

<mask token>
dtipe = [('nama', 'S10'), ('tinggi', int)]
data = [('Ucup', 170), ('Otong', 150), ('Mario', 160)]
a = np.array(data, dtype=dtipe)
print(a)
print(np.sort(a, order='tinggi'))
print(np.sort(a, order='nama'))

import numpy as np
dtipe = [('nama', 'S10'), ('tinggi', int)]
data = [('Ucup', 170), ('Otong', 150), ('Mario', 160)]
a = np.array(data, dtype=dtipe)
print(a)
print(np.sort(a, order='tinggi'))
print(np.sort(a, order='nama'))

import numpy as np

dtipe = [('nama','S10'),('tinggi',int)]

data = [
    ('Ucup',170),
    ('Otong',150),
    ('Mario',160),
]

a = np.array(data, dtype= dtipe)
print(a)

print(np.sort(a, order='tinggi'))
print(np.sort(a, order='nama'))