Как сохранить переменные Python локально

with open('train.pickle', 'wb') as f:
    pickle.dump([X_train, y_train], f)
Thoughtless Tapir