import calendar
...
days_month = calendar.monthrange(d.year, d.month)[1]
if len(my_days) > (days_month - d.day):
my_days = my_days[:days_month - d.day]
def func(a, b, c, d):
...
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "тут xpath"))).click()
for k,v, in gl.items():
s=f'Group: {k}: \n'
avg_score = 0
for stdn,grds in v.items():
s+=f' {stdn}\t{grds[0]},{grds[1]},{grds[2]} \n'
avg_score += grds[0] + grds[1]+ grds[2]
s += f'avg_score: {round(avg_score / (len(v) * 3), 2)} \n'
print(s)
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "тут xpath"))).click()