Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 1
Que significa indexacion?
11 Respostas
+ 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.
+ 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
+ 1
Hola... Āæya lo resolviste?
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
0
Hola Amiga
0
Thanks frnd
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"
0
Hola, no sigo con la duda
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.
0
Oooooh, Thanks Giovanni!
0
compreendo