Pavitra has Published 239 Answers

The intersection of two arrays in Python (Lambda expression and filter function )

Pavitra

Pavitra

Updated on 07-Aug-2019 07:32:56

In this article, we will learn about the intersection of two arrays in Python with the help of Lambda expression and filter function.The problem is that we are given two arrays we have to find out common elements in both of them.Algorithm1. Declaring an intersection function with two arguments. 2. ... Read More

Inplace Operators in Python - ixor(), iand(), ipow()

Pavitra

Pavitra

Updated on 07-Aug-2019 07:27:12

In this article, we will learn about some of the inplace operators available in Python 3.x. Or earlier.Python provides methods to perform inplace operations, i.e assignment and computation simultaneously using in a single statement with the help of “operator” module. Here we will discuss about ixor(), iand(), ipow() functions .ixor()This ... Read More

Inplace Operators in Python - iadd(), isub(), iconcat()

Pavitra

Pavitra

Updated on 07-Aug-2019 07:25:09

In this article, we will learn about some of the inplace operators available in Python 3.x. Or earlier.Python provides methods to perform inplace operations, i.e assignment and computation simultaneously using in a single statement with the help of “operator” module. Here we will discuss about iadd() , isub() & iconcat() ... Read More

Initialize Matrix in Python

Pavitra

Pavitra

Updated on 07-Aug-2019 07:23:19

In this article, we will learn about how we can initialize matrix using two dimensional list in Python 3.x. Or earlier.Let’s see the intuitive way to initialize a matrix that only python language offers. Here we take advantage of List comprehension. we initialise the inner list and then extend to ... Read More

Python Increment and Decrement Operators

Pavitra

Pavitra

Updated on 07-Aug-2019 07:21:40

In this article, we will learn about increment and decrement operators in Python 3.x. Or earlier. In other languages we have pre and post increment and decrement (++ --) operators.In Python we don’t have any such operators . But we can implement these operators in the form as dicussed in ... Read More

Inbuilt Data Structures in Python

Pavitra

Pavitra

Updated on 07-Aug-2019 07:18:26

In this article, we will learn about the 4 inbuilt data structures in python namely Lists, Dictionaries, Tuples & Sets.ListsA list is an ordered sequence of elements. It is a non-scalar data structure and mutable in nature. A list can contain distinct data types in contrast to arrays storing elements ... Read More

Important differences between Python 2.x and Python 3.x with examples

Pavitra

Pavitra

Updated on 07-Aug-2019 07:15:23

In this article, we will learn about the major changes in Python 2.x. & Python 3.x.Input MethodologyOutput MethodologyDivision OperatorException HandlingInput MethodologyEarlier we used to have the raw_input() method but in newer versions, it is replaced by the input() method as shown belowHere we take an integer input in a by ... Read More

Import module in Python

Pavitra

Pavitra

Updated on 07-Aug-2019 07:11:04

In this article, we will learn about all the methods by which we can import modules in Python 3.x. Or earlier. The import statement is used to include all the dependencies/modules needed to execute the code.The most common way :Syntaximport < module name >Exampleimport math print(math.log10(100))Output2.0The efficient way :Syntaxfrom <module ... Read More

id() function in Python

Pavitra

Pavitra

Updated on 07-Aug-2019 07:05:39

In this article, we will learn about the usage and implementation of id() function in Python 3.x. Or earlier. It is present in Python Standard Library and is automatically imported before executing the code.Syntax: id (<entity name>)Return value: Identity value of type <int>The function accepts exactly one argument i.e. the ... Read More

Advertisements