u4_repair_2_1

This commit is contained in:
Martin Škovran 2026-10-05 22:34:25 +02:00
parent 584d9ac904
commit 3b0f7c6e68

View File

@ -15,7 +15,7 @@ def count_words(sentance: str) -> dict:
elif(ch in del_chars):
sent_list[i] = ""
if(ch == "'"):
if((sent_list[max(i-1, 0)] not in forbidden) and (sent_list[min(i+1, len(sent_list))] not in forbidden)):
if((sent_list[max(i-1, 0)] not in forbidden) and (sent_list[min(i+1, len(sent_list)-1)] not in forbidden)):
sent_list[i] = '^'
else:
sent_list[i] = ""