In Colab, we can enforce the Python version by clicking Runtime -> Change Runtime Type and selecting python3 . Note that as of April 2020, Colab uses Python 3.6. 9 which should run everything without any errors.
Read moreWhat is colab in Python?
Colaboratory, or “Colab” for short, is a product from Google Research . Colab allows anybody to write and execute arbitrary python code through the browser, and is especially well suited to machine learning, data analysis and education.
Read moreHow do I use colab for Python?
Open Google Colab. Click on ‘New Notebook’ and select Python 2 notebook or Python 3 notebook.
Read more