Skip to content

Instantly share code, notes, and snippets.

View lunareve's full-sized avatar

Connie lunareve

  • San Francisco Bay Area
View GitHub Profile
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'