In my Python script, I'm working with JSON files but in some files I have an input "racecards" and in some files I have "raceCards".
How can I ask to Python to use the two cases?
My script:
for file1 in FILE:
    with open(path + '%s' %file1,encoding='utf-8') as f1:
        INPUT1 = json.load(f1)
        DATA = INPUT1["pageProps"]["initialState"]["raceCards"]["races"]
        X = list(DATA.values())
        for x in X[0]:
            ENTRY = []
            for h1 in header1.split(','):
                ENTRY.append(x[h1])
            Entry = [str(i) for i in ENTRY]
            towrite = ','.join(Entry)
            print(towrite,file=output1)
 
     
    