format
辞書
hoge = {'a': 'aa', 'b': 'bb'}
print('a is {a}\nb is {b}'.format(**hoge))
a is aa
b is bb
### 左寄せ、中央寄せ、右寄せ
```python
hoge = {'a': 'left', 'b': 'center', 'c': 'right'}
print('left : {a:<10}'.format(**hoge))
print('center: {b:^10}'.format(**hoge))
print('right : {c:>10}'.format(**hoge))
left : left
center: center
right : right
### 左寄せ、中央寄せ、右寄せ(0埋め)
```python
hoge = {'a': 'left', 'b': 'center', 'c': 'right'}
print('left : {a:<010}'.format(**hoge))
print('center: {b:^010}'.format(**hoge))
print('right : {c:>010}'.format(**hoge))
left : left000000
center: 00center00
right : 00000right
### 左寄せ、中央寄せ、右寄せ(文字埋め)
```python
hoge = {'a': 'left', 'b': 'center', 'c': 'right'}
print('left : {a:_<10}'.format(**hoge))
print('center: {b:_^10}'.format(**hoge))
print('right : {c:_>10}'.format(**hoge))
left : left______
center: center
right : _____right
### 桁区切り、小数点
```python
print('{:,}'.format(1234.5678))
print('{:,.1f}'.format(1234.5678))
print('{:,.2f}'.format(1234.5678))
print('{:,.3f}'.format(1234.5678))
print('{:,.4f}'.format(1234.5678))
print('{:,.5f}'.format(1234.5678))
1,234.5678
1,234.6
1,234.57
1,234.568
1,234.5678
1,234.56780
## f文字列
```python
a = 'aa'
b = 'bb'
print(f'a is {a}\nb is {b}')
a is aa
b is bb