from collections import defaultdict


list1 = [("Haryana", "Karnal"), ("Haryana","YamunaNagar" ), ("Haryana", 'KUK'), ("Punjab", "CHD"), ("Punjab","Patiala"),("UP", "Noida")]

#print dict(list1)

state = defaultdict(list)

print state



for k,v in list1:
	print state[k].append(v)
	
print state
dab682a4df6982e42d1d2349e03cd39c95434453
from collections import defaultdict


list1 = [("Haryana", "Karnal"), ("Haryana","YamunaNagar" ), ("Haryana", 'KUK'), ("Punjab", "CHD"), ("Punjab","Patiala"),("UP", "Noida")]

#print dict(list1)

state = defaultdict(list)

print state



for k,v in list1:
	print state[k].append(v)
	
print state