2016-05-12から1日間の記事一覧

Pythonを学ぶ その5

テキストを生成する方法 text1 = 'hello python' text2 = '''hello world python''' print('hello' + 'world') print('hello + str(5)') 文字列にテキストや数字を埋め込む >>> 'hello {}{}'.format('python',5) 'hello python5' >>> 'hello {} {}'.format('…