Advertisement
Guest User

keyerrorloop

a guest
Oct 23rd, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. '''
  2. example dictionary values:
  3. csvdict = {1: {'usage': 73433959, 'MCCMNC': '310180'}, 258: {'usage': 419, 'MCCMNC': '310410'}, 982: {'usage': 1528428, 'MCCMNC': '310180'}, 262: {'usage': 0, 'MCCMNC': '310410'}, 1068: {'usage': 68517, 'MCCMNC': '310410'}}
  4. '''
  5.  
  6. for key in csvdict:
  7. if len(csvdict[key]) > 1:
  8. print('{}:\t{}\t{}'.format(x,csvdict[x]['mccmnc'], csvdict[x]['usage']))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement