gh-36898: ruff auto-fixing several details in combinat folder
this was scripted using `ruff --fix
--select=UP009,UP018,UP034,UP039,UP025 src/sage/combinat`
see https://docs.astral.sh/ruff/rules/#pyupgrade-up
### :memo: Checklist
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
URL: https://github.com/sagemath/sage/pull/36898
Reported by: Frédéric Chapoton
Reviewer(s): David Coudert