• 16 November

    Print None as Empty String in Python

    The term None in python is not the same as an empty string or 0. None is a whole data type in itself that is provided by python and it is utilized to define a null value. An object of the None data type can be, however, represented as an empty string in python by […]

  • 16 November

    Create Temp File in Python

    Sometimes applications require storage and processing of temporary data. For such purposes, Python provides the tempfile library that can be used to create such files and directories. How to Create Temp File in Python This tutorial will demonstrate how to create temp file in Python. Using the tempfile.NamedTemporaryFile object The NamedTemporaryFile constructor is used to […]

  • 02 November

    Print without Parentheses in Python

    How to Print without Parentheses in Python The upgrade of Python 2 to 3 introduced several critical changes to the existing Python functionality. One such change was done to the print statement. In Python 2, we used print as a statement. We have seen people stating to use parentheses with print in Python 3. This […]

  • 27 October

    Add Spaces Between Characters in Python

    A string is the generic data type that is offered by Python to store and represent a series of Unicode characters. There might be a need to add a space between all characters of a given string. This tutorial focuses on and demonstrates the different ways available to add spaces between characters in Python. The […]

  • 26 October

    Add Commas to String in Python

    A string is capable of holding both numeric characters and letters of the alphabet. There may sometimes be a need to add commas to relevant spaces in a string containing numerical values in order to represent the number according to the specified currency system. This tutorial focuses on and demonstrates the different ways available to […]

  • 26 October

    Get Number of Business Days Between Two Dates in Python

    Python provides the datetime object to store and work with date and time values. These objects are compatible with various libraries and can be manipulated using different functions from such libraries. One such operation is getting all the dates between a given range. This can be done in different ways as well using various functions. […]

  • 25 October

    Get All Dates Between Two Days in Python

    In Python, we can efficiently work with date and time values using the datetime library. This library provides datetime objects that can store such data. The dateutil, arrow libraries also allow us to process such values in Python. Get All Dates Between Two Days in Python In this tutorial, we will discuss how to get […]

  • 25 October

    Get First Day of Month in Python

    The datetime objects defined in the datetime library provide a convenient way to store date and time values. Other libraries like dateutil also provide extended functionalities that can be used with such objects. In this tutorial, we will discuss how to get first day of month in Python. Get First Day of Month in Python […]

  • 21 October

    Remove Time from datetime in Python

    1. Introduction In Python programming, dealing with date and time is a common scenario. Often, there’s a need to manipulate datetime objects, such as extracting only the date part and discarding the time. For instance, consider a datetime object representing 2023-11-24 15:30:00. The goal is to transform this into just the date 2023-11-24, removing the […]