回答編集履歴
3
戻し切れていない部分を戻しました
answer
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
for j,txt2 in enumerate(splited):
|
15
15
|
if j != len(splited) -1 :
|
16
16
|
txt2 += "。" #splitで消えた「。」の補充
|
17
|
-
if txt2 == "。": #ここで"。"のみを無視
|
17
|
+
if txt2 == "" or txt2 == "。": #ここで"。"のみを無視
|
18
18
|
pass
|
19
19
|
else:
|
20
20
|
comment2 += [txt2]
|
2
変更点をもとに戻しました
answer
CHANGED
@@ -12,7 +12,8 @@
|
|
12
12
|
for i,txt in enumerate(comment):
|
13
13
|
splited = txt.split("。")
|
14
14
|
for j,txt2 in enumerate(splited):
|
15
|
+
if j != len(splited) -1 :
|
15
|
-
|
16
|
+
txt2 += "。" #splitで消えた「。」の補充
|
16
17
|
if txt2 == "。": #ここで"。"のみを無視
|
17
18
|
pass
|
18
19
|
else:
|
1
プログラムを若干効率化しました
answer
CHANGED
@@ -12,9 +12,8 @@
|
|
12
12
|
for i,txt in enumerate(comment):
|
13
13
|
splited = txt.split("。")
|
14
14
|
for j,txt2 in enumerate(splited):
|
15
|
-
|
15
|
+
txt2 += "。" #splitで消えた「。」の補充
|
16
|
-
txt2 += "。"
|
17
|
-
if txt2 == "
|
16
|
+
if txt2 == "。": #ここで"。"のみを無視
|
18
17
|
pass
|
19
18
|
else:
|
20
19
|
comment2 += [txt2]
|