回答編集履歴
2
追記
answer
CHANGED
@@ -15,4 +15,16 @@
|
|
15
15
|
s = 'html文' + urls.get('href') + imgs.get('src') + str(titles.find("a")) + 'html文\n'
|
16
16
|
ss += s
|
17
17
|
ss += "後書きの終わりの文章"
|
18
|
+
```
|
19
|
+
|
20
|
+
パフォーマンス上有利な方法。
|
21
|
+
|
22
|
+
```python
|
23
|
+
lst = ["タイトル等の始めの文章"]
|
24
|
+
for urls,imgs,titles in zip(url,img,title):
|
25
|
+
s = 'html文' + urls.get('href') + imgs.get('src') + str(titles.find("a")) + 'html文'
|
26
|
+
lst.append(s)
|
27
|
+
lst.append("後書きの終わりの文章")
|
28
|
+
s = "\n".join(lst)
|
29
|
+
|
18
30
|
```
|
1
追記
answer
CHANGED
@@ -4,4 +4,15 @@
|
|
4
4
|
s = 'html文' + urls.get('href') + imgs.get('src') + str(titles.find("a")) + 'html文\n'
|
5
5
|
print(s)
|
6
6
|
print("後書きの終わりの文章")
|
7
|
+
```
|
8
|
+
|
9
|
+
#### コメントを受けて
|
10
|
+
これでいいんでしょうか。
|
11
|
+
|
12
|
+
```python
|
13
|
+
ss = "タイトル等の始めの文章\n"
|
14
|
+
for urls,imgs,titles in zip(url,img,title):
|
15
|
+
s = 'html文' + urls.get('href') + imgs.get('src') + str(titles.find("a")) + 'html文\n'
|
16
|
+
ss += s
|
17
|
+
ss += "後書きの終わりの文章"
|
7
18
|
```
|