This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def number_groupings(number): | |
"""Given an integer, return a string representation of that integer | |
with ',' at the appropriate groupings to indicate thousands places. | |
>>> number_groupings(1234) | |
'1,234' | |
>>> number_groupings(12345678) | |
'12,345,678' |