image_output_1.png
import json

import re # Regular expressions

testDirectory = '/kaggle/input/abstraction-and-reasoning-challenge/test/'
trainingDirectory = '/kaggle/input/abstraction-and-reasoning-challenge/training/'
evaluationDirectory = '/kaggle/input/abstraction-and-reasoning-challenge/training/'

def readTaskFile(filename):
    f = open(filename, 'r')
    data = json.loads(f.read())
    data['id'] = re.sub('(.*/)|(\\.json)', '', filename)
    f.close()
    return data

filename = testDirectory + '19bb5feb.json'
readTaskFile(filename)