users['last_name']=last_name
你的问题是用户被用来存储单个用户的数据。你想要的是更像
users[username]['last_name']=last_name
使用户成为字典的字典。用户名在哪里取决于你。如果你没有一个好的来源,让用户进入字典列表可能会更好。