Pythonic way to convert a list of integers into a string of comma-separated ranges,"print(','.join('-'.join(map(str, (g[0], g[-1])[:len(g)])) for g in G))"