IoT System LU 3. Python Programming Language
IoT System LU 3. Python Programming Language
0 extend(list)
list=[1,‘a’,2.5] list.extend ([‘c’,’d’]) [1,‘a’,2.5,’c’,’d’]
0 Insert(index, value)
list=[1,‘a’,2.5] list.insert(2,’b’) [1,‘a’,’b’,2.5,]
0 Pop()
list=[1,‘a’,2.5] list.pop( ) [2.5]
Data Type: sets
0 The first string after the function header is called the docstring and is
short for documentation string. It is briefly used to explain what a
function does.
0 Although optional, documentation is a good programming practice,
always document your code.
How to call a function in python?
0 Once we have defined a function, we can call it from another function,
program or even the Python prompt.
0 To call a function we simply type the function name with appropriate
parameters.
How Function works in Python?
Why do we use functions?
Syntax :
while test_expression:
Body of while