- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 11365 Articles
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
139 Views
In this example, we will see how to sort an array in Numpy by the (N-1)th column. Sort an array by (n-1) th column using argsort() Example Let us see the first example to sort an array by (n-1)th column − import numpy as np # Creat a Numpy ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
4K+ Views
The range() method in Python is used to return a sequence object. It is used in Python 3.x The xrange() is used to generate sequence of number and used in Python 2.x. Therefore, there’s no xrange() in Python 3.x. Let us first learn about range() and xrange() one by one. ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
2K+ Views
In Python, if you want to copy object, the assignment operator won’t fulfil the purpose. It creates bindings between a target and an object i.e., it never creates a new object. It only creates a new variable sharing the reference of the original object. To fix this, the copy module ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
3K+ Views
The arrays in Python are ndarray objects. The matrix objects are strictly 2-dimensional whereas the ndarray objects can be multi-dimensional. To create arrays in Python, use the Numpy library. Matrices in Python Matrix is a special case of two-dimensional array where each data element is of strictly same size. Matrices ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
4K+ Views
We will display the contents of a text file in reverse order. For that, let us first create a text file amit.txt with the following content Display the contents of a text file in Reverse Order with Slicing Example Let us now read the contents of the above file ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
8K+ Views
Let us understand what is Del and Remove() in a Python List before moving towards the difference. Del Keyword in Python List The del keyword in Python is used to remove an element or multiple elements from a List. We can also remove all the elements i.e. delete the entire ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
188 Views
In this article, we will implement various example to replace all occurrences of a substring with a new string. Let’s say we have the following string − Hi, How are you? How have you been? We have to replace all occurrences of substring “How “ with “Demo”. Therefore, the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
2K+ Views
Python Sequences includes Strings, Lists, Tuples, etc. We can merge elements of a Python sequence using different ways. Merge Elements in a Python List Example The join() method is used to merge elements − # List myList = ['H', 'O', 'W', 'A', 'R', 'E', 'Y', 'O', 'U'] # Display ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
414 Views
To check if all the characters in a string are alphanumeric, we can use the isalnum() method in Python and Regex also. First, let us understand what is alphanumeric. What is Alphanumeric? Alphanumeric includes both letters and numbers i.e., alphabet letter (a-z) and numbers (0-9). Examples: A, a, k, K, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
404 Views
In Python, the // is the double slash operator i.e. Floor Divison. The // operator is used to perform division that rounds the result down to the nearest integer. The usage of the // operator is quite easy. We will also compare the results with single slash division. Let us ... Read More