-Instructions
that a Python interpreter can executes are called statements.
-A statement is
a unit of code like creating a variable or displaying a value.
>>> n = 17
>>> print(n)
Here,
The first line is an assignment
statement that gives a value to n.
The second line
is a print statement that displays the value of n.
-An
expression is a combination of
values, variables, and operators.
-A value all by
itself is considered an expression, and also a variable.
So the following
are all legal expressions:
>>> 42
42
>>> a=2
>>> a+3+2
7
>>> z=("hi"+"friend")
>>> print(z)
Hifriend
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.