Expression vs Statement
2 basic concepts you have to understand and remember. Applies to any programming language.
Statement
Statement perform actions
python
# assigning value to variable
name = 'Kibria'
# Importing the module
import datetime
# conditional statement
if name:
print(name)
# loop statement
while name:
print(name)
name = name[1:]
# function declare statement
def my_function():
print('Hi There')Expression
It produce a value
python
# arithmetic expression
2 + 2
# logical expression
5 > 2
# string expression
'Hello' + ' ' + 'World'
# function call expression
datetime.datetime.now()