Python‎ > ‎decimal‎ > ‎

Decimal.rotate()


Definition
Return the result of rotating the digits of the 
first operand by an amount specified by the second operand.

Syntax
Decimal(x).rotate(y, context=None) 

Parameters
x=Decimal
y=Integer

Examples
The returns is:
 >>> Decimal(1.00).rotate(1)
Decimal('10')
>>> Decimal(1.0000).rotate(3)
Decimal('1000')
>>> Decimal(1.0000).rotate(1)
Decimal('10')
>>> 

Comments