Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
For those who need an answer.
from collections import defaultdict
users = defaultdict(list)
users[1].append('Часы')
users[1].append('Очки')
users[1].append('Одежда')
print (users[1])
users[1][0] = ('Новое значение')
print (users[1])
Do it better like this:
users = {}
user[1611531] = {"name":"Иван","family":"Иванов","sname":"Иванович","money":55555}
user[1611531]["sname"] = "Петрович"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question