Nikitasha Shrivastava has Published 70 Articles

What is a sequence data type in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-May-2025 18:29:47

16K+ Views

Sequence Data Types are used to store data in containers in the Python programming language. The different types of containers used to store the data are List, Tuple, and String. Lists are mutable and can hold data of any type, whereas Strings are immutable and can only store data of ... Read More

How to index and slice lists in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-May-2025 18:25:49

5K+ Views

Lists are one of the four most commonly used data structures provided by Python. A list is a data structure in Python that is mutable and has an ordered sequence of elements. In Python, a list is like a box in which you can keep many things like numbers, names, ... Read More

How does in operator work on list in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-May-2025 18:18:54

19K+ Views

The in operator in Python In Python, the in operator determines whether a given value is a constituent element of a sequence such as a string, array, list, or tuple. When used in a condition, the statement returns a Boolean result of True or False. The statement returns True if ... Read More

How does * operator work on list in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-May-2025 18:06:22

17K+ Views

In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array. In this article, we will show you how the * operator works on a list in python. So we ... Read More

How to append objects in a list in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-May-2025 18:01:11

20K+ Views

List is one of the most commonly used data structures provided by python. List is a data structure in Python that is mutable and has an ordered sequence of elements. In this article, we will discuss how to add objects to a list and the different ways to add objects, ... Read More

How to find the element from a Python list with a maximum value?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-May-2025 17:57:53

10K+ Views

List is one of the most commonly used data structures provided by Python. List is a data structure in Python that is mutable and has an ordered sequence of elements. Here is a simple example of a list of integer values - lis= [1, 2, 3, 4, 5] print(lis) ... Read More

How to get formatted date and time in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-May-2025 17:49:47

112K+ Views

This article will discuss how to format date and time in Python. Python makes it easy to work with date and time with the help of the datetime module. You can format dates and times in different formats as per your needs. Datetime Module of Python The datetime module in ... Read More

What are character classes or character sets used in Python regular expression?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 07-May-2025 17:54:57

2K+ Views

In this chapter, we will understand character classes, how they work. and provide simple examples and programs to explain their usage. One of the main components of regular expressions is character classes or character sets. Character classes help you to define a set of characters that will match in a ... Read More

How regular expression alternatives work in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 25-Apr-2025 14:39:33

1K+ Views

Regular expressions are a very crucial part of Python's built-in 're' module. It is used to work with text data. One of the advantages of regex is the ability to use alternatives, which allows you to match one pattern out of multiple options. Alternatives in the regular expressions function are ... Read More

How regular expression back references works in Python?

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 24-Apr-2025 18:07:20

838 Views

Backreferences in regular expressions allow us to reuse a previously recorded group inside the same regex pattern. This ability is very useful when we want to match recurrent patterns in strings. What are Backreferences? A regular expression reference to a previously recorded group is called a backreference. When parentheses "()" ... Read More

Advertisements