def add_div(filename, caption):
test = str(filename)
return ('<div><img src=' + test + '><br><p>' + caption + '</p></div>')
def add_body(image_dict, s, order = None):
'''(dict of {str:list of str}, str, list) -> str
If the third parameter is passed, then the filenames
included in the body should only be those in the list and should be added
in the same order as they are listed in the list. '''
new = ''
s = '<html><head></head>'
while order is None:
for (key, value) in image_dict.items():
new += add_div(str(key), str(value[2]))
return (s + '<body><div id="slideshow">' + new + '</body>'+ '</html>')
出力は次のようになります。 文字列内の引用符を置く
私は言葉画像/ skater.jpgを囲む引用符を得るのですか?
これはあなたがこのように連結されていることを文字列に引用符を含めることができるファイルは
私が入力している間、あなたはエスケープで私を打ち負かしました... –