ブログい¥記事はこちら:python3での文字列フォーマットの方法まとめ なかなか覚えられなくて、辛かったのでメモしてまとめることにした。記憶への定着が少しでもまともになることを祈って。。 古いやり方(まだ使われてるけど) 'This is our %s' % 'string' # This is our string print('we are learning %s %s' % ('Python', '3')) # we are learning Python 3 print('we are learning %(lang)s %(ver)s' % {'lang': 'Python', 'ver': '3'}) #we are learning Python 3 'This is our string {}'.format('in Python') '{} {} {}'.format(