+91 81900 98289

Python Intro

This Python Intro lesson is for a beginner. Read the short notes, run each example, then change one name or number and run it again.

Python is a general-purpose language. Teams use it for websites, automation, data work, testing, and the scripts that glue other tools together.

The language reads close to English, so a first program is usually a single line. You still need to be exact about spelling, quotes, and indentation.

Start here

print sends text to the output. The quotes are part of the program, not the result.

print("Python is ready") # print writes this; the quotes are not shown

Greet a learner

Change Asha to your name and run it again.

learner = "Asha" # text print("Welcome", learner) # a comma prints each value, with a space between

Show a city

Two bits of text are printed with a space between them.

print("Training city:", "Chennai") # a comma prints each value, with a space between

Print a ready message

True is a Python value, not a string, so it has no quotes.

ready = True # True or False, not text print("Ready:", ready) # a comma prints each value, with a space between
print sends text to the output. The quotes are part of the program, not the result.