Cnn - preprocessing of opencv

I want to image to grayscale from google.colab and save the new image in a directory.

import cv2
from pathlib import Path
import glob
import numpy as np
path=Path("/content/testing/train")

path=path.glob("*")

images_train=[]

for imagepath_train in path:
        img=cv2.imread(str(imagepath_train))
        img=cv2.cvtColor(img,cv2.IMREAD_GRAYSCALE)                         
        img=cv2.resize(img,(300,300))
        images_train.append(img)

for n in range(0,len(images_train)):
  cv2.imwrite('/content/imggray/image_{n}.jpg',images_train)<<?????

What should I do?