
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
Rajendra Dharmkar has Published 181 Articles

Rajendra Dharmkar
915 Views
A suffix is a group of letters added at the end of a word. In Python, we can check if a string ends with any one of multiple suffixes using the endswith() method. It takes a tuple of suffixes as an argument and returns True if the string ends ... Read More

Rajendra Dharmkar
2K+ Views
Argparse is a Python module that helps you create easy-to-use command-line interfaces. When building these interfaces, it is important to handle invalid arguments properly to give clear feedback to users and prevent your program from crashing unexpectedly. There are several ways to handle invalid arguments in argparse. You can ... Read More

Rajendra Dharmkar
1K+ Views
This article gives a guide on the difference between re.findall() and re.finditer() methods available in Python. The re module of Python helps in working with regular expressions. Both the re.findall() and re.finditer() methods are used to search for patterns, but they behave differently. Let us see the differences with simple explanations ... Read More

Rajendra Dharmkar
3K+ Views
The site-packages directory in python, is the place where third-party libraries and packages are installed. Knowning the site-packeges location is useful for debugging, verifying installations or inspecting package contents. This directory may vary depending on our operating system, Python version or based on the virtual environment we are using. In ... Read More

Rajendra Dharmkar
217 Views
When writing a C extension for Python, you might need to raise an exception if something goes wrong in your C code. Python provides a special C API that helps you to raise errors in a way that works just like regular Python exceptions.This is helpful because even if your ... Read More

Rajendra Dharmkar
566 Views
Organizing Python modules efficiently is important to maintain scalability and collaboration. Following best practices can make your project easier to understand and use. In this article, we will discuss about an structure approach to organize Python modules with a sample project and some of the best practices to organize. Sample ... Read More

Rajendra Dharmkar
4K+ Views
Whenever you want to add or subtract(apply an offset) to a date/time, use a datetime.datetime(), then add or subtract datetime.timedelta() instances. A timedelta object represents a duration, the difference between two dates or times. The timedelta constructor has the following function signature − datetime.timedelta([days[, seconds[, microseconds[, milliseconds[, minutes[, hours[, weeks]]]]]]]) ... Read More

Rajendra Dharmkar
5K+ Views
You can use the fromtimestamp() function from the datetime module to get a date from a UNIX timestamp. This function takes the timestamp as input and returns the datetime object corresponding to the timestamp. Exmaple import datetime timestamp = datetime.datetime.fromtimestamp(1500000000) print(timestamp.strftime('%Y-%m-%d %H:%M:%S'))OutputThis will give the output −2017-07-14 08:10:00Read More

Rajendra Dharmkar
4K+ Views
It is very easy to do date and time maths in Python using timedelta objects. Whenever you want to add or subtract to a date/time, use a datetime.datetime(), then add or subtract datetime.timedelta() instances. A timedelta object represents a duration, the difference between two dates or times. The timedelta constructor ... Read More

Rajendra Dharmkar
3K+ Views
There is no standard JSON format for dates. Although JavaScript does have a standard date format that is human readable, sorts correctly, includes fractional seconds(which can help re-establish chronology) and conforms to ISO 8601. You can convert a Python date to the JS date format using the strftime function and ... Read More