format(x, ',f'): This formats the Decimal number with commas as thousand separators.
from decimal import Decimal x = Decimal("123456789.123456") formatted_x = format(x, ',f').replace(',', '') print(formatted_x)