How to unmount drive in Google Colab and remount to another drive?

I have found the ‘Restart runtime…’ not to work, and changing permission too much of a hassle.
Luckily, the drive module is equipped with just the function you need:

from google.colab import drive
drive.flush_and_unmount()

Leave a Comment

tech