[python] How to convert a negative number to positive?

The inbuilt function abs() would do the trick.

positivenum = abs(negativenum)