Niharikaa Aitam has Published 87 Articles

Program to find longest equivalent sublist after K increments in Python

Niharikaa Aitam

Niharikaa Aitam

Updated on 30-Jun-2025 16:52:55

204 Views

The longest equivalent sublist after K increments is known as the longest contiguous portion of a list where we can make all the elements equal by performing at most K increment operations. Suppose we have a list of numbers called nums and k. Now, consider an operation where we can ... Read More

How to copy files from one server to another using Python?

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:31:03

9K+ Views

Transferring files from one server to another is a most common task in system administration, DevOps and development workflows. The tools such as scp and rsync are used for the file transfer. Python provides different methods and tools to transfer the files from one server to another using a third ... Read More

Check if both halves of the string have same set of characters in Python

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:29:52

302 Views

In Python, a string is one of the data structures that is a sequence of characters enclosed within single quotes '' or double quotes "". It is immutable, i.e., once a string is created, it cannot be changed. When we want to check if both halves of the string have ... Read More

Basic calculator program using Python program

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:27:44

1K+ Views

In this tutorial, we are going to build a basic calculator in Python. As we all know that a calculator will give six options to the user from which they select one option and we will perform the respective operation. Following are the arithmetic operations that we can perform using ... Read More

Generate two output strings depending upon occurrence of character in input string in Python

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:19:22

145 Views

In Python, a string is one of the data structures that is a sequence of characters enclosed within single quotes '' or double quotes "". It is immutable, i.e., once a string is created, it cannot be changed. When we want to generate two output strings based on character occurrence ... Read More

To print all elements in sorted order from row and column wise sorted matrix in Python

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:18:12

248 Views

In Python, we may go through the matrices that are sorted in a particular order. A common case is a matrix where each row and each column is sorted in increasing order, and this does not mean that the entire matrix is sorted. In such cases, we need to ... Read More

How to copy a file to a remote server in Python using SCP or SSH?

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:16:33

16K+ Views

When we want to transfer files from our local system to a remote server securely, Python provides possible ways to do the file transfer using the Paramiko and SCP libraries. These libraries support SSH-based file transfer, which is secure and reliable. Installing Required Libraries Before we start with file transfer, ... Read More

How to perform different commands over ssh with Python?

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:15:44

2K+ Views

When we want to remotely access and execute commands on another machine then we use the paramiko library in Python. Paramiko is a third-party library that is used to connect and communicate securely with remote machines using the SSH, i.e., Secure Shell protocol. It allows us to execute commands, transfer ... Read More

How to print Python dictionary into JSON format?

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 19:07:27

8K+ Views

In Python, Dictionaries are used to store structured data. When we want to print this data in a human-readable format or transfer it through the internet, such as to an API, then we need to convert the dictionary to JSON, i.e., JavaScript Object Notation. Python has a built-in module ... Read More

How to merge multiple Python dictionaries?

Niharikaa Aitam

Niharikaa Aitam

Updated on 20-Jun-2025 18:57:20

333 Views

In Python, a dictionary is a collection of key-value pairs that is used for data retrieval. In some cases, we may need to combine two or more dictionaries into one. This is known as merging dictionaries. In this article, we will explore different methods to merge multiple dictionaries in ... Read More

1 2 3 4 5 ... 9 Next
Advertisements