Akshitha Mote has Published 55 Articles

Python program to capitalize each word\'s first letter

Akshitha Mote

Akshitha Mote

Updated on 15-Apr-2025 12:58:55

2K+ Views

Let's understand the problem statement: we need to convert a given strings to a title case, which involves capitalizing the first letter of each word while converting the remaining letters to lowercase. The following are the various ways to capitalize each word's first letter in a string - ... Read More

How to write Python regular expression to match with file extension?

Akshitha Mote

Akshitha Mote

Updated on 15-Apr-2025 12:34:02

893 Views

Using Python, we can easily search for specific types of files from a mixed list of file names using regular expressions. For this, we need to import Python’s built-in module called re using the import keyword. The Regular expression or Regex is a special sequence of characters like \, *, ... Read More

What does the str() function do in Python Object Oriented Programming?

Akshitha Mote

Akshitha Mote

Updated on 14-Apr-2025 16:23:59

609 Views

In Python, the __str__() method is used to compute the informal or human readable string representation of an object. This method is called by the built-in print(), string and format() functions. This method is called by the implementation of the default __format__() method and the built-in function print(). This method ... Read More

What does the repr() function do in Python Object Oriented Programming?

Akshitha Mote

Akshitha Mote

Updated on 14-Apr-2025 16:22:45

761 Views

In Python, the __repr__() method is a built-in function used to compute the official string representation of an object. It is used in debugging and logging purposes as it provides a detailed and clear representation of an object. This method is also known as dunder method as it begins with ... Read More

How does constructor method __init__ work in Python?

Akshitha Mote

Akshitha Mote

Updated on 14-Apr-2025 16:20:56

1K+ Views

In Python, the__init__() method is a special method within a class that gets automatically called when an object is created. It is used to initialize the attributes of the object. It is also known as a constructor. The self is always the first argument to the __init__() method that refers to ... Read More

Python - Replace duplicate Occurrence in String

Akshitha Mote

Akshitha Mote

Updated on 22-Jan-2025 14:31:12

769 Views

In this article, we will explore different ways to replace duplicate occurrences in a string. Before understanding the solution let's try to understand the problem statement with an example. Consider a string "Ram lives in Hyderabad. Ram is studying in class 10. Ram is the class Monitor of the class." ... Read More

How to convert an integer to a unicode character in Python?

Akshitha Mote

Akshitha Mote

Updated on 22-Jan-2025 14:30:09

4K+ Views

Unicode is a standardized character encoding that assigns a unique number to each character in most of the world's writing systems. Unicode separates the code points from the details of the encoding system. This permits a much wider range of characters up to four bytes. The Unicode character set incorporates ... Read More

Python zip() Function

Akshitha Mote

Akshitha Mote

Updated on 22-Jan-2025 14:28:28

583 Views

The zip() function in Python is used to map elements from multiple iterables at corresponding index positions. It returns an iterator of tuples, where each tuple contains elements from the input iterables at the same index. Suppose the lengths of the input iterables are not the same. In that case, ... Read More

Getting console.log output from Chrome with Selenium Python API bindings.

Akshitha Mote

Akshitha Mote

Updated on 22-Jan-2025 13:52:44

5K+ Views

We can get console.log output from Chrome with Selenium Python API bindings. We will perform this with the DesiredCapabilities class. We shall enable logging from the browser with DesiredCapabilities.Chrome setting. We have to pass this browser capability to the driver object by passing it as a parameter to the Chrome ... Read More

Python program to display Astrological sign or Zodiac sign for a given data of birth.

Akshitha Mote

Akshitha Mote

Updated on 22-Jan-2025 13:47:27

4K+ Views

In this article, let's try to find the user's astrological sign for a given data of birth. The user input data will be compared with predefined data ranges for each zodiac sign using programming logic. For example, we can infer that the user is a Taurus if their birthdate falls ... Read More

Advertisements