How to Show Line Numbers in Google Colab Cells

Line numbers when writing code or if presenting to a classroom becomes really important to have a better focus and context. If you make use of Google Colab as a Python Notebook and want to show the line numbers for the code in each cell then you can follow the below easy steps.


Step 1: Open a Notebook in Google Colab


Step 2: Now click on the Gear Icon (Settings) at the top right side


Step 3: Now go to Editor tap and select "Show line number" checkbox

Show Line Numbers Google Colab

Step 4: Click Save to apply changes.

Show line numbers in Google Colab Cells

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!