Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1#!/usr/bin/env python3
2
3"""Solution to chapter 7, exercise 28: comma_range"""
4
5
6def join_numbers(numbers):
7 """Takes an iterable of numbers as input.
8Output is a string containing the numbers in that iterable,
9separated by commas.
10"""
11 return ','.join(str(number)
12 for number in numbers)