【Python】文字列のフォーマット
python
str.format()
str.format(**mapping)
str.format_map(mapping) // dictのサブクラスの時に利用https://docs.python.org/ja/3/library/stdtypes.html#str.format
tsx
dict = {
'dictTitle': "xxx"
}
html = """<title>{title}</title>
"""
print(html.format(title=dict["dictTitle"]))tsx
dict = {
'title': "xxx"
}
html = """<title>{title}</title>
"""
print(html.format_map(dict))