“Segundo a último índice Python” Código de respuesta

Segundo a último índice Python

# python code to get 2nd to last item in a list
my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(my_list[-2])
the real Professor Poopypants

Segundo a último índice Python


lst[-2]

Silly Skipper

Respuestas similares a “Segundo a último índice Python”

Preguntas similares a “Segundo a último índice Python”

Más respuestas relacionadas con “Segundo a último índice Python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código