>>> n = -42 >>> -n # if you know n is negative 42 >>> abs(n) # for any n 42 不要忘记查看 文档。 原文由 Roger Pate 发布,翻译遵循 CC BY-SA 2.5 许可协议
不要忘记查看 文档。