CONTEST - 'Python List Manipulation' Contest II by @leicorp1

in Steem Skillshare3 years ago

Hello steem Skillshare community, especially @anyiglobal ...

CREATE A LIST OF 8 FRUITS:

Define a list

list = [‟mango”, ‟strawberry”, ‟blackberry”, ‟apple”, ‟milky”, ‟passion fruit”, ‟melon”, ‟side”]
list = [‟mango”, ‟strawberry”, ‟blackberry”, ‟apple”, ‟milky”, ‟passion fruit”, ‟melon”, ‟side”]
index 0 1 2 3 4 5 6 7
print (‟original list:”, list)

LISTA 1.JPG

ACCESS TO THE 5TH. LIST ITEM

Access the fifth element of a list at index 4

print (‟The 4th element of the list is:”, list [4])
print (list [4]) would give us milky

LISTA 2A.JPG

DELETE THE 8th item. LIST ITEM

remove the 7th item from the list

list.remove (list [7]) Comment / * the last name of the fruit that would be pin will disappear * /
print (‟The last element of the list will disappear:”, list)

LISTA 3.JPG

CHANGE THE VALUE OF THE FIRST ITEM WITH ANOTHER FRUIT NAME
#change the value of the list item value in the list with another fruit name
list [0] = ‟raspberry”
print (‟The new first element of the list is:”, list)

LISTA 4.JPG

Know my beginnings through achievement 1.
[link] (https://steemit.com/hive-172186/@leicorp1/2ezikn-logro-1-mi-presentacion-en-steemit-leicorp1)

I invite my friends @djpereira76, @azulceleste, @mami0306, to this dissemination of knowledge. Thank you for visiting my blog.

Saludos a la comunidad de @steem Skillshare, especialmente @anyiglobal...

CREA UNA LISTA DE 8 FRUTAS:

#Define a list
list=[‟mango”, ‟fresa”, ‟mora”, ‟manzana”, ‟lechosa”, ‟parchita”, ‟melon”, ‟patilla” ]
list= [‟mango”, ‟fresa”, ‟mora”, ‟manzana”, ‟lechosa”, ‟parchita”, ‟melon”, ‟patilla” ]
index 0 1 2 3 4 5 6 7
print (‟lista original: ”, list)
LISTA 1.JPG

ACCEDE AL 5th item. ELEMENTO DE LA LISTA

#Access the 5th ítem of a list at index 4
print (‟El 4º elemento de la lista es: ”, list[4] )
print (list[4]) nos daría lechosa

LISTA 2A.JPG

ELIMINA EL 8th item. ELEMENTO DE LA LISTA

#delete the 7th elemento from the list, index 7
list.remove(list[7]) Comentario /* desaparecerá el ultimo nombre de la fruta que sería patilla */
print (‟El último elemento de la lista desaparecerá: ”, list )

LISTA 3.JPG

CAMBIE EL VALOR DEL PRIMER ELEMENTO CON OTRO NOMBRE DE FRUTA

#change the value of the value of the list item in the list with another fruit name
list[0]= ‟frambuesa”
print (‟El nuevo primer elemento de la lista es: ”, list )

LISTA 4.JPG

Conoce mis inicios a través, del logro 1.
link

Invito a mis amigos @djpereira76, @azulceleste, @mami0306, a esta difusión de conocimiento.
Gracias por visitar mi blog.

Sort:  
 3 years ago 

Dear @leicorp1, your entry is invalid because the valid duration for the contest has come to an end!

Thanks for your interest in the contest! Look forward to another one this week and participate!


Hola, esta bien gracias, ENTIENDO...nos vemos la próxima semana... En Venezuela todadvía estabamos a tiempo para participar...Por favor dime el país donde realizan el concurso para estar pendiente con la diferencia de horario...

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.030
BTC 68148.22
ETH 3249.65
USDT 1.00
SBD 2.67