import ROOT as r f = r.TFile('vdepl.root', 'read') for i, s in enumerate(f.Get('v_sector_TTaU')): print "%s, %s" % (int(s), int(f.Get('v_vdepl_TTaU')[i])) for i, s in enumerate(f.Get('v_sector_T3X2')): print "%s, %s" % (int(s), int(f.Get('v_vdepl_T3X2')[i]))