
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

573 Views
In Python, "array" is typically called a list. The Numpy is a multi-dimensional homogeneous array of fixed-size items. Due to some similarities between NumPy arrays and Python lists it defines significant variations in data formats such as memory utilization, performance, and functionality. Using array() and sort() method The NumPy array can be sorted in ascending or descending order. This can be possible using these methods because the array() allows the user to put the list inside of the parameter and pass it to sort() to get the result. As we know a list has powerful functionality in Python. Syntax It's ... Read More

611 Views
In Python, we have a predefined function rstrip() to remove the character from the right side. It means it will remove the whitespace from the rightside side of the string. Let’s take an example to understand the trim of a string from the left side. In the given string “WIRELESS” remove the right string LESS and get the result value as “WIRE”. In the given string “kingdom” remove the right string dom and get the result value as “king”. Syntax The following syntax used in the examples are − isspace() This is a predefined method used in ... Read More

10K+ Views
In Python, we have some built-in functions like join(), map(), reduce(), and len() that can be used to convert the array of characters into the string. The array of characters is defined by breaking each character from the string. Python has a predefined method join() to join all the characters to make the string. Another way to solve the program is by using list comprehension and the join() method. Let’s take an example to understand the conversion of an array of characters into a string − The character is ‘p’, ‘e’, and ‘n’: The string becomes a pen. The ... Read More

285 Views
Finding lines in a file that match a particular pattern is a typical operation with many applications, such as log analysis, text processing, and data filtering. In this article, we will discuss the Python Program to Print all the Pattern that Matches Given Pattern From a File. To solve this problem, we will first create a pattern in a file to save it. Our task is to programmatically create the exact pattern that we see in the file. By applying some conditions it will check whether the pattern matches or not from a given file. Syntax with open("file_name.txt", "r") as file The ... Read More

215 Views
The process of conducting mathematical operations on time values is referred to as time arithmetic. Adding or subtracting time durations, determining the difference between two-time values, or determining the average of a group of time values are a few examples of time arithmetic. Some of the applications are used to demonstrate time arithmetic such as time tracker, data analysis, and time scheduling. In Python, we have time built-in functions i.e. strptime() and divmod() that can be used to demonstrate the time arithmetic. There are two ways of time formats that are 12 hours and 24 hours. Let’s take an example ... Read More

6K+ Views
In Python, we have a built-in function int(), timedelta(), and divmod() that can be used to get the number in the form integer and is useful for converting Miliseconds to Minutes and seconds. The milliseconds are defined by the short duration of time. The milliseconds are equal to one-thousandth of the second. When 5000 milliseconds convert into minutes the result value is 0.08 minutes and 5 seconds. For example- The photographer clicks the picture and saves it in a gallery which takes some seconds that time is preferred to be milliseconds. Syntax int() The int() function accepts the ... Read More

393 Views
Python has various internal functions like isspace(), lstrip(), and replace() are used for trimming a given string. It means it will remove the whitespace from the left side of the string. Let’s take an example to understand the trim of a string from the left side. In the given string “MICROBOX” remove the left string MI and get the result value as “CROBOX”. In the given string “synapse” remove the left string syn and get the result value as “apse”. In this article, we will learn how to develop a Python program that will trim the string from ... Read More

7K+ Views
Multiple files are compressed together and stored in a single file format called a zip file. There are some applications such as file management, data processing, file conversion, and backup & archive of files. In Python, we have zip in-built functions like infolist() and namelist() that can be used to Read and printing all files from a zip file. We utilize the predefined method 'namelist()' or 'infolist' to read the data within the zip folder in order to output all of the files that are currently present inside the zip file. Input // This is a zip folderOutput The ... Read More

9K+ Views
In Python, we have some file in-built functions that can be used to count the number of lines present in the file. We will open the notepad and write some lines of text into it. Then use this file in the file handling program in Python to count the total number of lines present in the file. The ‘r’ mode is defined by reading the file's text. Syntax The following syntax is used in the example is − with open("file_name.txt", mode) The open method is used for opening a file in Python. This accepts the two parameters − ... Read More

2K+ Views
In Python, we have file handling in-built functions like open(), write(), and close() that can be used to Append a String or Text to an Existing File. The term append is used in the program of file handling in Python. To append the text or string means that the user writes the new text to the existing file. The main purpose of adding text to an existing file means giving extra information to the existing file. Note-taking and Data collection are such applications of this program. Syntax The following syntax is used in the example is − open("file_name.txt", mode) ... Read More