+ 1
Lists start at 0. If you have a list whose length is 5 its index ends at length - 1 (5 -1 in this case). So that's why you print num[0] - - > 5 num[1] - - > 3 num[2] - - > 3 num[3] - - > [2] is a list num[4] - - > 1 num[5] - - > Error not exist
28th May 2020, 1:21 AM
Josshual A. Toro M.
Josshual A. Toro M. - avatar
0
Clickdetodo unpoco Esto se debe a que la lista tiene solo 5 elementos y Python sigue una indexaciĂłn basada en 0. Tiene valores de Ă­ndice de solo 0 a 4 en este caso.
27th May 2020, 11:23 PM
Avinesh
Avinesh - avatar