Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python:使用.join连接枚举for循环中字符串列表中的项,并接收意外输出_Python_Scope - Fatal编程技术网

Python:使用.join连接枚举for循环中字符串列表中的项,并接收意外输出

Python:使用.join连接枚举for循环中字符串列表中的项,并接收意外输出,python,scope,Python,Scope,主要问题:我不明白为什么输出文件没有写1:6和1:23节。我想弄清楚这是为什么,以及如何解决它 我是python新手,不太明白是我的逻辑还是对python中的工作原理的误解让我误入歧途。我正在使用.join连接枚举for循环中字符串列表中的项,并接收意外的输出。具体来说,我使用python解析.txt文件。txt文件包含圣经中单词的数据。我希望新的output.txt能够阅读新的圣经经文和新行。问题是,我编写的python脚本完全跳过了测试数据输出的第6节和第23节。我怀疑这与我如何使用for循

主要问题:我不明白为什么输出文件没有写1:6和1:23节。我想弄清楚这是为什么,以及如何解决它

我是python新手,不太明白是我的逻辑还是对python中的工作原理的误解让我误入歧途。我正在使用.join连接枚举for循环中字符串列表中的项,并接收意外的输出。具体来说,我使用python解析.txt文件。txt文件包含圣经中单词的数据。我希望新的output.txt能够阅读新的圣经经文和新行。问题是,我编写的python脚本完全跳过了测试数据输出的第6节和第23节。我怀疑这与我如何使用for循环有关,而我不了解它在python中的工作原理。然而,也可能是我理解了,但犯了一个逻辑错误。这是我的密码。请注意调试语句、我在定义的函数中使用的.join以及这将如何影响我在外部for循环中解析的字符串(“我认为我的错误在哪里,但我可能错了”)

这是输出。主要的问题是v1:6和v1:23被完全跳过了。我想知道这是为什么,以及如何解决它

这是输出文件。我把它浓缩了一点,然后用

    1:1(0)in~SUMMIT(1)2363(2)בְּרֵאשִׁית(3)bê'rey'shit(4)he~did~FATTEN(V)(5)232(6)בָּרָּא(7)ba'ra(8)Elohiym(9)POWER~s(10)אֱלֹהִׁים(11)e'lo'him(12)AT(13)85(14)אֵת(15)eyt(16)the~SKY(17)2512~s2(18)הַשָּמַיִׁם(19)ha'sha'ma'yim(20)and~AT(21)85(22)וְּאֵת(23)wê'eyt(24)the~LAND(25)2331(26)הָּאָרֶץ(27)ha'a'rets(28)NumWordsInVerse(28)
    1:2(0)and~the~LAND(1)2331(2)וְּהָּאָרֶץ(3)wê'ha'a'rets(4)she~did~EXIST(V)(5)505(6)הָּיְּתָּה(7)hai'tah(8)CONFUSION(9)2623(10)תֹהוּ(11)to'hu(12)and~UNFILLED(13)106(14)וָּבֹהוּ(15)wa'vo'hu(16)and~DARKNESS(17)2439(18)וְּחֹשֶךְ(19)wê'hho'shekh(20)UPON(21)1616(22)עַל(23)al(24)FACE(25)1815~s(26)פְּנֵי(27)pê'ney(28)DEEP.SEA(29)522(30)תְּהוֹם(31)tê'hom(32)and~WIND(33)2251(34)וְּרוּחַַ(35)wê'ru'ahh(36)Elohiym(37)POWER~s(38)אֱלֹהִׁים(39)e'lo'him(40)much~FLUTTER(V)(41)787~ing(fs)(42)מְּרַחֶפֶת(43)mê'ra'hhe'phet(44)UPON(45)1616(46)עַל(47)al(48)FACE(49)1815~s(50)פְּנֵי(51)pê'ney(52)the~WATER(53)1162~s2(54)הַמָּיִׁם(55)ha'ma'yim(56)NumWordsInVerse(56)
    1:3(0)and~he~will~SAY(V)(1)1187(2)וַיֹאמֶר(3)wai'yo'mer(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)he~will~EXIST(V)(9)505(10)יְּהִׁי(11)yê'hi(12)LIGHT(13)73(14)אוֹר(15)or(16)and~he~will~EXIST(V)(17)505(18)וַיְּהִׁי(19)wai'hi(20)LIGHT(21)73(22)אוֹר(23)or(24)NumWordsInVerse(24)
    1:4(0)and~he~will~SEE(V)(1)2185(2)וַיַרְּא(3)wai'yar(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)AT(9)85(10)אֶת(11)et(12)the~LIGHT(13)73(14)הָּאוֹר(15)ha'or(16)GIVEN.THAT(17)940(18)כִׁי(19)ki(20)FUNCTIONAL(21)848(22)טוֹב(23)tov(24)and~he~will~make~SEPARATE(V)(25)100(26)וַיַבְּדֵל(27)wai'yav'deyl(28)Elohiym(29)POWER~s(30)אֱלֹהִׁים(31)e'lo'him(32)BETWEEN(33)193(34)בֵין(35)beyn(36)the~LIGHT(37)73(38)הָּאוֹר(39)ha'or(40)and~BETWEEN(41)193(42)וּבֵין(43)u'veyn(44)the~DARKNESS(45)2439(46)הַחֹשֶךְ(47)ha'hho'shekh(48)NumWordsInVerse(48)
    1:5(0)and~he~will~CALL.OUT(V)(1)2147(2)וַיִׁקְּרָּא(3)wai'yiq'ra(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)to~LIGHT(9)73(10)לָּאוֹר(11)la'or(12)DAY(13)898(14)יוֹם(15)yom(16)and~to~DARKNESS(17)2439(18)וְּלַחֹשֶךְ(19)wê'la'hho'shekh(20)he~did~CALL.OUT(V)(21)2147(22)קָּרָּא(23)qa'ra(24)NIGHT(25)1111(26)לָּיְּלָּה(27)lai'lah(28)and~he~will~EXIST(V)(29)505(30)וַיְּהִׁי(31)wai'hi(32)EVENING(33)2724(34)עֶרֶב(35)e'rev(36)and~he~will~EXIST(V)(37)505(38)וַיְּהִׁי(39)wai'hi(40)MORNING(41)1861(42)בֹקֶר(43)NumWordsInVerse(43)
    1:5(0)and~he~will~CALL.OUT(V)(1)2147(2)וַיִׁקְּרָּא(3)wai'yiq'ra(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)to~LIGHT(9)73(10)לָּאוֹר(11)la'or(12)DAY(13)898(14)יוֹם(15)yom(16)and~to~DARKNESS(17)2439(18)וְּלַחֹשֶךְ(19)wê'la'hho'shekh(20)he~did~CALL.OUT(V)(21)2147(22)קָּרָּא(23)qa'ra(24)NIGHT(25)1111(26)לָּיְּלָּה(27)lai'lah(28)and~he~will~EXIST(V)(29)505(30)וַיְּהִׁי(31)wai'hi(32)EVENING(33)2724(34)עֶרֶב(35)e'rev(36)and~he~will~EXIST(V)(37)505(38)וַיְּהִׁי(39)wai'hi(40)MORNING(41)1861(42)בֹקֶר(43)vo'qer(44)DAY(45)898(46)יוֹם(47)yom(48)UNIT(49)636(50)אֶחָּד(51)e'hhad(52)NumWordsInVerse(52)
    1:7(0)and~he~will~DO(V)(1)1686(2)וַיַעַשׂ(3)wai'ya'as(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)AT(9)85(10)אֶת(11)et(12)the~SHEET(13)2118(14)הָּרָּקִׁיעַַ(15)ha'ra'qi'a(16)and~he~will~make~SEPARATE(V)(17)100(18)וַיַבְּדֵל(19)wai'yav'deyl(20)BETWEEN(21)193(22)בֵין(23)beyn(24)the~WATER(25)1162~s2(26)הַמַיִׁם(27)ha'ma'yim(28)WHICH(29)2589(30)אֲשֶר(31)a'sher(32)from~UNDER(33)2627(34)מִׁתַחַת(35)mi'ta'hhat(36)to~SHEET(37)2118(38)לָּרָּקִׁיעַַ(39)la'ra'qi'a(40)and~BETWEEN(41)193(42)וּבֵין(43)u'veyn(44)the~WATER(45)1162~s2(46)הַמַיִׁם(47)ha'ma'yim(48)WHICH(49)2589(50)אֲשֶר(51)a'sher(52)from~UPON(53)1616(54)מֵעַל(55)mey'al(56)to~SHEET(57)2118(58)לָּרָּקִׁיעַַ(59)NumWordsInVerse(59)
    1:7(0)and~he~will~DO(V)(1)1686(2)וַיַעַשׂ(3)wai'ya'as(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)AT(9)85(10)אֶת(11)et(12)the~SHEET(13)2118(14)הָּרָּקִׁיעַַ(15)ha'ra'qi'a(16)and~he~will~make~SEPARATE(V)(17)100(18)וַיַבְּדֵל(19)wai'yav'deyl(20)BETWEEN(21)193(22)בֵין(23)beyn(24)the~WATER(25)1162~s2(26)הַמַיִׁם(27)ha'ma'yim(28)WHICH(29)2589(30)אֲשֶר(31)a'sher(32)from~UNDER(33)2627(34)מִׁתַחַת(35)mi'ta'hhat(36)to~SHEET(37)2118(38)לָּרָּקִׁיעַַ(39)la'ra'qi'a(40)and~BETWEEN(41)193(42)וּבֵין(43)u'veyn(44)the~WATER(45)1162~s2(46)הַמַיִׁם(47)ha'ma'yim(48)WHICH(49)2589(50)אֲשֶר(51)a'sher(52)from~UPON(53)1616(54)מֵעַל(55)mey'al(56)to~SHEET(57)2118(58)לָּרָּקִׁיעַַ(59)la'ra'qi'a(60)and~he~will~EXIST(V)(61)505(62)וַיְּהִׁי(63)wai'hi(64)SO(65)968(66)כֵן(67)kheyn2(68)NumWordsInVerse(68)
..............................
    1:19(0)and~he~will~EXIST(V)(1)505(2)וַיְּהִׁי(3)wai'hi(4)EVENING(5)2724(6)עֶרֶב(7)e'rev(8)and~he~will~EXIST(V)(9)505(10)וַיְּהִׁי(11)wai'hi(12)MORNING(13)1861(14)בֹקֶר(15)vo'qer(16)DAY(17)898(18)יוֹם(19)yom(20)FOURTH(21)2214(22)רְּבִׁיעִׁי(23)rê'vi'i(24)NumWordsInVerse(24)
    1:20(0)and~he~will~SAY(V)(1)1187(2)וַיֹאמֶר(3)wai'yo'mer(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)they(mp)~will~SWARM(V)(9)2341(10)יִׁשְּרְּצוּ(11)yish're'tsu(12)the~WATER(13)1162~s2(14)הַמַיִׁם(15)ha'ma'yim(16)SWARMER(17)2342(18)שֶרֶץ(19)she'rets(20)BEING(21)1902(22)נֶפֶש(23)ne'phesh(24)LIVING(25)667(26)חַיָּה(27)NumWordsInVerse(27)
    1:20(0)and~he~will~SAY(V)(1)1187(2)וַיֹאמֶר(3)wai'yo'mer(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)they(mp)~will~SWARM(V)(9)2341(10)יִׁשְּרְּצוּ(11)yish're'tsu(12)the~WATER(13)1162~s2(14)הַמַיִׁם(15)ha'ma'yim(16)SWARMER(17)2342(18)שֶרֶץ(19)she'rets(20)BEING(21)1902(22)נֶפֶש(23)ne'phesh(24)LIVING(25)667(26)חַיָּה(27)hhai'yah(28)and~FLYER(29)1701(30)וְּעוֹף(31)wê'oph(32)he~will~much~FLY(V)(33)1700(34)יְּעוֹפֵף(35)yê'o'pheyph(36)UPON(37)1616(38)עַל(39)al(40)the~LAND(41)2331(42)הָּאָרֶץ(43)NumWordsInVerse(43)
    1:21(0)and~he~will~FATTEN(V)(1)232(2)וַיִׁבְּרָּא(3)wai'yiv'ra(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)AT(9)85(10)אֶת(11)et(12)the~CROCODILE(13)2654~s(14)הַתַנִׁינִׁם(15)ha'ta'ni'nim1(16)the~GREAT(17)292~s(18)הַגְּדֹלִׁים(19)ha'ge'do'lim(20)and~AT(21)85(22)וְּאֵת(23)wê'eyt(24)ALL(25)957(26)כָּל(27)kol(28)BEING(29)1902(30)נֶפֶש(31)ne'phesh(32)the~LIVING(33)667(34)הַחַיָּה(35)ha'hha'yah(36)the~TREAD(V)(37)2312~ing(fs)(38)הָּרֹמֶשֶׂת(39)ha'ro'me'set(40)WHICH(41)2589(42)אֲשֶר(43)a'sher(44)they(mp)~did~SWARM(V)(45)2341(46)שָּרְּצוּ(47)shar'tsu(48)the~WATER(49)1162~s2(50)הַמַיִׁם(51)ha'ma'yim(52)to~KIND(53)1216~them(mp)(54)לְּמִׁינֵהֶם(55)NumWordsInVerse(55)
    1:21(0)and~he~will~FATTEN(V)(1)232(2)וַיִׁבְּרָּא(3)wai'yiv'ra(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)AT(9)85(10)אֶת(11)et(12)the~CROCODILE(13)2654~s(14)הַתַנִׁינִׁם(15)ha'ta'ni'nim1(16)the~GREAT(17)292~s(18)הַגְּדֹלִׁים(19)ha'ge'do'lim(20)and~AT(21)85(22)וְּאֵת(23)wê'eyt(24)ALL(25)957(26)כָּל(27)kol(28)BEING(29)1902(30)נֶפֶש(31)ne'phesh(32)the~LIVING(33)667(34)הַחַיָּה(35)ha'hha'yah(36)the~TREAD(V)(37)2312~ing(fs)(38)הָּרֹמֶשֶׂת(39)ha'ro'me'set(40)WHICH(41)2589(42)אֲשֶר(43)a'sher(44)they(mp)~did~SWARM(V)(45)2341(46)שָּרְּצוּ(47)shar'tsu(48)the~WATER(49)1162~s2(50)הַמַיִׁם(51)ha'ma'yim(52)to~KIND(53)1216~them(mp)(54)לְּמִׁינֵהֶם(55)lê'mi'ney'hem(56)and~AT(57)85(58)וְּאֵת(59)wê'eyt(60)ALL(61)957(62)כָּל(63)kol(64)FLYER(65)1701(66)עוֹף(67)oph(68)WING(69)984(70)כָּנָּף(71)ka'naph(72)to~KIND(73)1216~him(74)לְּמִׁינֵהוּ(75)lê'mi'ney'hu(76)and~he~will~SEE(V)(77)2185(78)וַיַרְּא(79)wai'yar(80)Elohiym(81)POWER~s(82)אֱלֹהִׁים(83)e'lo'him(84)GIVEN.THAT(85)940(86)כִׁי(87)ki(88)FUNCTIONAL(89)848(90)טוֹב(91)tov(92)NumWordsInVerse(92)
    1:22(0)and~he~will~much~KNEEL(V)(1)236(2)וַיְּבָּרֶךְ(3)wai'va'rekh(4)AT(5)85~them(mp)(6)אֹתָּם(7)o'tam(8)Elohiym(9)POWER~s(10)אֱלֹהִׁים(11)e'lo'him(12)to~>~SAY(V)(13)1187(14)לֵאמֹר(15)ley'mor(16)!(mp)~REPRODUCE(V)(17)1858(18)פְּרוּ(19)pê'ru(20)and~!(mp)~INCREASE(V)(21)2197(22)וּרְּבוּ(23)ur'vu(24)and~!(mp)~FILL(V)(25)1192(26)וּמִׁלְּאוּ(27)u'mil'u(28)AT(29)85(30)אֶת(31)et(32)the~WATER(33)1162~s2(34)הַמַיִׁם(35)ha'ma'yim(36)in~the~SEA(37)895~s(38)בַיַמִׁים(39)ba'ya'mim(40)and~the~FLYER(41)1701(42)וְּהָּעוֹף(43)wê'ha'oph(44)he~did~INCREASE(V)(45)2197(46)יִׁרֶב(47)yi'rev(48)in~the~LAND(49)2331(50)בָּאָרֶץ(51)ba'a'rets(52)NumWordsInVerse(52)
    1:24(0)and~he~will~SAY(V)(1)1187(2)וַיֹאמֶר(3)wai'yo'mer(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)she~will~make~GO.OUT(V)(9)1922(10)תוֹצֵא(11)to'tsey(12)the~LAND(13)2331(14)הָּאָרֶץ(15)ha'a'rets(16)BEING(17)1902(18)נֶפֶש(19)ne'phesh(20)LIVING(21)667(22)חַיָּה(23)hhai'yah(24)to~KIND(25)1216~her(26)לְּמִׁינָּהּ(27)NumWordsInVerse(27)
    1:24(0)and~he~will~SAY(V)(1)1187(2)וַיֹאמֶר(3)wai'yo'mer(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)she~will~make~GO.OUT(V)(9)1922(10)תוֹצֵא(11)to'tsey(12)the~LAND(13)2331(14)הָּאָרֶץ(15)ha'a'rets(16)BEING(17)1902(18)נֶפֶש(19)ne'phesh(20)LIVING(21)667(22)חַיָּה(23)hhai'yah(24)to~KIND(25)1216~her(26)לְּמִׁינָּהּ(27)lê'mi'nah(28)BEAST(29)178(30)בְּהֵמָּה(31)bê'hey'mah(32)and~TREADER(33)2313(34)וָּרֶמֶשׂ(35)wa're'mes(36)and~LIVING(37)667~him(38)וְּחַיְּתוַֹ(39)wê'hhai'to2(40)LAND(41)2331(42)אֶרֶץ(43)e'rets(44)to~KIND(45)1216~her(46)לְּמִׁינָּהּ(47)lê'mi'nah(48)and~he~will~EXIST(V)(49)505(50)וַיְּהִׁי(51)wai'hi(52)SO(53)968(54)כֵן(55)kheyn3(56)NumWordsInVerse(56)
    1:25(0)and~he~will~DO(V)(1)1686(2)וַיַעַשׂ(3)wai'ya'as(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)AT(9)85(10)אֶת(11)et(12)LIVING(13)667(14)חַיַת(15)hhai'yat(16)the~LAND(17)2331(18)הָּאָרֶץ(19)ha'a'rets(20)to~KIND(21)1216~her(22)לְּמִׁינָּהּ(23)lê'mi'nah(24)and~AT(25)85(26)וְּאֶת(27)wê'et(28)the~BEAST(29)178(30)הַבְּהֵמָּה(31)ha'be'hey'mah(32)to~KIND(33)1216~her(34)לְּמִׁינָּהּ(35)lê'mi'nah(36)and~AT(37)85(38)וְּאֵת(39)wê'eyt(40)ALL(41)957(42)כָּל(43)kol(44)TREADER(45)2313(46)רֶמֶשׂ(47)re'mes(48)the~GROUND(49)425(50)הָּאֲדָּמָּה(51)ha'a'da'mah(52)to~KIND(53)1216~him(54)לְּמִׁינֵהוּ(55)lê'mi'ney'hu(56)and~he~will~SEE(V)(57)2185(58)וַיַרְּא(59)wai'yar(60)Elohiym(61)POWER~s(62)אֱלֹהִׁים(63)e'lo'him(64)GIVEN.THAT(65)940(66)כִׁי(67)ki(68)FUNCTIONAL(69)848(70)טוֹב(71)tov(72)NumWordsInVerse(72)
    1:26(0)and~he~will~SAY(V)(1)1187(2)וַיֹאמֶר(3)wai'yo'mer(4)Elohiym(5)POWER~s(6)אֱלֹהִׁים(7)e'lo'him(8)we(cp)~will~DO(V)(9)1686(10)נַעֲשֶׂה(11)na'a'seh(12)HUMAN(13)424(14)אָדָּם(15)a'dam(16)in~IMAGE(17)1971~us(cp)(18)בְּצַלְּמֵנוּ(19)bê'tsal'mey'nu(20)like~LIKENESS(21)431~us(cp)(22)כִׁדְּמוּתֵנוּ(23)kid'mu'tey'nu(24)and~he~did~RULE(V)(25)2235(26)וְּיִׁרְּדוּ(27)wê'yir'du(28)in~FISH(29)395(30)בִׁדְּגַת(31)vid'gat(32)the~SEA(33)895(34)הַיָּם(35)hai'yam(36)and~in~FLYER(37)1701(38)וּבְּעוֹף(39)uv'oph(40)the~SKY(41)2512~s2(42)הַשָּמַיִׁם(43)ha'sha'ma'yim(44)and~in~the~BEAST(45)178(46)וּבַבְּהֵמָּה(47)u'va'be'hey'mah(48)and~in~ALL(49)957(50)וּבְּכָּל(51)NumWordsInVerse(51)
这是我的终端输出调试数据,以防万一

    1:1  in~SUMMIT(0)

1:2  and~the~LAND(1)

or[nextGlitch][index:2]
1:3  and~he~will~SAY(V)(2)

1:4  and~he~will~SEE(V)(3)

yom[nextGlitch][index:4]
1:5  and~he~will~CALL.OUT(V)(4)

vo'qer[curGlitch][index:5]
1:5  and~he~will~CALL.OUT(V)(5)

u'veyn[nextGlitch][index:6]
1:7  and~he~will~DO(V)(6)

la'ra'qi'a[curGlitch][index:7]
1:7  and~he~will~DO(V)(7)

wai'hi[curGlitch][index:8]
1:8  and~he~will~CALL.OUT(V)(8)

yi'qaw'u[cur&nextGlitch][index:9]
1:9  and~he~will~SAY(V)(9)

lai'ya'ba'shah[nextGlitch][index:10]
1:10  and~he~will~CALL.OUT(V)(10)

e'lo'him[cur&nextGlitch][index:11]
2[nextGlitch][index:11]
Bad Data
3[cur&nextGlitch][index:12]
©[nextGlitch][index:12]
Bad Data
tad'shey[nextGlitch][index:13]
1:11  and~he~will~SAY(V)(13)

maz'ri'a[cur&nextGlitch][index:14]
1:11  and~he~will~SAY(V)(14)

lê'mi'ney'hu[nextGlitch][index:15]
1:12  and~she~will~make~GO.OUT(V)(15)

1:13  and~he~will~EXIST(V)(16)

u'veyn[nextGlitch][index:17]
1:14  and~he~will~SAY(V)(17)

wê'sha'nim[curGlitch][index:18]
1:14  and~he~will~SAY(V)(18)

ha'a'rets[curGlitch][index:19]
1:15  and~they(cp)~did~EXIST(V)(19)

ha'ma'or[cur&nextGlitch][index:20]
1:16  and~he~will~DO(V)(20)

al[nextGlitch][index:21]
1:17  and~he~will~GIVE(V)(21)

e'lo'him[nextGlitch][index:22]
1:18  and~to~>~REGULATE(V)(22)

1[cur&nextGlitch][index:23]
3[nextGlitch][index:23]
Bad Data
4[cur&nextGlitch][index:24]
©[nextGlitch][index:24]
Bad Data
1:19  and~he~will~EXIST(V)(25)

yish're'tsu[nextGlitch][index:26]
1:20  and~he~will~SAY(V)(26)

hhai'yah[cur&nextGlitch][index:27]
1:20  and~he~will~SAY(V)(27)

ne'phesh[nextGlitch][index:28]
1:21  and~he~will~FATTEN(V)(28)

lê'mi'ney'hem[curGlitch][index:29]
1:21  and~he~will~FATTEN(V)(29)

ba'ya'mim[curGlitch][index:30]
1:22  and~he~will~much~KNEEL(V)(30)

to'tsey[nextGlitch][index:31]
1:24  and~he~will~SAY(V)(31)

lê'mi'nah[curGlitch][index:32]
1:24  and~he~will~SAY(V)(32)

ha'be'hey'mah[curGlitch][index:33]
1:25  and~he~will~DO(V)(33)

uv'oph[cur&nextGlitch][index:34]
1:26  and~he~will~SAY(V)(34)

ha'a'dam[nextGlitch][index:35]
1:27  and~he~will~FATTEN(V)(35)

1[cur&nextGlitch][index:36]
3[nextGlitch][index:36]
Bad Data
The[cur&nextGlitch][index:37]
he~did~FATTEN(V)[nextGlitch][index:37]
Bad Data
et[nextGlitch][index:38]
1:28  and~he~will~much~KNEEL(V)(38)

ur'du[cur&nextGlitch][index:39]
1:28  and~he~will~much~KNEEL(V)(39)

1:29  and~he~will~SAY(V)(40)

ro'meys[nextGlitch][index:41]
1:30  and~to~ALL(41)

lê'akh'lah[curGlitch][index:42]
1:30  and~to~ALL(42)

a'sher[cur&nextGlitch][index:43]
1:31  and~he~will~SEE(V)(43)

我从您的代码中猜测,您正在同时迭代和修改列表,这将给您带来意想不到的结果。使用两个列表,一个用于从文件读取的数据,另一个用于新数据。看看这个不相关的例子:

>>> l = range(10)
>>> l
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> for i in l:
...   print(i)
...   x = l.pop()
... 
0
1
2
3
4
我有几件事要补充:

使用
with
关键字打开和关闭文件(用于读取和写入):

行\u列表=无
使用open(“”)作为处理程序:#这将负责为您关闭文件
lines\u list=handler.read().splitlines()
知道何时使用括号,这是:

if ( (word_list[0].isdigit() < 8) and (':' not in word_list[0]) ) and concatenateNext_string_TF( index, lines_list):
if((word\u list[0].isdigit()<8)和(':'不在word\u list[0])和concatenateNext\u string\u TF(索引,行\u列表):
同:

if word_list[0].isdigit() < 8 and ':' not in word_list[0] and concatenateNext_string_TF(index, lines_list):
如果word\u列表[0].isdigit()<8和“:”不在word\u列表[0]中,并且连接下一个字符串\u TF(索引,行\u列表):

不清楚您在问什么,部分原因是代码太多/等等。请尝试将问题归结为最简单的例子。见和。
lines_list = None
with open('<your_file>') as handler:  # this will take care of closing the file for you
    lines_list = handler.read().splitlines()
if ( (word_list[0].isdigit() < 8) and (':' not in word_list[0]) ) and concatenateNext_string_TF( index, lines_list):
if word_list[0].isdigit() < 8 and ':' not in word_list[0] and concatenateNext_string_TF(index, lines_list):