Untitled

 avatar
unknown
python
a year ago
267 B
7
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