4 ms·
You mean, '{} {}'.format('one', 'two') Your experience may vary, but in my experience, when I switched to .format(), I found a number of bugs in code that
by dietrichepp 11y ago
You mean,
'{} {}'.format('one', 'two')
Your experience may vary, but in my experience, when I switched to .format(), I found a number of bugs in code that used % instead. As mentioned, you can continue using %.
- teach 11y agoI had the same experience. I love love love printf() and it's ilk, so switching to something else (no matter how well designed) seemed asinine at first. But .format() has really started to grow on me and did uncover some subtle bugs in old code.