Python · Lesson 1 of 9
Python introduction
What Python is used for, running code and the print() function.
Python is a general-purpose language known for code that reads almost like English. Teams in Kerala's IT parks use it for backend services (Django, FastAPI), data analysis (pandas), automation scripts, testing and machine learning.
Your first program
print() shows a value on the screen. Text goes inside quotes; numbers don't need them. Python runs your file from top to bottom, one line at a time.
Comments and indentation
Anything after # is a comment — Python ignores it. Unlike many languages, Python uses indentation (spaces at the start of a line) to group code, so be consistent: four spaces per level is the convention.
Try it yourself
Press Run to see the output.
Edit and press Run (or Ctrl/⌘ + Enter). Python runs in your browser — the first run downloads the Python engine and takes a few seconds.
Key points
- print() displays output.
- # starts a comment.
- Indentation is part of Python's syntax — use 4 spaces.
Quick check
Which symbol starts a comment in Python?
Python comments start with #; // is used in JavaScript and Java.
Practice task
Change the program so it prints your name on one line and the city you want to work in on the next.
Interview corner
Why is Python popular for beginners and companies alike?
Its syntax is short and readable, it has a huge standard library and third-party packages, and it is used across web, data, automation and AI — so one language covers many jobs.
Is Python compiled or interpreted?
CPython compiles source to bytecode and then interprets that bytecode on a virtual machine. In everyday terms it is called an interpreted language because you run the source directly without a separate build step.
Further reading
Official documentation, linked for deeper study. These are outside sites; this lesson's text is our own.
Original lesson written by the InfoparkDaily team · © 2026 InfoparkDaily · Free to learn — no paid course or subscription.