[Type A] Python Revision Tour-1 – Chapter 1
Table of Contents
9. What is an expression and a statement?
An expression is a combination of values, variables, operators, and function calls that evaluates to a value. Examples include 5 + 3
, x * y
, etc.
A statement is a complete line of code that performs some action. It can be an assignment statement, a function call, a loop, etc. Examples include x = 5
, print("Hello")
, for i in range(5):
, etc.