Found 10784 Articles for Python

Different Forms of Assignment Statements in Python

Niharika Aitam
Updated on 20-Oct-2023 11:57:09

693 Views

Assignment statement in python is the statement used to assign the value to the specified variable. The value assigned to the variable can be of any data type supported by python programming language such as integer, string, float Boolean, list, tuple, dictionary, set etc. Types of assignment statements The different types of assignment statements are as follows. Basic assignment statement Multiple assignment statement Augmented assignment statement Chained assignment statement Unpacking assignment statement Swapping assignment statement Let’s see about each one in detail. Basic Assignment Statement The most frequently and commonly used is the basic assignment statement. In ... Read More

What are the important features of the seaborn library?

Niharika Aitam
Updated on 19-Oct-2023 15:09:45

169 Views

Seaborn is a powerful Python data visualization library built on top of Matplotlib. It provides a high−level interface for creating visually appealing and informative statistical graphics. The following are the important features of the seaborn library. Built−in Themes and Aesthetics Seaborn comes with built−in themes that enhance the overall look of plots. It provides different themes such as "darkgrid", "whitegrid", "dark", "white" and "ticks". These themes apply consistent styles to plots, making it easy to create professional−looking visualizations. Statistical Color Palettes Seaborn offers a wide range of color palettes optimized for different types of data. These color palettes are designed ... Read More

What are the prerequisites of the seaborn library?

Niharika Aitam
Updated on 19-Oct-2023 15:08:33

109 Views

Seaborn library is used to create the visualization of plots. This library uses the matplotlib library to visualize the plots. It has high visualization API. To work with the seaborn library we should have knowledge the below mentioned aspects. Technical knowledge We should have basic knowledge about computer programming and terminology. The basic knowledge of coding and computer operating skills are necessary to work with seaborn. Knowledge on Python Programming: The first and foremost important knowledge that we should have to work with the seaborn library is Python language. Python is one of the most trending languages in present ... Read More

What is Seaborn and why should we use seaborn?

Niharika Aitam
Updated on 19-Oct-2023 15:07:29

81 Views

There are many libraries in the Python programming language. Among them one of the libraries is the seaborn library. It is an open source library. Seaborn library is used to create the visualization of plots. This library uses the matplotlib library to visualize the plots. It has high visualization API. It is mainly used to work with the Data Analysis. In the Seaborn library there are many default plots and styles to beautify the plot. It is collaborated with the features of the matplotlib library of python. It is also integrated with the pandas library data structures. The aim of ... Read More

Python Program to Check Overlapping Prefix - Suffix in Two Lists

Niharika Aitam
Updated on 19-Oct-2023 15:05:58

166 Views

Generally, a prefix is a sequence of characters that appear at the beginning of a string or list or tuple or number, and a suffix is a sequence of characters that appear at the end of a string or number or list or tuple. For example, when we consider the list [1, 2, 3, 4, 5], the prefix is [1, 2, 3] and the suffix will be [3, 4, 5] The prefix and suffix are often used in various programming operations, such as string manipulation, text processing, and data analysis, to refer to specific parts of a sequence. Checking ... Read More

Python program to check if the given string is IPv4 or IPv6 or Invalid

Niharika Aitam
Updated on 19-Oct-2023 15:04:18

547 Views

An IP address is the short form of Internet Protocol address, which is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. It serves as an identifier for the device, allowing it to send and receive data over the network. There are two versions of IP addresses commonly used: IPv4 (Internet Protocol version 4): This is the most widely used version of IP addresses. It consists of four sets of numbers separated by periods, such as "192.168.0.1". Each set can have a value between 0 and 255, representing a total ... Read More

Python program to check if number is palindrome (one-liner)

Niharika Aitam
Updated on 19-Oct-2023 14:59:04

209 Views

Generally, palindrome is a word, phrase, number, or other sequence of characters that reads the same forwards and backwards. In the context of a Python program, a palindrome usually refers to a string or number that remains the same when its characters or digits are reversed. For example, let’s consider the word Madam, when we read this word from left to right and right to left the word will be the same. So this is a palindrome. There are different approaches to find if the given number is palindrome in python. First let’s see the basic approach without using the ... Read More

Python Program to check if elements to the left and right of the pivot are smaller or greater respectively

Niharika Aitam
Updated on 19-Oct-2023 14:56:54

43 Views

Generally, pivot table is the table which contains the grouped values formed by aggregating the individual elements within one or more discrete categories. In Python, the term "pivot" is often associated with sorting algorithms or operations that involve rearranging elements based on a specific value or condition. The pivot can be any element or position within the data structure, and its purpose is to divide the data into two parts: elements smaller than the pivot and elements greater than the pivot. There are different ways to check if the elements to the left and right of the pivot are smaller ... Read More

Python Program to check date in date range

Niharika Aitam
Updated on 19-Oct-2023 14:43:57

1K+ Views

In this article we will learn how to check if the given input date falls in the specified date range or not. There are ways to do so; some of them are explained in detail. Using the datetime module Datetime module offers classes to manipulate the dates and times. This module provides various functions and methods such as date, time, datetime, timedelta, minyear, maxyear, UTC etc. Here in this article we will use the datetime() function of the datetime module. The datetime() accepts the date, month and year as the input arguments and returns the date as output. ... Read More

Python program to Check all strings are mutually disjoint

Niharika Aitam
Updated on 19-Oct-2023 14:41:20

58 Views

String is one of the data structures which hold the data enclosed in double quotes or in single quotes i.e. any data type enclosed inside the quotes considered as string. It is immutable, once we define the data we cannot change or modify. In python we have a function called str() which takes any data as the input and returns the string as output. Mutually disjoint means if no two strings are having the same elements in common. There are different ways to check if all strings are mutually disjoint. Let’s go through each one. Using nested loops Nested loop ... Read More

Advertisements