Python | fsum() function Last Updated : 16 Feb, 2023 Summarize Comments Improve Suggest changes Share 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 | 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 Python Lambda Functions Python Lambda Functions are anonymous functions means that the function is without a name. As we already know the def keyword is used to define a normal function in Python. Similarly, the lambda keyword is used to define an anonymous function in Python. In the example, we defined a lambda function(u 6 min read round() function in Python Python round() function is a built-in function available with Python. It will return you a float number that will be rounded to the decimal places which are given as input. If the decimal places to be rounded are not specified, it is considered as 0, and it will round to the nearest integer. In this 6 min read Like