python chromedriver headless selenium

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.headless = True
driver = webdriver.Chrome(CHROMEDRIVER_PATH, chrome_options=options)

Here is what the above code is Doing:
1. Creating a webdriver instance with the path to the chromedriver.exe file.
2. Creating an instance of the Options class.
3. Setting the headless attribute to True.
4. Passing the options instance to the webdriver instance.