2017-10-24から1日間の記事一覧
概要 python 3.6 で追加されたフォーマット済み文字列リテラル、通称 f-strings の書式について。 よく忘れるのでメモ。 内容 普通に内容表示 word = 'world' f'hello {word}' 'hello world' 文字列長指定(デフォルト) word = 'helloworld' f'{word:20}' 'h…
概要 python 3.6 で追加されたフォーマット済み文字列リテラル、通称 f-strings の書式について。 よく忘れるのでメモ。 内容 普通に内容表示 word = 'world' f'hello {word}' 'hello world' 文字列長指定(デフォルト) word = 'helloworld' f'{word:20}' 'h…