I have created the below code but when I execute it it gives me an error as Iterator object. If I apply for loop for data it doesn't give me any output.Any advice as how to pull data out of that object, I also explored the azure provided virtual network peering class but no luck.
from azure.identity import AzureCliCredential
from azure.mgmt.subscription import SubscriptionClient
from azure.mgmt.network import NetworkManagementClient
credential = AzureCliCredential()
subscription_client = SubscriptionClient(credential)
subs_id = 'xxxxxxxx'
network_client = NetworkManagementClient(credential, subs_id)
data = network_client.virtual_network_peerings.list('resourcegroup','virtualnetwork')
print(data)
Output: <iterator object azure.core.paging.ItemPaged at 0x210a5fe1570>