In this tutorial, we will learn how to find the sum of all the values of a dictionary in python.
ReadIn this example program, we will learn how to sort elements of one list by using elements of a different list.
ReadTo check if a year is a leap year or not, we need to check if it is divisible by 4 or not. A year is a leap year if it is divisible by 4 and for century years if it also divisible by 400.
ReadIn this tutorial, we will write one python 3 program to find out the largest odd and even number in a list. The user will enter all the numbers to store in the list. Next, we will run one loop to find out the largest even and odd numbers. We will use one loop to read the numbers to the list. You can use one already populated list but we will take the numbers from the user here.
ReadThe 'index' method is used to find the index of the first occurrence of an item in a list. The syntax of 'index' method is as below :.
ReadIn this tutorial, we will learn how to find the union of two lists using set in Python 3. To find the union of two lists, we don't have any built-in methods. We are going to use 'set' to find the union.
ReadIn this tutorial, we will learn how to print a triangle using star (* ). You can change it to any other characters if you want. Printing a symbol works the same for any programming language. You can use the same logic on any other programming language like Java, R, C, C++ etc. to get the same output.
ReadThe syntax of zip() function is 'zip(*iterables)' that means it will take multiple iterables as inputs. It makes an iterator aggregating elements from each of the iterable.
ReadPython examples to print an inverted right-angled triangle in 4 different ways. Learn to print number triangles or character triangles with examples in this post.
Read4 Different ways to print the even numbers in a given range. We will use a for loop, while loop, jump in between the numbers with a while loop and how to use the range function.
Read