Format A Number With Commas In Python

December 2022
raw_num = 987654321
formatted = f"{raw_num:,}"
print(formatted)
Output:
987,654,321
end of line