Posts from Python

How to remove comma from a string in Python

By Jyothi Agarwal

In this tutorial, we will learn how to remove comma (‘,’) from a string in Python language. Let’s consider the string “c,ode,spe,edy.com“. Now we can .... Read More

Python List and Basic Python Set method

By Snehil

When we talk of different types of collection Python list is most important which can be written as a list of values items between square brackets well separated by commas. An inte.... Read More

Check If A Number Is A Harshad Number or Not in Python

By Svarnim Agarwal

In this tutorial, we will be looking at a program in Python that will check if a number is a harshad number or not. We will be using the following Python concepts: Python if….... Read More

Print Numbers In A Range Without Loops In Python

By Svarnim Agarwal

In this tutorial, we will be looking at a Python program to print numbers in a range without loops. Yes, without any loops! We will be using the following Python concepts: if….... Read More

How to instantiate exceptions in Python

By SNEHA S

In this following tutorial, let us look at how to instantiate an exception that is generated using Python. Many times, even when a statement is syntactically correct, it might caus.... Read More

Program to illustrate scatter in terms of tuple in Python

By SNEHA S

So, in this article, we will see Python functions that can take up variable length arguments. In many cases, we will have to deal with variable number of arguments depending upon t.... Read More

Sides of right angled triangle from given area and hypotenuse in Python

By Abinash Reddy

In this article, we will learn how to find all the sides of a right-angled triangle from a given area and hypotenuse in Python. Examples Input: hypotenuse = 10, area = 24 Output: B.... Read More

Program to store a sparse matrix as a dictionary in Python

By SNEHA S

In this tutorial, we will learn how to store sparse matrix in an efficient way by using dictionary in Python. Many times we come across situations, where the memory is wasted for s.... Read More