how to scroll by in selenium python

   for i in range(20): # adjust integer value for need
       # you can change right side number for scroll convenience or destination 
       driver.execute_script("window.scrollBy(0, 250)")
       # you can change time integer to float or remove
       time.sleep(1)

Here is what the above code is Doing:
1. It’s loading the page.
2. It’s scrolling down the page.
3. It’s waiting for 1 second.
4. It’s repeating the process 20 times.