1
socios = {}
def cadastro():
addSocio = input("Digite o nome do sócio que deseja cadastrar: ")
telefoneSocio = int(input("Digite o número de telefone do sócio (DDD + NÚMERO): "))
cpfSocio = input("Digite o CPF do socio: ")
socios[addSocio] = ("|telefone: {}| |CPF: {}|".format(telefoneSocio,cpfSocio))
print("Cadastro realizado com sucesso!")
I am a beginner in python and I am trying to create a membership register using dictionaries according to the code above, I wanted to know how to break line after each partner’s Cpf, so that when I use the print the data are printed on the screen in an organized way.
I think the line break in Python is with
\n
, try something like this:"telefone: {}\nCPF: {}"
– Douglas