2
tamanho = int(input())
agenda = {}
cont = 0
for c in range(tamanho):
cont += 1
nome = str(input()).strip().lower().capitalize()
cidade = str(input()).lower().capitalize()
estado = str(input()).upper()
telefone = input()
agenda[cont] = nome,cidade,estado,telefone
for v in agenda.values():
print(f'{v[0]:10}{v[1]}{v[2]:10}{v[3]:10}')
I do not know how to make a more coherent format than the one I did ,of these values of the dictionary, but if there is a better way to do this, why gentiliza could mi give some ideas of how it does.
Input examples:
4
Gael
São Luís
MA
97824-4673
Vitória
Manaus
AM
98084-8437
Alícia
Brasília
DF
99114-8269
Clara
Duque de Caxias
RJ
97906-7003
That’s the way I was hoping:
Gael São Luís(MA) 97824-4673
Vitória Manaus(AM) 98084-8437
Alícia Brasília(DF) 99114-8269
Clara Duque de Caxias(RJ) 97906-7003
You can use the methods
rjust
andljust
Behold here– Paulo Marques