def share_top_tanks(config, era, top, day):
    auth = OAuthHandler(config['twitter']['api key'], config['twitter']['api secret key'])
    auth.set_access_token(config['twitter']['access token'], config['twitter']['access token secret'])
    api = API(auth)
    for (platform, tanks) in top.items():
        status = 'Most used {} tanks on {} for {}\n{}'
        formatting = '{}: {} battles'
        api.update_status(status=status.format(era, platform.capitalize(), day, '\n'.join([formatting.format(tank, battles) for (tank, battles) in tanks.items()])))
def share_top_tanks(config, era, top, day):
    auth = OAuthHandler(config['twitter']['api key'], config['twitter']['api secret key'])
    auth.set_access_token(config['twitter']['access token'], config['twitter']['access token secret'])
    api = API(auth)
    for (platform, tanks) in top.items():
        status = 'Most used {} tanks on {} for {}\n{}'
        formatting = '{}: {} battles'
        api.update_status(status=status.format(era, platform.capitalize(), day, '\n'.join([formatting.format(tank, battles) for (tank, battles) in tanks.items()])))