• 09 August

    Python | cv2 imwrite() Method

    In this tutorial, we will see how to save an image in your own system using python by using open-cv which exists as cv2 (computer vision) library. You can use imwrite() method of cv2 library to save an image on your system. To use cv2 library, you need to import cv2 library using import statement. […]

  • 19 May

    Remove Extension From Filename in Python

    While programming in python, we often have to deal with file names. In this article, we will discuss how we can Remove Extension From Filename in python.   How to Remove Extension From Filename in Python? To Remove Extension From Filename in python, we can use the functions provided in the os module or the pathlib […]

  • 19 May

    Remove First and Last Character of String in Python

    We use strings in python to handle text data. For processing the data, we sometimes need to remove one or more characters from the string. In this article, we will discuss how we can remove the first and the Last Character of string in python. We will also look at how we can remove the […]

  • 19 May

    Remove HTML Tags From String in Python

    While collecting data, we often need to process texts with HTML tags. In this article, we will discuss different ways to remove HTML tags from string in python. Remove HTML tags from string in python Using Regular Expressions Regular expressions are one of the best ways to process text data. We can also remove HTML […]

  • 19 May

    Get Directory Name From File Path in Python

    File operations are a fundamental part of python application development. In this article, we will discuss how we can get the directory name from the file path in python. Later, we will also discuss how we can remove filename from the file path in python. How to Get directory name from file path in python? […]

  • 19 May

    Remove xa0 from String in Python

    In this post, we will see how to remove xa0 from String in python Python programmers have to deal with large amounts of various Unicode characters that appear when parsing HTML files and while using the Beautiful Soup library for dealing with HTML files. One such Unicode character is the xa0, which represents spaces in […]

  • 19 May

    If-else in one line in Python

    The if-else statement is one of the common statements of many programming languages like Python, C/C++, and Java. It is a conditional statement and is used to perform some action based on a condition. With the if-else statement, we run a block of code based on the evaluation of a provided condition. If the condition […]

  • 19 May

    Compare list elements with each other in Python

    In this post, we will see how to compare list elements with each other in Python. Compare all elements in list Python A list is a very useful iterable in Python. Every element is stored at a given index and can be accessed using this index. We can compare all elements in a list in […]

  • 19 May

    Print Current Directory in Python

    In this post, we will see how to print current directory in Python. Files and Directories in Python A computer system uses directories to store and organize files. Every file is present in some directory. There is a root folder at the top of the hierarchy, and every directory is a child of this root. […]

  • 18 May

    Convert bool to String in Python

    In this post, we will see how to convert bool to string in Python. Before moving on to finding the different methods to implement the task of converting bool to string in Python, let us first understand what a boolean and a string are. What is a string in Python? A string is the most […]