## 上传
from google.colab import files uploaded = files.upload() for fn in uploaded.keys(): print('User uploaded file "{name}" with length {length} bytes'.format( name=fn, length=len(uploaded[fn])))
## 下载
from google.colab import files with open('example.txt', 'w') as f: f.write('some content') files.download('example.txt')