I'm trying to create a code to register with input
, as exercise.
dic = {}
...
def cadastrar():
nome = input('Nome: ')
variavel1 = input('variavel 1,: ')
variavel2 = input('Variavel 2: ')
dic.update({'nome': 'variavel1', 'variavel2'})
while True:
opcao = exibirMenu()
if opcao == ('cadastrar'):
cadastrar()
This syntax error code, I change the code to:
dic.update('nome', 'varriavel1', 'variavel2')
and returns the error
TypeError: update expected at most 1 arguments, got 2
How do I save the data together, nome = variavel1, variavel2
. so you can access the name and return the variables appended to the name?