import pickle

# data = {
#     'a': [1, 2, 3],
#     'b': 'nikhil',
#     (1, 2): [1, 2]
# }

# # with open('pick.pkl', 'wb') as pickle_file:
# #     pickle.dump(data, pickle_file)

# #     del data

# with open('pick.pkl', "rb") as pickle_file:
#     data = pickle.load(pickle_file)

# print(data)

class Fruit:
    def __init__(self, name):
        self.name = name
        if name == 'banana':
            self.color = 'yellow'
        else:
            self.color = 'unknown'

myFruit = Fruit('banana')

# pickle.dump(myFruit, file=open('test.pkl', 'wb'))

prutas = pickle.load(file=open('test.pkl','rb'))

print(prutas)
