https://app.dataquest.io/m/309/z-scores/4/locating-values-in-different-distributions

Above it is asked to —Find out the location for which $200,000 has the z-score closest to 0

I do not see where the code is computing the z-score that is closest to zero .Could it pleased be pointed out?

Also I do not understand the list comprehension here and why a dictionary was created with {} but it then uses […] for a list and I have not seen () inside a list before [(…)(…)] although I guess these are key value pairs?

```
def z_score(value, array, bessel = 0):
mean = sum(array) / len(array)
from numpy import std
st_dev = std(array, ddof = bessel)
distance = value - mean
z = distance / st_dev
return z
# Segment the data by location
north_ames = houses[houses['Neighborhood'] == 'NAmes']
clg_creek = houses[houses['Neighborhood'] == 'CollgCr']
old_town = houses[houses['Neighborhood'] == 'OldTown']
edwards = houses[houses['Neighborhood'] == 'Edwards']
somerset = houses[houses['Neighborhood'] == 'Somerst']
# Find the z-score for 200000 for every location
z_by_location = {}
for data, neighborhood in [(north_ames, 'NAmes'), (clg_creek, 'CollgCr'),
(old_town, 'OldTown'), (edwards, 'Edwards'),
(somerset, 'Somerst')]:
z_by_location[neighborhood] = z_score(200000, data['SalePrice'],
bessel = 0)
# Find the location with the z-score closest to 0
print(z_by_location)
best_investment = 'College Creek'
```