1. в чем проблема с командой и как бы Вы ее исправили?
response = {
"instances": [
{
"id": "i-123456789abcdef10",
"name": "instance1",
"type": "t2.micro",
"ami_id": "ami-ea45f78a",
},
{
"id": "i-111213141516171819",
"name": "instance2",
"type": "t2.small",
"ami_id": "ami-ea45f78a"
},
{
"id": "i-1a1b1c1d1e1f202122",
"name": "instance3",
"type": "t2.micro",
"ami_id": "ami-ea45f78a",
},
]
}
set([i[ami_id]for i in response["instances"]])
What I have tried:
Traceback (most recent call last): File "/Users/oluwaseyibamigbade/Library/Containers/uk.co.insi
li.Run-Python/Data/5870.py", line 25, in <module>
set([i[ami_id]for i in response["instances"]])
NameError: name 'ami_id' is not defined