In this module we will be going through the below given content:
Learn Python in 16 hrs from experts
Function is a block of code which provides the re-usability of code. There are two types of functions –
Built – in function (Already created i.e. predefined)
User defined function (Created by users according to the requirements)
A function contains following format –
Scope of a variable means the portion of the program where you can access a particular identifier. There are two types of scope of variable –
The variables which can only be accessed in that function where it is declared. Outside the function body, it cannot be accessed.
Variable which is declared outside the function is known as global variable. It can be accessed anywhere throughout the program.
Functions which have no name is known as anonymous function which is created by using lambda. is created without using the def keyword.
Now that we are familiar with the functions of python.
We can go ahead a bit deeper and discuss how to deal with the files and perform different operations on them.
Learn SQL in 16 hrs from experts