Try this
for k in countList:
v = countList[k]
Or this
for k, v in countList.items():
Read this, please: Mapping Types — dict — Python documentation
Try this
for k in countList:
v = countList[k]
Or this
for k, v in countList.items():
Read this, please: Mapping Types — dict — Python documentation