Safa Mulani

Safa Mulani

An enthusiast in every forthcoming wonders!

Python zip() Function

Python zip() function stores data inside it. This function accepts iterable elements as input and returns an iterable as the output. If no iterable elements are provided to the python zip function, it returns an empty iterator. It thus aggregates…

Python Reverse List

Python provides multiple ways to reverse the elements in a list. Python Reverse List Elements The following techniques can be used to reverse a Python List: By using the reversed() function By using the reverse() function By using Slicing technique…

Python File Handling

What is Python File Handling? File handling is basically the management of the files on a file system. Every operating system has its own way to store files. Python File handling is useful to work with files in our programs.…

Python import Statement

Python import statement enables the user to import particular modules in the corresponding program. It resembles the #include header_file in C As soon as the interpreter encounters the import statement in a particular code, it searches for the same in…

Python Namedtuple

A sequence of immutable objects is a Tuple. Namedtuple enables the user to provide names to the elements in the Tuple. So, it provides the user with the option to access the elements either by index or by the designated…

Python OrderedDict

OrderedDict is a subclass of the dictionary, which maintains the order in which the elements/items are added to it. OrderedDict preserves the order of insertion of the elements. A default dict does not save the order and results in the iteration…

Python inspect module

Python’s inspect module provides the introspection of live objects and the source code of the same. It also provides the introspection of the classes and functions used throughout the program. The inspect module provides the user to make use of…

Python Pendulum Module

Python’s pendulum module enables date/time conversions and manipulations. It helps the user to work easily with date/time formats. This module enables and provides all the functionalities provided by the pytz module. Installation of pendulum module through the command-line: Importing pendulum…

Python arrow module

Python arrow module enables date-time manipulations. It helps create instances and manipulate the timestamp accordingly. It shows a user-friendly approach to deal with the date-time conversions. Features: Arrow module is supported by Python 2.7 and higher versions. Time-zone aware Parses…

Python add elements to an Array

Python doesn’t have a specific data type to represent arrays. The following can be used to represent arrays in Python: 1. Adding to an array using Lists If we are using List as an array, the following methods can be…