• 19 May

    Read CSV Line by Line in Python

    CSV files or comma-separated files are used to store tabular data in files. In this article, we will discuss how we can read a CSV file line by line in Python. Read CSV Line by Line Using the readline() Method in Python A CSV file is created using commas and newline characters. Each row in […]

  • 19 May

    Delete File if It Exists in Python

    Python provides us with various tools to perform file handling operations. In this article, we will discuss different ways to delete file if it exists in the file system using python. Delete File if Exists Using the os.remove() Method You can delete a file if exists using the remove() method defined in the os module. […]

  • 19 May

    Convert Bytes to Int in Python

    In this post, we will see how to convert Bytes to Int in Python. Normally, the data is stored in the storage in bytes format. In this article, we will discuss how we can convert data given as bytes to integer or int data types in python. For this, we will use the int.from_bytes() method. […]

  • 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

    Get Type of Object in C++

    C++ is an object-oriented language where we often interact with objects of different types. The object interaction becomes more interesting when we add runtime polymorphism to it. The runtime polymorphism, also known as, dynamic dispatch of methods, or method overriding means that a class can override the implementation of a method defined in the parent […]

  • 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? […]

  • Read file line by line in C++
    17 February

    Read File Line by Line in C++

    C++ is a multi-domain programming language. It is widely used in embedded systems, game development, operating systems, etc. Therefore, we often come around situations where we need to read input from a file. Files are a great way to store the data permanently on the hard disk which is otherwise lost if the program exits. […]