Untitled
unknown
python
2 years ago
267 B
17
Indexable
frutas = ["Maca", "Laranja", "Morango", "Limão"]
def get_pomocao(item):
for indice, fruta in enumerate(frutas):
if indice == item:
print(f"{indice} {fruta} EM PROMOCÃO")
else:
print(f"{indice} {fruta}")
get_pomocao(3)Editor is loading...
Leave a Comment