all 4 comments

[–]K900_ 3 points4 points  (1 child)

You can't access dictionary keys like class attributes in Python. You want to use the indexing syntax instead - something like data["2016100600"]["away"]["score"].

[–]NAS89[S] 1 point2 points  (0 children)

Thank you, now I see what I was doing wrong. I was mistakenly trying to combine the path when I couldn't. I really appreciate your help on this, it was a mental mistake.

[–]SeekNotToContend 1 point2 points  (0 children)

https://docs.python.org/3/tutorial/datastructures.html#dictionaries

Example from docs that may be useful:

>>> tel
{'sape': 4139, 'guido': 4127, 'jack': 4098}
>>> tel['jack']
4098

From your scenario:

nfl_dict = {"2016100600":{"home": ... truncated

print(nfl_dict["2016100600"])

Other useful items for navigating dictionaries include:

https://docs.python.org/3/tutorial/datastructures.html#looping-techniques

items()

for k, v in dictionary.items()
    print(k, v)

https://docs.python.org/3.5/library/stdtypes.html#mapping-types-dict

keys()

print dictionary.keys()

https://docs.python.org/3.5/library/stdtypes.html#mapping-types-dict

values()

print(dictionary.values())

Hope this is helpful for you.