# Python way (slow) python_list = [1, 2, 3, 4, 5] result = [] for x in python_list: result.append(x * 2) # NumPy way (fast) numpy_array = np.array([1, 2, 3, 4, 5]) result = numpy_array * 2 # [2 4 6 8 10]