gh-36664: ruff auto-fix for C4 in modular
this was scripted using
```
ruff check --select=C4 --fix src/sage/modular/
```
and is about simplifying list,set,dict comprehensions
### :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/36664
Reported by: Frédéric Chapoton
Reviewer(s): David Ayotte
Committer
Release Manager