I am newbie to Python . Need help in joining/merging the output of a for loop which creates multiple dictionaries into one single big dictionary .
vpc_peer = {}
for key in vpc_list:
for value in neigh_ips:
vpc_peer[key] = value
neigh_ips.remove(value)
break
print(vpc_peer)
The print output looks like this
{'vpc-0a21601da78d1ef30': '169.254.27.159'}
{'vpc-049920287c06fb681': '169.254.27.203'}
{'vpc-0f3bc5629259fb713': '169.254.28.23'}
{'vpc-0b0e5a878de4ca0b3': '169.254.28.27'}
What I am looking for is to merge the output of the for loop into one big dictionary as below
{'vpc-0a21601da78d1ef30': '169.254.27.159','vpc-049920287c06fb681': '169.254.27.203', 'vpc-0f3bc5629259fb713': '169.254.28.23','vpc-0b0e5a878de4ca0b3': '169.254.28.27' }