from selenium import webdriver
# get initial window size
driver = webdriver.Firefox()
print driver.get_window_size()
# set window size
driver.set_window_size(480, 320)
print driver.get_window_size()
# maximize window
driver.maximize_window()
print driver.get_window_size()
For further understanding, you can refer to the Selenium Training.