Disha Verma has Published 63 Articles

Adding Custom Column to Tuple list in Python

Disha Verma

Disha Verma

Updated on 13-Jul-2025 00:27:19

403 Views

In this article, we will learn how to add a custom column in a tuple list (i.e., a list of tuples) in Python. Tuples store sequences of data enclosed in parentheses as shown below: Tuples = (11, 22, 33) And the list of tuples is represented ... Read More

Adding list elements to tuples list in Python

Disha Verma

Disha Verma

Updated on 13-Jul-2025 00:17:00

194 Views

Our task is to add list items to a tuple list (i.e, a list of tuples) in Python. Tuples store sequences of data enclosed in parentheses, as shown below: Tuples = (11, 22, 33) And the list of tuples is represented as follows: List of tuples = ... Read More

How to create a Python dictionary from an object\'s fields?

Disha Verma

Disha Verma

Updated on 20-May-2025 16:12:44

373 Views

In Python, objects are instances of classes containing attributes and methods, while dictionaries are collections of key-value pairs. We can obtain a dictionary from an object's fields - Using __dict__ Using vars() Using __dict__ You can ... Read More

How to calculate absolute value in Python?

Disha Verma

Disha Verma

Updated on 20-May-2025 15:54:39

9K+ Views

The absolute value of a number is its non-negative representation. It specifies the distance of that number from zero on a number line, irrespective of its direction.For example, the absolute value of -2 is 2, and 2 is simply 2. In this article, we will explore how to ... Read More

How to map two lists into a dictionary in Python?

Disha Verma

Disha Verma

Updated on 20-May-2025 15:27:23

407 Views

In Python, dictionaries are used to store data as key-value pairs, and lists store a collection of items separated by commas. To map two lists into a dictionary, we have various methods in Python that we will explore in this article. Mapping two lists into a Dictionary ... Read More

What is the homogeneous list in Python list?

Disha Verma

Disha Verma

Updated on 20-May-2025 14:52:06

1K+ Views

In Python, a list is a mutable data type used to store a collection of items, which are separated by commas and enclosed within square brackets [ ]. According to the Python documentation, there is no concept of a homogeneous list in Python. However, a Python list ... Read More

JavaScript - Creating a Custom Image Slider

Disha Verma

Disha Verma

Updated on 24-Apr-2025 16:44:12

906 Views

An image slider is a user interface component in JavaScript that allows users to view a series of images in a slideshow format. It is also known as a carousel or slideshow. An image slider consists of navigation buttons (such as next and previous buttons) that allow users to navigate ... Read More

What does \\\'is\\\' operator do in Python?

Disha Verma

Disha Verma

Updated on 21-Apr-2025 16:34:55

3K+ Views

The "is" operator in Python is an identity operator. This operator checks whether two variables refer to the same object in memory. It returns boolean values as a result. Each object in the computer's memory is assigned a unique identification number (id) by the Python interpreter. Identity operators ... Read More

What is different in | and OR operators in Python?

Disha Verma

Disha Verma

Updated on 21-Apr-2025 16:33:43

2K+ Views

The OR and (|) are logical operators in Python. The difference between these two is that OR is a Logical OR operator, and | is a Bitwise OR Operator. Both operators are used to perform different operations. In this article, we will explore the behavior of these operators ... Read More

What is modulo % operator in Python?

Disha Verma

Disha Verma

Updated on 18-Apr-2025 15:21:04

640 Views

The modulo operator is denoted by the "%" symbol in Python. It can also be called the remainder operator because it is used to return the remainder of the division of two numeric operands. Using this operator, we can solve problems ranging from simple to complex. Syntax ... Read More

1 2 3 4 5 ... 7 Next
Advertisements