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