Hey Juhi, look at the below code to understand automating page scroll action using Python Selenium Webdriver:
from selenium import webdriver
from time import sleep
driver = webdriver.Firefox()
driver.get("https://www.yahoo.com/")
timeout = 10
''' Scroll to the page end '''
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
sleep(10)
''' Scroll to the page top '''
driver.execute_script("window.scroll(0, 0);")
sleep(10)
driver.quit()