Python | fsum() function Last Updated : 16 Feb, 2023 Comments Improve Suggest changes Like Article Like Report fsum() is inbuilt function in Python, used to find sum between some range or an iterable. To use this function we need to import the math library. Syntax : maths.fsum( iterable ) Parameter : iterable : Here we pass some value which is iterable like arrays, list. Use : fsum() is used to find the sum of some range, array , list. Return Type : The function return a floating point number. Time Complexity: O(n) where n is the size of the list. Auxiliary Space: O(1) Code demonstrating fsum() : Python3 # Python code to demonstrate use # of math.fsum() function # fsum() is found in math library import math # range(10) print(math.fsum(range(10))) # Integer list arr = [1, 4, 6] print(math.fsum(arr)) # Floating point list arr = [2.5, 2.4, 3.09] print(math.fsum(arr)) Output : 45.0 11.0 7.99 Comment More infoAdvertise with us Next Article Python | fsum() function K kundankumarjha Follow Improve Article Tags : Python Python-Functions python-list python-list-functions Practice Tags : pythonpython-functionspython-list Similar Reads Python | fmod() function fmod() function is one of the Standard math library function in Python, which is used to calculate the Module of the specified given arguments. Syntax: math.fmod( x, y ) Parameters: x any valid number (positive or negative). y any valid number(positive or negative). Returns: Return a floating point 2 min read Python Functions Python Functions is a block of statements that does a specific task. The idea is to put some commonly or repeatedly done task together and make a function so that instead of writing the same code again and again for different inputs, we can do the function calls to reuse code contained in it over an 9 min read Python | frexp() Function frexp() function is one of the Standard math Library function in Python. It returns mantissa and exponent as a pair (m, e) of a given value x, where mantissa m is a floating point number and e exponent is an integer value. m is a float and e is an integer such that x == m * 2**e exactly. If x is zer 2 min read sum() function in Python The sum of numbers in the list is required everywhere. Python provides an inbuilt function sum() which sums up the numbers in the list. Pythonarr = [1, 5, 2] print(sum(arr))Output8 Sum() Function in Python Syntax Syntax : sum(iterable, start) iterable : iterable can be anything list , tuples or dict 3 min read Numpy recarray.cumsum() function | Python In numpy, arrays may have a data-types containing fields, analogous to columns in a spreadsheet. An example is [(a, int), (b, float)], where each entry in the array is a pair of (int, float). Normally, these attributes are accessed using dictionary lookups such as arr['a'] and arr['b']. Record array 2 min read Like