I am a complete novice when it comes to Python and i just want to know what abs does. I have tried looking at different pages for help, however i cannot understand the jargon.
Thanks, Louis.
>>> help(abs)
Help on built-in function abs in module __builtin__:
abs(...)
abs(number) -> number
Return the absolute value of the argument.
Also the documentation
If the number passed to the function is negative, it returns the positive. If it is positive, it returns it unchanged.
Think of it as removing the -
negative sign.
>>> abs(2)
2
>>> abs(-2)
2
>>>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments