if time_month == 12 or 1 or 2: #зима
if 17 <= time_now <= 7:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_night, 0) #смена обоев
elif 12 <= time_now <= 13:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_obed, 0)
elif 8 <= time_now <= 9:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_morning, 0)
elif 14 <= time_now <= 16:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_evening, 0)
elif time_month == 3 or 4 or 5: #весна
if 21 <= time_now <= 5:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_night, 0)
elif 12 <= time_now <= 17:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_obed, 0)
elif 6 <= time_now <= 12:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_morning, 0)
elif 18 <= time_now <= 20:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_evening, 0)
elif time_month == 6 or 7 or 8: #лето
if 21 <= time_now <= 4:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_night, 0)
elif 13 <= time_now <= 17:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_obed, 0)
elif 5 <= time_now <= 12:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_morning, 0)
elif 18 <= time_now <= 20:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_evening, 0)
elif time_month == 9 or 10 or 11: #осень
if 17 <= time_now <= 6:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_night, 0)
elif 11 <= time_now <= 13:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_obed, 0)
elif 7 <= time_now <= 10:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_morning, 0)
elif 14 <= time_now <= 16:
ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper_evening, 0)
Как минимум так