In this quick python tutorial, we will learn how to create one list from one set or dictionary. A set can keep only unique elements and dictionary holds key-value pairs.
ReadFind out the difference between two dates in days using python. For example, if the first date is 2-2-2020 and the second date is 2-3-2020 in day-month-year format, this should print 29 days as the output.
Readlgamma function is defined in python math module. It is used to find the natural logarithm of the absolute value of the gamma function for an argument. This function is available for python 3.2 and above.
ReadCompound interest is an interest calculation process that calculates the interest based on the initial principal and accumulated interests on a compounding period. Interest is added to the principal and for the next period, interest is gained on the accumulated interest.
ReadCombination is the selection of set of elements from a collection, without regard to the order. For example, for the numbers 1,2,3, we can have three combinations if we select two numbers for each combination
ReadPython provides one utility method to find out the permutation of a iterable. This method is defined in itertool package. We can import this package and find out the permutation of any iterable like a dictionary, set or list elements.
ReadPython os module provides us listdir function to list all files in a directory or folder. We need to pass the directory path to this function and it returns us the name of all entries in that folder. This function is defined as below :.
ReadIf you know how to create python class and objects, you must have seen init method before. For the first comers, this looks different than other methods and classes. In this blog post, I will explain to you what is init and when/how to use it with different examples. Go through the tutorial and drop a comment below if you have any queries.
ReadPython program to find the area and perimeter of a rectangle. This python program will take the values as inputs from the user and prints out the final results.
Read