I have this sample list of dictionaries below. I want to know why the below code will only loop over two values in the list? Why does it not loop over every value in the list?
updated_list_of_site_dicts = [{'site': 'living', 'status': 'ready' }, {'site': 'keg', 'status': 'ready' }, {'site': 'box', 'status': 'ready' }, {'site': 'wine', 'status': 'ready' }]
for site_dict in updated_list_of_site_dicts:
if site_dict['status'] == 'ready':
print site_dict['site'] + " is ready"
updated_list_of_site_dicts.remove(site_dict)
print updated_list_of_site_dicts