import locale and print range on same line

Ramo raiwil at gmail.com
Sat Jan 23 06:57:30 EST 2016


This works also but I thought it was possible to do it easier:

import locale; locale.setlocale(locale.LC_ALL, ""); print('\n'.join(locale.format("%2f", i, 1) for i in range(1,20,4)))



More information about the Python-list mailing list