global_learning_table = collections.defaultdict(PortDpidPair)
PortDpidPair = collections.namedtuple('PortDpidPair', ['port', 'dpid'])
global_learning_table = collections.defaultdict(collections.namedtuple(
    'PortDpidPair', ['port', 'dpid']))
global_learning_table['ff:' * 7 + 'ff'] = PortDpidPair(80, 1234)
global_learning_table
Creating a table in python