Answer the question
In order to leave comments, you need to log in
Why is the contents of the variable not displayed in its entirety?
Why is the contents of the variable not displayed in its entirety?
Please forgive me if the question is trivial.
The code in which I worked was given below, as well as the command line screen
import json
def users_persone():
name = input('Введите имя контакта - ')
tel = input('Введите номер - ')
persone = {
name:tel
}
return persone
def main():
persones = []
persones.append(users_persone())
with open('persones.json', 'w') as file:
json.dump(persones, file, ensure_ascii = False)
print('Контакт добавлен ^_^')
users_choise = input("Желаете ввести или получить контактные данные - ")
if users_choise == 'ввести':
main()
elif users_choise == 'получить':
users_input_name = input("Введите имя пользователя - ")
users_choise_two = input("Желаете остановить програму - ")
if users_choise_two == 'да':
print("Програмам закрита ^_^")
elif users_choise_two == 'нет':
print(users_choise)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question