From 8ccc25cb6a83012ade791482bee728855f0cf5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Sat, 29 Oct 2022 13:20:33 -0300 Subject: [PATCH] =?UTF-8?q?Exerc=C3=ADcio=20-=20exiba=20os=20=C3=ADndices?= =?UTF-8?q?=20da=20lista=20(aula=20com=20solu=C3=A7=C3=A3o)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula50.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 aula50.py diff --git a/aula50.py b/aula50.py new file mode 100644 index 0000000..1735595 --- /dev/null +++ b/aula50.py @@ -0,0 +1,15 @@ +""" +Exercício +Exiba os índices da lista +0 Maria +1 Helena +2 Luiz +""" +lista = ['Maria', 'Helena', 'Luiz'] +lista.append('João') + + +indices = range(len(lista)) + +for indice in indices: + print(indice, lista[indice], type(lista[indice]))