• 18 May

    Escape Curly Brace in f-String in Python

    In this tutorial, we will see how to escape curly brace in f-string in Python. Use of the f-string in Python In Python, we can format strings using different methods to get the final result in our desired style and format. String formatting is also used for replacing and filling in missing values. Python 3.6 […]

  • 18 May

    Print a Character n Times in Python

    In Python, the print() function is used to display some results on the output console. The print() function has evolved in Python. It started as a statement and it wasn’t until Python 3 that it was changed to a function. Print Character n Times in Python We will discuss how to print a character n […]

  • 18 May

    Get Variable from Function in Python

    1. Introduction When working with Python, a common task is retrieving a variable’s value from a function. This capability is crucial in various programming scenarios, such as modular coding, data processing, and algorithm implementation. Our goal in this article is to explore different methods for extracting variable values from functions in Python. Example Scenario: Imagine […]

  • 17 May

    Add Month to datetime in Python

    In Python, we can represent date values using the standard datetime library. We can store all the attributes of the date along with time attributes in datetime objects. The datetime objects can be manipulated with other libraries also like dateutil, pandas, and more. We cannot directly add or subtract datetime objects and use the datetime.timedelta […]

  • 12 May

    Extract Integer from String in Python

    How to extract integer from string in Python? A string can store a sequence of characters. These characters can be alphabets, numbers, special characters, and more. We will discuss how to extract integer from string in Python. Using the isdigit() function to extract integer from string in Python. In Python, the isdigit() function is used […]

  • Convert CSV to dictionary in Python
    09 May

    Convert CSV to Dictionary in Python

    CSV and Dictionaries in Python A CSV file is a comma-separated text file. It is very commonly used to transfer records and is compatible with Excel as well to store data in rows and columns. In Python, we can read CSV files easily using different functions. The pandas and csv module are used commonly to […]

  • Make requirements.txt in Python
    03 May

    Make requirements.txt in python

    What is the requirements.txt file in Python? Every package is also updated regularly and features get added and deprecated with time. Every Python script may use any desired number of packages for different functionalities and objects. The requirements.txt is a simple text file generally added by the developers that contain a list of all the […]

  • Create an array of 1 to 10 in Python
    03 May

    Create an Array of 1 to 10 in Python

    In this article, we will see how to create an array of 1 to 10 in Python. Introduction Arrays are an essential part of any programming language and are widely used by programmers in every field of coding. Python seems to have a different approach related to the use of arrays, as it does not […]

  • Remove Urls from String in Python
    03 May

    Remove Urls from Text in Python

    In this post, we will see how to remove Urls from text in Python. Introduction In Python, we can read and process text data. We can perform various operations on such texts using different libraries. In this tutorial, we will learn how to remove URLs from text in Python. A URL is a link for […]