[Solved] I don’t know how to use for loop


Your question is not really specific. Basically both for loops you are mentioning are doing the same thing.

for i in range(10):
    print(i)

gives back

1
2
...
9

the same is achieved by

[print(i) for i in range(10)]

This is preferred if you have a very short loop and you want your code to stay clear.

solved I don’t know how to use for loop