import pickle github_url = "https://github.com/TheMITTech/shakespeare" with open('shakespeare.pkl', 'wb') as fp: pickle.dump(github_url, fp)