- 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
Kiran P has Published 123 Articles
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
17K+ Views
IntroductionMatplotlib allows to add more than one plot in the same graph. In this tutorial, I will show you how to present data in the same plot, on two different axes.How to do it..1. Install matplotlib by opening up the python command prompt and firing pip install matplotlib.import matplotlib.pyplot as ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
793 Views
Problem..Assume you need to check the start or end of a string for a specific text patterns. The common patterns might be filename extensions but can also be anything. I will show you few methods on how you can do this.Startswith() methodA simple way to check the beginning of a ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
550 Views
ProblemYou want to search for and replace a text pattern in a string.If we have a very simple literal patterns, using the str.replace() method is an optimal solution.Exampledef sample(): yield 'Is' yield 'USA' yield 'Colder' yield 'Than' yield 'Canada?' text = ' '.join(sample()) print(f"Output {text}")OutputIs USA Colder Than ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
389 Views
Introduction...The queue module provides a first-in, first-out (FIFO), Last-in, First out (LIFO) data structure suitable for multi-threaded programming. Queues can be used to pass data or any wide range of information e.g. session details, paths, variables, .. between creator and consumer threads safely. Locking is generally handled for the caller.Note ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
344 Views
This article is aimed at developers who want to find the largest or smallest items with Python. I will show a few methods touse and will conclude the best method for you.Method – 1: Slice approach on a ListIf you are simply trying to find the single smallest or largest ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
199 Views
ProblemYou need to identify the most frequently occurring items in a sequence.SolutionWe can use counter to keep track of the items in a sequence.What is a Counter ?The “Counter” is a mapping that holds an integer count for each key. Updating an existing key adds to its count. This Objectis ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
408 Views
Introduction..MMAP abbreviated as memory mapping when mapped to a file uses the operating systems virtual memory to access the data on the file system directly, instead of accessing the data with the normal I/O functions. There by improving the I/O performance as it does not require either making a separate ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
212 Views
Solution..The linecache module implements cache which holds the contents of files, parsed into separate lines, in memory. linecache module returns line/s by indexing into a list, and saves time over repeatedly reading the file and parsing lines to find the one desired.lincecache module is very useful when looking for multiple ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
8K+ Views
Problem.You need to compare files in Python.Solution..The filecmp module in python can be used to compare files and directories. 1.cmp(file1, file2[, shallow])filecmp Compares the files file1 and file2 and returns True if identical, False if not. By default, files that have identical attributes as returned by os.stat() are considered to ... Read More
![Kiran P](https://www.tutorialspoint.com/assets/profiles/270934/profile/60_284346-1604569411.jpg)
Kiran P
83 Views
IntroductionIn a real world corporate business setting, most data may not be stored in text or Excel files. SQL-based relational databases such as Oracle, SQL Server, PostgreSQL, and MySQL are in wide use, and many alternative databases have become quite popular.The choice of database is usually dependent on the performance, ... Read More