En esta lección, los alumnos se familiarizan con las listas. Aprenderán por qué se utilizan las listas en los programas y cómo crearlas. Las listas se crean así:
nombre_lista = [elemento_1, elemento_2, elemento_3, ...]
Students will be able to:
En esta lección, los alumnos aprenden el sistema de indexación positiva y negativa de las listas y cómo se accede a los elementos de una lista.
Students will be able to:
En esta lección, los alumnos aprenden a actualizar elementos de listas utilizando el valor índice del elemento.
Students will be able to:
En esta lección, los alumnos aprenderán varias formas de añadir elementos a una lista existente mediante los métodos insert
, extend
y append
.
Students will be able to:
append
method to add a new item to the end of a listextend
method to add new items to the end of a listinsert
method to add a new item at a specific index in a listEn esta lección, los alumnos aprenderán varias formas de eliminar elementos de una lista existente utilizando los métodos pop
y remove
y la palabra clave del
.
Students will be able to:
pop
method with no argument to remove an item from the end of a listpop
method to remove an item from a specific index in a listremove
method to remove a specific item from a listdel
keyword to remove an item from a specific index in a listEn esta lección, los alumnos aprenden a utilizar dos nuevos métodos, clasificar
y invertir
, para modificar elementos de una lista.
Students will be able to:
sort
method to organize items in a list by valuereverse
method to reverse the order of items in a listEn esta lección, los alumnos repasan los contenidos con un Cuestionario de Fin de Unidad de 10 preguntas.
Students will be able to:
list_name = [item_1, item_2, ...]
)list_name[index]
)list_name[index] = new_value
)append
extend
insert
+
pop
remove
del
sort
reverse