How to calculate the absolute value for an array in python?
for example: a = [5,-2,-6,5]
I want to know the max of abs(a), and the answer should be 6. Thank you!
max(abs(i) for i in [5, -2, -6, 5])
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments