Google Colab 基本操作

## 上传

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')

## 获取谷歌硬盘的文件

猜你喜欢

转载自www.cnblogs.com/clemente/p/10430488.html