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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap