Yaswanth Varma has Published 377 Articles

Class or Static Variables in Python?

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 13:08:36

6K+ Views

In this article we are going to learn about class or static variables on python. The class variables or static variables that are used to share across all the instances of a class. Unlike the instance variables which are specific to each object, Class variables maintain the common value for ... Read More

How to import a single function from a Python module?

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 13:06:30

10K+ Views

In Python, the module is a file containing Python definitions and statements. For keeping the code organized, we often write functions in separate modules and import them into main program. While importing the entire module, sometimes we only need a single function from it. Python provides a direct way ... Read More

Logical Operators on String in Python?

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 13:03:49

3K+ Views

In this article, we are going to learn about the logical operators on strings in Python. The logical operators such as and, or, and not are used to combine the conditional statements and control the flow of logic. While they are commonly used with the Boolean values, they can also ... Read More

How can I get a list of locally installed Python modules?

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 12:58:14

3K+ Views

Python is a flexible programming language that consists of thousands of libraries and libraries. As the Python environment grows with the installations, it is important to be able to check which packages are currently installed. Whether you are debugging or documenting the environment, listing locally installed python modules can be ... Read More

How to use pip to install python modules in easy way?

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 12:57:43

2K+ Views

While working in python, we will need external libraries or modules to solve the specific problems. This can be done by using the python built-in package manage pip making it easy to install, upgrade and manipulate packages. In this articles, we will learn how to use pip to install ... Read More

Removing stop words with NLTK in Python

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 12:55:26

770 Views

In NLP(Natural Language Processing), stop words are the words that are filtered out before or after processing text data, such as "is", "and", "a" etc. These words do not add meaning to the text and can be removed to improve the efficiency. The Natural Language Toolkit (NLTK) is the ... Read More

Sort the words in lexicographical order in Python

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 12:45:34

3K+ Views

Lexicographical order is similar way the words are arranged in a dictionary. In this article, we are going to learn how to sort the words in lexicographical order, which means arranging them in alphabetical order (A-Z). Python provides built-in methods like split() and sorted() to perform this operation. ... Read More

Check if array can be divided into two sub-arrays such that their absolute difference is Ks in Python

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 12:40:37

113 Views

In this article we are going to check whether the given array can be divided into two sub-array in such a way that the absolute difference between the sums of these two sub-array is equal to the given value k. The absolute difference is nothing but the non-negative ... Read More

Check if array contains contiguous integers with duplicates allowed in Python

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 12:37:04

470 Views

Check for Contiguous Integers in an Array A sequence of numbers is said to be contiguous if the numbers can be arranged in such a way that each number follows the previous one without any gaps. For example,  [11, 12, 13, 14] is a contiguous sequence because there are ... Read More

How to delete consonants from a string in Python?

Yaswanth Varma

Yaswanth Varma

Updated on 28-Aug-2025 12:32:39

1K+ Views

The consonants are the alphabetic characters that is not a vowel (a, e, i, o, u). In Python, String manipulation is the common task, In this article we will explore how to delete consonants from a string using different approaches, including loops, list comprehensions and regular expression. Using ... Read More

Advertisements