Que significa indexacion? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Que significa indexacion?

12th Sep 2016, 11:59 PM
Paula Andrea Peña
Paula Andrea Peña - avatar
11 Answers
+ 2
Pensé al leer tu pregunta que te podías referir a la indexacion de las diferentes líneas de tu código porque te hubiese dado un error de indexacion al ejecutarlo. Si ese fuera el caso me lo dices y te explico.
13th Sep 2016, 7:11 AM
Carlos Sacanell
Carlos Sacanell - avatar
+ 2
Tu no puede far la indexacion de un intero You cannot do indexing of an int >>> numero = 12345 >>> numero[0] TypeError Tu puede far pour strings >>> myname = 'alehandro' >>> myname[0] 'a' Sorry for mistakes in spanish
16th Sep 2016, 12:48 PM
Giovanni Gatto
Giovanni Gatto - avatar
+ 1
Hola... ¿ya lo resolviste?
16th Sep 2016, 3:27 AM
German Tordecilla
German Tordecilla - avatar
0
There Is a typo called sequential type including array( string is an array of chars ), list, and tuple. El index is the major way to access those elementrios in them. If without it, members in array is out of reach, and can not perform operation like slicing, subset and so on
13th Sep 2016, 1:41 AM
looyea
0
Hola Amiga
13th Sep 2016, 1:41 AM
looyea
0
Thanks frnd
13th Sep 2016, 1:48 AM
Paula Andrea Peña
Paula Andrea Peña - avatar
0
Hola, muchas gracias a los dos, pero no se si alguno de ustedes este en lo que necesito, me refiero a el grupo 2 de lecciones, el que se llama "Estructuras de control" allí dentro la lección 7 "Listas" y en "Listas" la última explicación, (Justo antes de la última pregunta) allí dice "La indexación de otros tipos, tales como enteros, no es posible y ocasiona un type error"
13th Sep 2016, 12:04 PM
Paula Andrea Peña
Paula Andrea Peña - avatar
0
Hola, no sigo con la duda
16th Sep 2016, 12:01 PM
Paula Andrea Peña
Paula Andrea Peña - avatar
0
myfriends = ["john","jim","jack] >>> myfriends[0] John >>> myfriends[1] Jim >>> myfriends[2] jack Each value of the list myfriend has an index with wich you can have access the value itself putting in in square brackets after the name of the list listname[index] = value of the list at the place corresponding of the index in the square brackets.
16th Sep 2016, 12:37 PM
Giovanni Gatto
Giovanni Gatto - avatar
0
Oooooh, Thanks Giovanni!
16th Sep 2016, 1:33 PM
Paula Andrea Peña
Paula Andrea Peña - avatar
0
compreendo
17th Sep 2016, 4:19 AM
Diego Vinícius Martins
Diego Vinícius Martins - avatar