HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Glossary
  2. /Python and data
  3. /Cell (in a Python notebook)

What is Cell (in a Python notebook)?

In short

A cell is one block of a notebook. A code cell holds Python code that you run on its own, and a text cell holds writing or notes.

In simple words

In a notebook such as Jupyter or Google Colab, you run a code cell with a button or by pressing Shift and Enter. The result appears under the cell. A cell can use the variables from earlier cells that have already run, so the order in which you run cells matters. Notebooks mix code, results, graphs and notes in one page, which is why scientists like them.

Example

Run a cell with x = 5, then a second cell with print(x * 2). The second cell prints 10, because the first cell stored x.

Also searched as: what is a cell in python, practice notebook.

Learn it properly

  • Lessons on this topic
  • Test yourself

Related terms

  • Program (in Python)
  • Variable (in Python)

← All glossary terms

Learn it in

  1. Say Hello to Python
  2. Install and Run Python at Home
All lessons on this topic →

Practise

  1. A student saves a program as my first program.py.txt, opens a terminal, types python my…Medium
  2. Write the command that checks the version of Python in a terminal, for (a) Windows with…Easy
  3. A student has an old laptop with Windows 7, 4 gigabytes of memory, and no internet at…Easy
  4. Write a program that prints a box of stars, 4 lines tall and 12 characters wide…Medium

Quick questions

  1. A student types print("Hi") straight into the terminal, not inside Python, and gets an…Medium
  2. Which of these is a good name for a Python file?Medium
  3. You run python3 card.py in a terminal, and the program uses input(). How do you answer…Medium

More Python and data terms

  1. Class and Special Methods (in Python)
  2. Dictionary (in Python)
  3. For Loop
  4. Function (in Python)
  5. If Statement (in Python)
  6. Import (Python modules and libraries)
All Python and data terms →

Try it yourself

Python labs run in your browser. Type the code, run it and see what happens.

Open a Python lab