Python next() Function in Linux
This article covers how to use the next() function in Python. In fact, The next() function returns the next item in an iterator. You can add a default return value, to return if the iterable has reached to its end.
Python For Loops in Linux - Step by step guide ?
This article covers how to use the for loop in Python. In fact, Python loops help to iterate over a list, tuple, string, dictionary, and a set.
There are two types of loop supported in Python "for" and "while". The block of code is executed multiple times inside the loop until the condition fails.
Python range() function in Linux
This article covers how to use the range() function in Python via examples. In fact, The range() function is used to generate a sequence of numbers over time. At its simplest, it accepts an integer and returns a range object (a type of iterable). In Python 2, the range() returns a list which is not very efficient to handle large data.
Python ord() function in Linux
This article covers how to use the ord() function in Python. In fact, The ord() function (short of ordinal) returns an integer representing the character passed to it. For ASCII characters, the returned value is 7-bit ASCII code, and for Unicode characters, it refers to the Unicode code point.
Python divmod() function in Linux
This article covers how to use the divmod() function in Python. In fact, Python divmod() function is employed to return a tuple that contains the value of the quotient and therefore the remainder when dividend is divided by the divisor. It takes two parameters where the first one is the dividend and the second one is the divisor.
Python divmod() function Parameter Values:
- divident - This parameter contains the number you want to divide.
- divisor - This parameter contains the number you want to divide with.
Python abs() function in Linux
This article covers how to use Python abs() function. In fact, The Python abs() method calculates the absolute value of a number. The abs() method takes in one parameter: the number whose absolute value you want to calculate.