I’m trying to make a selection system in pygame, and I’m trying to use a system to make onclick events like “`
for func in [lambda: i for i in range(10)]:
print(func())
This outputs ```
9
9
9
9
9
9
9
9
9
9
```, but I want it to be like ```
0
1
2
3
4
5
6
7
8
9
```. Is there any way to do this?
I tried to check if there were any things related to it, like "dereferencing" a variable, and also making it static.