I have two lists:
yy = ['Inside the area', 'Inside the area', 'Inside the area', 'Inside the area', 'Inside the area', 'Inside the area', 'Outside the area']
lat_ = [77.2167, 77.25, 77.2167, 77.2167, 77.2, 77.2167, 77.2]
I am combining them using the solution given on some posts here by:
new_dict = {k: v for k, v in zip(yy, lat_)}
print new_dict
But my output is {'Inside the area': 77.2167, 'Outside the area': 77.2}
This is happening because the most of the keys are same. I am doing this because I want to map these two list in order to get which values of lat falls inside or outside, and then keep only the ones which fall inside.