Files
cursopython2023/aula39.py
2022-10-28 06:08:24 -03:00

20 lines
311 B
Python

"""
Iterando strings com while
"""
# 012345678910
# nome = 'Luiz Otávio' # Iteráveis
# 1110987654321
nome = 'Maria Helena' # Iteráveis
indice = 0
novo_nome = ''
while indice < len(nome):
letra = nome[indice]
novo_nome += f'*{letra}'
indice += 1
novo_nome += '*'
print(novo_nome)