from PIL import Image
# open colour image
image_file = Image.open("image.jpg")
# convert image to black and white
black_and_white = image_file.convert('1')
# another way you can rewrite this line
# image_file = Image.open("image.jpg").convert("L")
black_and_white.save('black_and_white.jpg')