Python - Formatted String Literals: Make Charts from Data - string concatenation
Head First Python: A Learner’s Guide to the Fundamentals of Python Programming, A Brain-Friendly Guide、 Paul Barry(著)、 O’Reilly Mediaの Chapter 5.(Formatted String Literals: Make Charts from Data)、EXERCISE(24/102)の解答を求めてみる。
Jupyter(コード、入出力結果)
Charts.ipynb
html = ('<!doctype html>'
'<html>'
'<head>'
f'<title>{title}</title>'
'</head>'
'<body>'
f'<h3>{title}</h3>'
'</body>'
'</html>'
)
html
'<!doctype html><html><head><title>Darius (Under 13) 100m stroke</title></head><body><h3>Darius (Under 13) 100m stroke</h3></body></html>'