3 ms·
Basic formatting Old: '%d %d' % (1, 2) New: '{} {}'.format(1, 2) It should rather be `{:d} {:d}'.format(1, 2)` but even that isn't strictly equivalent
by jkbr 11y ago
Basic formatting
Old: '%d %d' % (1, 2)
New: '{} {}'.format(1, 2)
It should rather be `{:d} {:d}'.format(1, 2)` but even that isn't strictly equivalent (try both styles with a float or a Decimal).