for _ in Range. How does a lower emphasize work
📁 python, пример
MATRIX = [[ 0 ]* 5 ] for _ in range ( 5 )] there is such an expression, creates five such elements
0 0 0 0 0 . Who can explain the mechanics of creating, the easier the better. for example
for in in in range ( 5 ): print (x)
rad (5) is 0,1,2,3,4and for each value starting from the first (0), the action is performed
print (x) (it displays the current value, in this case 0), after which the following value is taken until they end. As a result, on the screen we have:0 1 2 3 4preferably in such a vein explanation, otherwise I do not understand the essence of this expression, which means this lower emphasis?
Ответов пока нет.
Войдите чтобы оставить ответ