for pitcher in pitching.findall('pitcher'):
            stats = {}
            for i in pitcher.attrib:
                stats[i] = pitcher.attrib[i]
            if home_flag: