What is the best way to create a dict, with some attributes, from another dict, in Python?
For example, suppose I have the following dict:
dict1 = {
name: 'Jaime',
last_name: 'Rivera',
phone_number: '111111',
email: 'test@gmail.com',
password : 'xxxxxxx',
token: 'xxxxxxx',
secret_stuff: 'yyyyyyy'
}
I’d like to obtain
dict2 = {
name: 'Jaime',
last_name: 'Rivera',
phone_number: '111111',
email: 'test@gmail.com'
}
For instance: