
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10476 Articles for Python

1K+ Views
Inter-process communication (IPC) is essential, When multiple processes need to share the data and work together. In Python, multiprocessing module provides various IPC mechanisms, Out of which one is the pipe. The pipe allows the data to be transferred from one process to another in a two-way (duplex) or one-way mode. It is useful when a parent process creates a child process and want them to exchange messages or data. Python multiprocessing.Pipe() Method The multiprocessing.Pipe() is a method in the Python multiprocessing module that return the pair of connection objects connected by a pipe. This pipe can be ... Read More

2K+ Views
Here given a password, our task is to check that this Password is valid or not. Here we use re module that provide regular expression and re.search() is used for checking the validation of alphabets, digits or special characters. Algorithm Step 1: first we take an alphanumeric string as a password. Step 2: first check that this string should minimum 8 characters. Step 3: the alphabets must be between a-z. Step 4: At least one alphabet should be in Uppercase A-Z. Step 5: At least 1 number or digit between 0-9. Step 6: At least 1 character from [_ ... Read More

345 Views
In this article, we are going to learn how to iterate over multiple lists simultaneously. It is useful when the lists contain related data. For example, one list stores names, another stores genders, and the last one stores ages. By iterating over these lists simultaneously, we can access the necessary details of a single person. Iterating Over Multiple Lists using zip() Function The Python zip() function is a built-in function used to combine the elements from two or more iterator objects (such as lists, tuples, etc) and returns the result. The resultant iterator object contains tuples where the ith tuple ... Read More

251 Views
Python Program to Count Total Bits in a Number To calculate the total bits in a number, convert it to binary using the bin() function. A bit represents data as 0 or 1, and 8 bits make a Byte. Bits are essential for data transmission, storage, and arithmetic operations, and bitwise operations are also possible. The output of bin() starts with 0b, followed by the binary digits. To find the total bit count, remove the leading 0b after conversion. Syntax Following is the Syntax for the bin() function. Where, number is the number to be converted into binary format variable_name ... Read More

176 Views
Every human being have emotions just like happy, sad, neutral, surprise, sorrow etc., if we create the emotions of images like happy, sad, neutral, surprise, etc. in Python. We can use Microsoft emotion API for any development purpose.We can easily elaborate all these emotions using Microsoft emotion API's.Example Codeimport http.client, urllib.request import urllib.parse, urllib.error import base64, sys import simplejson as json # replace with subscription_key # you obtained after registration subscription_key = '23d39244dbe55173214b56ab45d56cla' headers = { # Request for headers. And also replace the placeholder key with # our subscription key. 'Content-Type': 'application/json', 'Ocp-Apim-Subscription-Key': ... Read More

1K+ Views
The elements in the contiguous memory address are contained in the linear data structure known as an array. At these places, it primarily groups components of the same data type. Given an array of integers. The array is to be divided into two halves, 0s and 1s, according to the article "Segregate 0s and 1s in an array." The array should have all the 0’s on the left and all the 1’s on the right. Input-Output Scenario Let’s consider an input and its output scenarios to segregate 0’s and 1’s in an array list - Input: [0, 1, ... Read More

355 Views
First we take a user input string with the combination of 1’s and 0’s.then create a new string with 1’s, then check if there is any p number of consecutive 1’s is present or not. If present then display FOUND otherwise NOTFOUND. Example Binary number ::1111001111 Enter consecutive 1’s :3 Consecutive 1's is Found Algorithm Step 1: input a string with the combination of 1’s, it’s stored in the variable X and 0’s and p is the consecutive 1’s in a binary number. Step 2: form a new string of p 1’s. newstring=”1”*p Step ... Read More

10K+ Views
We'll learn how to split and join a string in Python in this article. Python defines strings as a collection of characters enclosed in one, two, or three quotations. When a string is split, it is divided into smaller strings using a specific delimiter. A set of one or more characters used to define a boundary is known as a delimiter. Anything could serve as a delimiter. The comma (, ), semicolon (;), tab (t), space (), and pipe (|) are the most widely used delimiters. Everywhere the specified delimiter appears in a given string, we must split it, and ... Read More

26K+ Views
You will understand how to multiply every number in a list in Python in this article using various methods. A list is an ordered collection of values that are enclosed in square brackets. List contains values known as items that can be retrieved by their unique index. We'll create a function that multiplies each value in the list and outputs the result. The result of multiplying all the values is a single thing. For instance, the result will be 36 for the list [3, 2, 6]. We will go over the various methods for calculating the sum of all the ... Read More

2K+ Views
In this article, we will learn how to remove and print every third element or item from the list until it becomes empty using Python Program. First we create a list, the index of the starting address is 0 and the position of the first third element is 2 and need to traverse till the list becomes empty and another important work to do every time we have to find the index of the next third element and print the value and after that reduce the length of the list. Input-Output Scenario Following is the input and its output scenario ... Read More