0
Greetings I'm having some problems I can't understand metrix problems
How the answer is coming 4 https://code.sololearn.com/cKoF6oJebb4M/?ref=app
4 Réponses
+ 6
Mazhar Shafique ,
since you already have started? the *introductiontopython* tutorial, please continue learning from that.
+ 2
x=[2 ,4]
x= x * 3
print(x[3])
When you multiply a list with a number, it replicates the elements that many times inside the list.
You can print(x) and see it will be
x=[2,4,2,4,2,4]
So element and 3rd index is 4.
+ 1
The first x= x*3 , repeats the [2, 4] list three times to [2, 4, 2, 4, 2, 4 ]
Now from your python basics you know that the first item is 0, now counting from zero to 4 (X[3]) the number there is 4
Savvy¿
0
Oooooo thanku