Author: Shubham Sayon
14 AprilHow to check if variable exists in Python
Introduction Objective: This article will discuss the different methods to check if a variable exists in Python. Before we dive into the methods to check for the availability of a variable in the code, let us first understand why we need to do so? 🤔 To answer the above question, you must understand “what is a NameError […]
13 AprilHow to Format Float to 2 Decimal Places in Python?
In this article you will learn - How to Format a Float With Two Decimal Places in Python?
11 AprilPython Remove Newline from List
🎯 Objective: In this article, we will discuss the methods to remove ‘\n’ or newline characters from a list. Introduction In a string, the ‘\n’ represents newline. But having them in your list can be a problem if you want to extract a given string from a list with no escape characters. This means, if […]
06 AprilHow to Print a Matrix in Python
In this article you will learn "How to print a matrix in Python?"
04 April[Fixed] TypeError: ‘<' not supported between instances of 'str' and 'int'
In this article you will learn about the causes and solutions of - TypeError: '<' not supported between instances of 'str' and 'int'
03 AprilSort String Alphabetically in Python
In this article you will learn:- How to sort a string alphabetically in Python?
30 MarchPython Split String by Comma
In this article you will learn how to split a string by comma as a separator.
27 March[Solved] ValueError: Math Domain error in Python
Introduction So, you sit down, grab a cup of coffee and start programming in Python. Then out of nowhere, this stupid python error shows up: ValueError: math domain error. 😞 Sometimes it may seem annoying, but once you take time to understand what Math domain error actually is, you will solve the problem without any […]
27 March[‘Fixed’] TypeError: ‘int’ object is not callable
Summary: TypeError: ‘xyz’ object is not callable is usually raised when you try to call a method with the same name as a variable in the code. To avoid this error, rename the variable and avoid using variables with names like built-in methods in Python. Have you come across TypeErrors as: If the above errors […]