numpy: Python is dynamic programming language. Python doesn’t support arrays. Python is a general purpose programming language to develop application. ‘numpy’ is a module. numpy and pandas modules make the python become an important platform …
Iterators: Collection data types always an important concept in Python. We iterate the data of collection object using iterators Iterator in Python is simply an object that can be iterated upon. An object which will …
At property: property() object is used to access the functionality of an object(class) easily We need to create the property object in the definition of same class only. Property object must be defined using arguments …
Generators: Generators are solution to overhead of Iterators. We have to implement a class with __iter__() and __next__() method, keep track of internal states, raise StopIteration when there was no values to be returned etc. …
Decorators: Allow the programmer to wrap another function in order to extend the behavior of wrapper function, without permanently modifying it. In Decorators, functions are takes as arguments(input values) to another function. Decorator program:
Closures in python: Every function executes at a particular memory location. Every function has address. Closure function is a function object that remembers values in enclosing scopes even if they are not present in memory. …
Nested Methods: Defining a method inside another method. We cannot access nested method from outside. We access nested method from the definition of outer() method. Local and Non local variables in nested methods: Local variables …
OS module: OS module mainly used to perform file and directory operations Creating files and Directories File and Directory deletions. Renaming the files and directories OS command execution. getcwd(): “cwd” represents “Current Working Directory” It …
calendar module: Module is used to display the calendar. month(): It will display the calendar of specified month in an year with pre-defined structure. By default, every week starts with MONDAY. To start printing calendar …
time module: “time” module allows to handle various operations regarding time, its conversions, its representations. The beginning of time is started measuring from 1 january, 1970 , 12am It is termed as “epoch” in python. …