Learn practical skills, build real-world projects, and advance your career
import numpy as np
rand = np.random.RandomState(20)
x = rand.randint(10, size=20)
x
array([3, 9, 4, 6, 7, 2, 0, 6, 8, 5, 3, 0, 6, 6, 0, 9, 5, 7, 5, 2])
[x[0], x[12]]
[3, 6]
ind = [0, 12]