6 ответов
+ 5
if u had
for i in array:
...
you would assign each element of array to i.
now here we have x[n] instead of i
and n = 1.
in the first loop you assign first element ( not to i but )
to x[1].
in the next loop the 2nd element to x[2]...
+ 1
Oma Falk Thank you for the explanation. I totally understand now, it’s such a beautiful way to creat dictionary!
+ 1
WhyFry check Oma’s explaination, in each of for loop, there was actullay a “x[n] =...” happened.
+ 1
Xiang Song Thanks for asking this I was curios too!!
0
Aditya Singh Chauhan
yep....ine of my favorite posts the last weeks