In Python and generally speaking, the modulo (or modulus) is referred to the remainder from the division of the first argument to the second.Demos and Full Guide
In this tutorial, I will show you examples of getting the factorial by both ways: Using the math module’s factorial function and writing a custom function for getting the factorial.Demos and Full Guide
The abs() function returns the absolute value of the given number in Python. The abs() function takes an argument which is the number that you want to get the absolute value.Demos and Full Guide
The timedelta is the class in datetime module that represents duration. The delta means average of difference and so the duration expresses the difference between two date, datetime or time instances.Demos and Full Guide
As the name suggests (str f time), Python strftime() function returns the string representation of the date. The strftime() takes an argument where you may specify the format of date to be returned.Demos and Full Guide
In Python, you may convert a date to string that is in easy readable format to the users by different ways. Being able to format date by string conversion is important as the default way ofDemos and Full Guide
In this tutorial, you are going to learn how to get current date and time by now() function of Python datetime() module.Demos and Full Guide
In this tutorial, I am specifically explaining how to write content to a text file using Python. Without importing any module, you may use the open() function and depending on the requirementDemos and Full Guide
In this tutorial, I will explain how to perform certain operation on text files using Python built-in functions. The examples in the coming section shows opening a text file, reading,Demos and Full Guide
This is how reduce function works: It will apply the given function of two arguments to the items of iterable e.g. a list, cumulatively.
The items of sequence are entertained from left to right and the function will “reduce” the sequence to a single value.
In this tutorial, four different ways are described with example code for how to check if a file exists or not. These methods include:Demos and Full Guide
Python supports a number of ways for removing the file or directories from the specified path. Each of these ways is described below which is followed by examples.Demos and Full Guide
The index function searches a list and returns the position of first matched item in the specified list. – The index starts at zeroDemos and Full Guide
The zip function returns an iterator of tuples that aggregates elements from each of the given iterables. For example:Demos and Full Guide
The Python float function converts a given value into float. The float function takes an argument that can be a number or string with decimal point.Demos and Full Guide