def niceNum(num, precision=0):
    """Returns a string representation for a floating point number
    that is rounded to the given precision and displayed with
    commas and spaces."""
    return format(round(num, precision), ',.{}f'.format(precision))