The built-in max takes a key function, you can pass that as abs:

>>> max([3, 7, -10], key=abs)
-10

You can call abs again on the result to normalise the result:

>>> abs(max([3, 7, -10], key=abs))
10
Answer from Moses Koledoye on Stack Overflow
🌐
Profound Academy
profound.academy › python-introduction › min-max-abs-DZ25fuVqi5ass7kZdK1v
min max abs - Introduction to Python
November 1, 2024 - When dealing with computations, in many cases it’s required to compute min or max values among several values. To help with those operations python provides built-in functions min(), max(), and abs() to compute the minimum, maximum, and the absolute value correspondingly.
🌐
Blender Artists
blenderartists.org › coding › python support
lowest absolute value - Python Support - Blender Artists Community
January 2, 2017 - I tried x = min(abs(a), abs(b), abs(c), abs(d)) the problem is this way I lose the pos/neg sign So, I ended up doing this: if abs(a) <= abs(b): x = a if abs(a) <= abs(c): x = a if abs(a) <= abs(d): x = a else: x = d else: x = c else: x = b if ...
🌐
alpharithms
alpharithms.com › home › articles › programming › python abs(): the absolute value built-in function
Python abs(): The Absolute Value Built-in Function - αlphαrithms
June 16, 2022 - The Python abs() function is part of the standard built-in functions and provides a utility to calculate an absolute value. This function can be used to convert static values to their absolute value as well as dynamic values. In this article, I’ll cover the basic syntax used for Python’s absolute value function, how to use […]
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › minimum-absolute-value-of-k-arri-for-all-possible-values-of-k-over-the-range-0-n-1
Minimum absolute value of (K – arr[i]) for all possible values of K over the range [0, N – 1] - GeeksforGeeks
July 23, 2025 - # Python program for the above approach # Function to find the minimum absolute # value of (K - arr[i]) for each possible # value of K over the range [0, N - 1]| def minimumDistance(arr, N): ind = 0; prev = arr[ind]; s = len(arr); # Traverse ...
🌐
PyQuestHub
pyquesthub.com › understanding-basic-math-operations-in-python-with-abs-min-and-max-functions
Basic Math Operations in Python: Using abs, min, and max Functions
November 21, 2024 - Using the abs function: The abs() function takes a number as input and returns its absolute value. In the example, we assign the value -10 to the variable negative_number, and calling abs(negative_number) gives us 10. Using the min function: The min() function is used to find the smallest number from a list of numbers...
🌐
Real Python
realpython.com › python-absolute-value
How to Find an Absolute Value in Python – Real Python
June 4, 2025 - In this case, you take a squared number to the power of one-half (0.5) or one over two (½), which is the same as calculating the square root. Note that both Python implementations based on the algebraic definition suffer from a slight deficiency: ... >>> def absolute_value(x): ...
Find elsewhere
🌐
Programiz
programiz.com › python-programming › methods › built-in › abs
Python abs()
Become a certified Python programmer. Try Programiz PRO! ... The abs() function returns the absolute value of the given number.
🌐
W3Schools
w3schools.com › python › ref_func_abs.asp
Python abs() Function
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate Python Training ... The abs() function returns the absolute value of the specified number.
🌐
TradingCode
tradingcode.net › python › math › rare-absolute
Absolute values of uncommon Python values • TradingCode
When we use Python’s abs() function, we often work with integers and floating-point value. But abs() has a less-known feature: it can also work with uncommon values. Let’s have a look. In Python, we get the absolute value of numbers with the abs() function.
🌐
Dfrieds
dfrieds.com › python › minimum-absolute-difference.html
Minimum Absolute Difference (via Leetcode) - dan_friedman_learnings
# if absolute difference of pair is equal to min_absolute_difference: # append pair as list to min_pairs_list # else if absolute difference pair is less than min_absolute_difference: # reassign min_absolute_difference to be new absolute difference of pair # if min_pairs_list is empty: # append pair as list to min_pairs_list # else: # we don't want to keep old pairs in min_pairs_list that contain higher abs value among pairs...
🌐
Server Academy
serveracademy.com › blog › python-absolute-value-abs-tutorial
Python Absolute Value Abs() Tutorial - Server Academy
November 12, 2024 - For example, the absolute value ... normalization. In Python, the simplest way to calculate the absolute value is to use the abs() function....
🌐
LearnDataSci
learndatasci.com › solutions › python-absolute-value
Python Absolute Value – abs() for real and complex numbers – LearnDataSci
The sign of the number alludes to which direction along the line the number is; positive values are along the positive axis, and negative ones are along the negative axis. In the quick example shown in the introduction, -5 is a real number. In regards to Python, real numbers are numbers that are integers or floats. The following example demonstrates how we can apply the abs function to a list of integers: real_number_list = [-12, -6, 0, 4, 8] for number in real_number_list: absolute_value = abs(number) print(f'Number: {number}, Absolute Value: {absolute_value}')
🌐
Plain English
python.plainenglish.io › how-to-find-an-absolute-value-in-python-2ac8f90a34ea
How to Find an Absolute Value in Python | Python in Plain English
June 16, 2025 - Learn how to find absolute values in Python using the abs() function with easy examples, real-world use cases, and beginner-friendly tips.