[{"data":1,"prerenderedAt":3827},["ShallowReactive",2],{"content-/basics/lists/list_modifcation":3,"surround_/basics/lists/list_modifcation":3820},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"created_at":10,"updated_at":11,"authors":12,"body":14,"_type":3814,"_id":3815,"_source":3816,"_file":3817,"_stem":3818,"_extension":3819},"/basics/lists/list_modifcation","lists",false,"lt","Sąrašo elementų keitimas ir atnaujimas","Sąrašų apdorojimas pamoka","2024-07-30","2024-09-24",[13],"Vilius Paliokas",{"type":15,"children":16,"toc":3794},"root",[17,25,32,37,322,327,367,372,385,524,529,543,549,554,561,578,809,814,853,858,1053,1058,1064,1083,1339,1344,1350,1379,1698,1703,1726,1744,1750,1783,1788,1806,2127,2132,2171,2176,2321,2326,2340,2345,2350,2368,2605,2609,2648,2654,2660,2701,2707,2712,2717,2722,2776,2782,2787,2792,3024,3028,3234,3240,3245,3250,3329,3335,3340,3345,3365,3370,3388,3393,3531,3560,3566,3571,3575,3613,3618,3788],{"type":18,"tag":19,"props":20,"children":21},"element","p",{},[22],{"type":23,"value":24},"text","Gilinsimės į sąrašų manipuliavimo metodus. Mokysimės, kaip efektyviai pridėti, pašalinti ir keisti sąrašo elementus, gauti naują sąrašą transformuojant esantį.",{"type":18,"tag":26,"props":27,"children":29},"h2",{"id":28},"elemento-keitimas-naudojantis-indeksą",[30],{"type":23,"value":31},"Elemento keitimas naudojantis indeksą",{"type":18,"tag":19,"props":33,"children":34},{},[35],{"type":23,"value":36},"Kadangi žinome, kaip pasiekti bet kurį sąrašo elementą naudojantis indeksais, nesunkiai pakeisime ir pasirinktame indekse esantį elementą. Pirmiausiai nurodysime, kurį elementą norime keisti, o tada naudojantis lygybės ženklu priskirsime naują reikšmę:",{"type":18,"tag":38,"props":39,"children":44},"pre",{"className":40,"code":41,"language":42,"meta":43,"style":43},"language-python shiki shiki-themes catppuccin-latte material-theme-darker","customer_names = [\"Dwain\", \"Catarina\", \"Nelia\", \"Melita\", \"Tedd\"]\nprint(\"Before changing:\")\nprint(customer_names)\n\ncustomer_names[1] = \"Vilius\"\nprint(\"After changing\")\nprint(customer_names)\n","python","",[45],{"type":18,"tag":46,"props":47,"children":48},"code",{"__ignoreMap":43},[49,164,197,219,229,273,302],{"type":18,"tag":50,"props":51,"children":54},"span",{"class":52,"line":53},"line",1,[55,61,67,73,79,85,89,94,99,104,108,112,116,121,125,129,133,138,142,146,150,155,159],{"type":18,"tag":50,"props":56,"children":58},{"style":57},"--shiki-default:#4C4F69;--shiki-dark:#EEFFFF",[59],{"type":23,"value":60},"customer_names ",{"type":18,"tag":50,"props":62,"children":64},{"style":63},"--shiki-default:#179299;--shiki-dark:#89DDFF",[65],{"type":23,"value":66},"=",{"type":18,"tag":50,"props":68,"children":70},{"style":69},"--shiki-default:#7C7F93;--shiki-dark:#89DDFF",[71],{"type":23,"value":72}," [",{"type":18,"tag":50,"props":74,"children":76},{"style":75},"--shiki-default:#40A02B;--shiki-dark:#89DDFF",[77],{"type":23,"value":78},"\"",{"type":18,"tag":50,"props":80,"children":82},{"style":81},"--shiki-default:#40A02B;--shiki-dark:#C3E88D",[83],{"type":23,"value":84},"Dwain",{"type":18,"tag":50,"props":86,"children":87},{"style":75},[88],{"type":23,"value":78},{"type":18,"tag":50,"props":90,"children":91},{"style":69},[92],{"type":23,"value":93},",",{"type":18,"tag":50,"props":95,"children":96},{"style":75},[97],{"type":23,"value":98}," \"",{"type":18,"tag":50,"props":100,"children":101},{"style":81},[102],{"type":23,"value":103},"Catarina",{"type":18,"tag":50,"props":105,"children":106},{"style":75},[107],{"type":23,"value":78},{"type":18,"tag":50,"props":109,"children":110},{"style":69},[111],{"type":23,"value":93},{"type":18,"tag":50,"props":113,"children":114},{"style":75},[115],{"type":23,"value":98},{"type":18,"tag":50,"props":117,"children":118},{"style":81},[119],{"type":23,"value":120},"Nelia",{"type":18,"tag":50,"props":122,"children":123},{"style":75},[124],{"type":23,"value":78},{"type":18,"tag":50,"props":126,"children":127},{"style":69},[128],{"type":23,"value":93},{"type":18,"tag":50,"props":130,"children":131},{"style":75},[132],{"type":23,"value":98},{"type":18,"tag":50,"props":134,"children":135},{"style":81},[136],{"type":23,"value":137},"Melita",{"type":18,"tag":50,"props":139,"children":140},{"style":75},[141],{"type":23,"value":78},{"type":18,"tag":50,"props":143,"children":144},{"style":69},[145],{"type":23,"value":93},{"type":18,"tag":50,"props":147,"children":148},{"style":75},[149],{"type":23,"value":98},{"type":18,"tag":50,"props":151,"children":152},{"style":81},[153],{"type":23,"value":154},"Tedd",{"type":18,"tag":50,"props":156,"children":157},{"style":75},[158],{"type":23,"value":78},{"type":18,"tag":50,"props":160,"children":161},{"style":69},[162],{"type":23,"value":163},"]\n",{"type":18,"tag":50,"props":165,"children":167},{"class":52,"line":166},2,[168,174,179,183,188,192],{"type":18,"tag":50,"props":169,"children":171},{"style":170},"--shiki-default:#FE640B;--shiki-dark:#82AAFF;--shiki-default-font-style:italic;--shiki-dark-font-style:inherit",[172],{"type":23,"value":173},"print",{"type":18,"tag":50,"props":175,"children":176},{"style":69},[177],{"type":23,"value":178},"(",{"type":18,"tag":50,"props":180,"children":181},{"style":75},[182],{"type":23,"value":78},{"type":18,"tag":50,"props":184,"children":185},{"style":81},[186],{"type":23,"value":187},"Before changing:",{"type":18,"tag":50,"props":189,"children":190},{"style":75},[191],{"type":23,"value":78},{"type":18,"tag":50,"props":193,"children":194},{"style":69},[195],{"type":23,"value":196},")\n",{"type":18,"tag":50,"props":198,"children":200},{"class":52,"line":199},3,[201,205,209,215],{"type":18,"tag":50,"props":202,"children":203},{"style":170},[204],{"type":23,"value":173},{"type":18,"tag":50,"props":206,"children":207},{"style":69},[208],{"type":23,"value":178},{"type":18,"tag":50,"props":210,"children":212},{"style":211},"--shiki-default:#4C4F69;--shiki-dark:#82AAFF",[213],{"type":23,"value":214},"customer_names",{"type":18,"tag":50,"props":216,"children":217},{"style":69},[218],{"type":23,"value":196},{"type":18,"tag":50,"props":220,"children":222},{"class":52,"line":221},4,[223],{"type":18,"tag":50,"props":224,"children":226},{"emptyLinePlaceholder":225},true,[227],{"type":23,"value":228},"\n",{"type":18,"tag":50,"props":230,"children":232},{"class":52,"line":231},5,[233,238,243,249,254,259,263,268],{"type":18,"tag":50,"props":234,"children":236},{"style":235},"--shiki-default:#E64553;--shiki-dark:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark-font-style:inherit",[237],{"type":23,"value":214},{"type":18,"tag":50,"props":239,"children":240},{"style":69},[241],{"type":23,"value":242},"[",{"type":18,"tag":50,"props":244,"children":246},{"style":245},"--shiki-default:#FE640B;--shiki-dark:#F78C6C;--shiki-default-font-style:italic;--shiki-dark-font-style:inherit",[247],{"type":23,"value":248},"1",{"type":18,"tag":50,"props":250,"children":251},{"style":69},[252],{"type":23,"value":253},"]",{"type":18,"tag":50,"props":255,"children":256},{"style":63},[257],{"type":23,"value":258}," =",{"type":18,"tag":50,"props":260,"children":261},{"style":75},[262],{"type":23,"value":98},{"type":18,"tag":50,"props":264,"children":265},{"style":81},[266],{"type":23,"value":267},"Vilius",{"type":18,"tag":50,"props":269,"children":270},{"style":75},[271],{"type":23,"value":272},"\"\n",{"type":18,"tag":50,"props":274,"children":276},{"class":52,"line":275},6,[277,281,285,289,294,298],{"type":18,"tag":50,"props":278,"children":279},{"style":170},[280],{"type":23,"value":173},{"type":18,"tag":50,"props":282,"children":283},{"style":69},[284],{"type":23,"value":178},{"type":18,"tag":50,"props":286,"children":287},{"style":75},[288],{"type":23,"value":78},{"type":18,"tag":50,"props":290,"children":291},{"style":81},[292],{"type":23,"value":293},"After changing",{"type":18,"tag":50,"props":295,"children":296},{"style":75},[297],{"type":23,"value":78},{"type":18,"tag":50,"props":299,"children":300},{"style":69},[301],{"type":23,"value":196},{"type":18,"tag":50,"props":303,"children":305},{"class":52,"line":304},7,[306,310,314,318],{"type":18,"tag":50,"props":307,"children":308},{"style":170},[309],{"type":23,"value":173},{"type":18,"tag":50,"props":311,"children":312},{"style":69},[313],{"type":23,"value":178},{"type":18,"tag":50,"props":315,"children":316},{"style":211},[317],{"type":23,"value":214},{"type":18,"tag":50,"props":319,"children":320},{"style":69},[321],{"type":23,"value":196},{"type":18,"tag":19,"props":323,"children":324},{},[325],{"type":23,"value":326},"Įvykdžius šį kodą, matome tokį rezultatą konsoliniame lange:",{"type":18,"tag":38,"props":328,"children":331},{"className":329,"code":330,"language":23,"meta":43,"style":43},"language-text shiki shiki-themes catppuccin-latte material-theme-darker","Before changing:\n['Dwain', 'Catarina', 'Nelia', 'Melita', 'Tedd']\nAfter changing\n['Dwain', 'Vilius', 'Nelia', 'Melita', 'Tedd']\n",[332],{"type":18,"tag":46,"props":333,"children":334},{"__ignoreMap":43},[335,343,351,359],{"type":18,"tag":50,"props":336,"children":337},{"class":52,"line":53},[338],{"type":18,"tag":50,"props":339,"children":340},{},[341],{"type":23,"value":342},"Before changing:\n",{"type":18,"tag":50,"props":344,"children":345},{"class":52,"line":166},[346],{"type":18,"tag":50,"props":347,"children":348},{},[349],{"type":23,"value":350},"['Dwain', 'Catarina', 'Nelia', 'Melita', 'Tedd']\n",{"type":18,"tag":50,"props":352,"children":353},{"class":52,"line":199},[354],{"type":18,"tag":50,"props":355,"children":356},{},[357],{"type":23,"value":358},"After changing\n",{"type":18,"tag":50,"props":360,"children":361},{"class":52,"line":221},[362],{"type":18,"tag":50,"props":363,"children":364},{},[365],{"type":23,"value":366},"['Dwain', 'Vilius', 'Nelia', 'Melita', 'Tedd']\n",{"type":18,"tag":19,"props":368,"children":369},{},[370],{"type":23,"value":371},"Pakeitėme sąraše antrąjį elementą (indeksas 1) ir sąrašas pasikeitė. Taip galima pakeisti bet kurioje pozicijoje esantį elementą.",{"type":18,"tag":19,"props":373,"children":374},{},[375,377,383],{"type":23,"value":376},"Reiktų atkreipti dėmesį į kraštutinį atvejį (",{"type":18,"tag":378,"props":379,"children":380},"em",{},[381],{"type":23,"value":382},"angl. edge case",{"type":23,"value":384},"), kai bandomamas pakeisti elementas su indeksu, kuris mažesnis nei sąrašo dydis. Paimkime tą patį sąrašą ir pabandykime pakeisti elementą esantį inkdekse 10:",{"type":18,"tag":38,"props":386,"children":388},{"className":40,"code":387,"language":42,"meta":43,"style":43},"customer_names = [\"Dwain\", \"Catarina\", \"Nelia\", \"Melita\", \"Tedd\"]\ncustomer_names[10] = \"George\"\n",[389],{"type":18,"tag":46,"props":390,"children":391},{"__ignoreMap":43},[392,487],{"type":18,"tag":50,"props":393,"children":394},{"class":52,"line":53},[395,399,403,407,411,415,419,423,427,431,435,439,443,447,451,455,459,463,467,471,475,479,483],{"type":18,"tag":50,"props":396,"children":397},{"style":57},[398],{"type":23,"value":60},{"type":18,"tag":50,"props":400,"children":401},{"style":63},[402],{"type":23,"value":66},{"type":18,"tag":50,"props":404,"children":405},{"style":69},[406],{"type":23,"value":72},{"type":18,"tag":50,"props":408,"children":409},{"style":75},[410],{"type":23,"value":78},{"type":18,"tag":50,"props":412,"children":413},{"style":81},[414],{"type":23,"value":84},{"type":18,"tag":50,"props":416,"children":417},{"style":75},[418],{"type":23,"value":78},{"type":18,"tag":50,"props":420,"children":421},{"style":69},[422],{"type":23,"value":93},{"type":18,"tag":50,"props":424,"children":425},{"style":75},[426],{"type":23,"value":98},{"type":18,"tag":50,"props":428,"children":429},{"style":81},[430],{"type":23,"value":103},{"type":18,"tag":50,"props":432,"children":433},{"style":75},[434],{"type":23,"value":78},{"type":18,"tag":50,"props":436,"children":437},{"style":69},[438],{"type":23,"value":93},{"type":18,"tag":50,"props":440,"children":441},{"style":75},[442],{"type":23,"value":98},{"type":18,"tag":50,"props":444,"children":445},{"style":81},[446],{"type":23,"value":120},{"type":18,"tag":50,"props":448,"children":449},{"style":75},[450],{"type":23,"value":78},{"type":18,"tag":50,"props":452,"children":453},{"style":69},[454],{"type":23,"value":93},{"type":18,"tag":50,"props":456,"children":457},{"style":75},[458],{"type":23,"value":98},{"type":18,"tag":50,"props":460,"children":461},{"style":81},[462],{"type":23,"value":137},{"type":18,"tag":50,"props":464,"children":465},{"style":75},[466],{"type":23,"value":78},{"type":18,"tag":50,"props":468,"children":469},{"style":69},[470],{"type":23,"value":93},{"type":18,"tag":50,"props":472,"children":473},{"style":75},[474],{"type":23,"value":98},{"type":18,"tag":50,"props":476,"children":477},{"style":81},[478],{"type":23,"value":154},{"type":18,"tag":50,"props":480,"children":481},{"style":75},[482],{"type":23,"value":78},{"type":18,"tag":50,"props":484,"children":485},{"style":69},[486],{"type":23,"value":163},{"type":18,"tag":50,"props":488,"children":489},{"class":52,"line":166},[490,494,498,503,507,511,515,520],{"type":18,"tag":50,"props":491,"children":492},{"style":235},[493],{"type":23,"value":214},{"type":18,"tag":50,"props":495,"children":496},{"style":69},[497],{"type":23,"value":242},{"type":18,"tag":50,"props":499,"children":500},{"style":245},[501],{"type":23,"value":502},"10",{"type":18,"tag":50,"props":504,"children":505},{"style":69},[506],{"type":23,"value":253},{"type":18,"tag":50,"props":508,"children":509},{"style":63},[510],{"type":23,"value":258},{"type":18,"tag":50,"props":512,"children":513},{"style":75},[514],{"type":23,"value":98},{"type":18,"tag":50,"props":516,"children":517},{"style":81},[518],{"type":23,"value":519},"George",{"type":18,"tag":50,"props":521,"children":522},{"style":75},[523],{"type":23,"value":272},{"type":18,"tag":19,"props":525,"children":526},{},[527],{"type":23,"value":528},"Įvykdę kodą pamatysite įvykusią klaidą, kuri ganėtinai aiškiai aprašo iškilusią problemą:",{"type":18,"tag":38,"props":530,"children":532},{"className":329,"code":531,"language":23,"meta":43,"style":43},"IndexError: list assignment index out of range\n",[533],{"type":18,"tag":46,"props":534,"children":535},{"__ignoreMap":43},[536],{"type":18,"tag":50,"props":537,"children":538},{"class":52,"line":53},[539],{"type":18,"tag":50,"props":540,"children":541},{},[542],{"type":23,"value":531},{"type":18,"tag":26,"props":544,"children":546},{"id":545},"elementų-pridėjimas",[547],{"type":23,"value":548},"Elementų pridėjimas",{"type":18,"tag":19,"props":550,"children":551},{},[552],{"type":23,"value":553},"Toliau pasižiūrėkime, kaip trimis metodais galime pridėti naujus elementus į sąrašą.",{"type":18,"tag":555,"props":556,"children":558},"h3",{"id":557},"append",[559],{"type":23,"value":560},"append()",{"type":18,"tag":19,"props":562,"children":563},{},[564,566,570,572,576],{"type":23,"value":565},"Žodis ",{"type":18,"tag":378,"props":567,"children":568},{},[569],{"type":23,"value":557},{"type":23,"value":571}," reiškia pridėjimą prie galo. Tokia pat šio žodžio reikšmė ",{"type":18,"tag":378,"props":573,"children":574},{},[575],{"type":23,"value":42},{"type":23,"value":577}," kalboje. Šiuo metodu pridėsime elementą prie sąrašo galo, taip jį praplėsdami. Pavyzdžiui:",{"type":18,"tag":38,"props":579,"children":581},{"className":40,"code":580,"language":42,"meta":43,"style":43},"shopping_list = [\"1,5 kg of apples\", \"chuck steak\", \"toilet paper\", \"tomato paste\"]\nprint(\"Shopping list before append\")\nprint(shopping_list)\n\nshopping_list.append(\"Gouda cheese\")\nprint(\"Shopping list after append:\")\nprint(shopping_list)\n",[582],{"type":18,"tag":46,"props":583,"children":584},{"__ignoreMap":43},[585,669,697,717,724,762,790],{"type":18,"tag":50,"props":586,"children":587},{"class":52,"line":53},[588,593,597,601,605,610,614,618,622,627,631,635,639,644,648,652,656,661,665],{"type":18,"tag":50,"props":589,"children":590},{"style":57},[591],{"type":23,"value":592},"shopping_list ",{"type":18,"tag":50,"props":594,"children":595},{"style":63},[596],{"type":23,"value":66},{"type":18,"tag":50,"props":598,"children":599},{"style":69},[600],{"type":23,"value":72},{"type":18,"tag":50,"props":602,"children":603},{"style":75},[604],{"type":23,"value":78},{"type":18,"tag":50,"props":606,"children":607},{"style":81},[608],{"type":23,"value":609},"1,5 kg of apples",{"type":18,"tag":50,"props":611,"children":612},{"style":75},[613],{"type":23,"value":78},{"type":18,"tag":50,"props":615,"children":616},{"style":69},[617],{"type":23,"value":93},{"type":18,"tag":50,"props":619,"children":620},{"style":75},[621],{"type":23,"value":98},{"type":18,"tag":50,"props":623,"children":624},{"style":81},[625],{"type":23,"value":626},"chuck steak",{"type":18,"tag":50,"props":628,"children":629},{"style":75},[630],{"type":23,"value":78},{"type":18,"tag":50,"props":632,"children":633},{"style":69},[634],{"type":23,"value":93},{"type":18,"tag":50,"props":636,"children":637},{"style":75},[638],{"type":23,"value":98},{"type":18,"tag":50,"props":640,"children":641},{"style":81},[642],{"type":23,"value":643},"toilet paper",{"type":18,"tag":50,"props":645,"children":646},{"style":75},[647],{"type":23,"value":78},{"type":18,"tag":50,"props":649,"children":650},{"style":69},[651],{"type":23,"value":93},{"type":18,"tag":50,"props":653,"children":654},{"style":75},[655],{"type":23,"value":98},{"type":18,"tag":50,"props":657,"children":658},{"style":81},[659],{"type":23,"value":660},"tomato paste",{"type":18,"tag":50,"props":662,"children":663},{"style":75},[664],{"type":23,"value":78},{"type":18,"tag":50,"props":666,"children":667},{"style":69},[668],{"type":23,"value":163},{"type":18,"tag":50,"props":670,"children":671},{"class":52,"line":166},[672,676,680,684,689,693],{"type":18,"tag":50,"props":673,"children":674},{"style":170},[675],{"type":23,"value":173},{"type":18,"tag":50,"props":677,"children":678},{"style":69},[679],{"type":23,"value":178},{"type":18,"tag":50,"props":681,"children":682},{"style":75},[683],{"type":23,"value":78},{"type":18,"tag":50,"props":685,"children":686},{"style":81},[687],{"type":23,"value":688},"Shopping list before append",{"type":18,"tag":50,"props":690,"children":691},{"style":75},[692],{"type":23,"value":78},{"type":18,"tag":50,"props":694,"children":695},{"style":69},[696],{"type":23,"value":196},{"type":18,"tag":50,"props":698,"children":699},{"class":52,"line":199},[700,704,708,713],{"type":18,"tag":50,"props":701,"children":702},{"style":170},[703],{"type":23,"value":173},{"type":18,"tag":50,"props":705,"children":706},{"style":69},[707],{"type":23,"value":178},{"type":18,"tag":50,"props":709,"children":710},{"style":211},[711],{"type":23,"value":712},"shopping_list",{"type":18,"tag":50,"props":714,"children":715},{"style":69},[716],{"type":23,"value":196},{"type":18,"tag":50,"props":718,"children":719},{"class":52,"line":221},[720],{"type":18,"tag":50,"props":721,"children":722},{"emptyLinePlaceholder":225},[723],{"type":23,"value":228},{"type":18,"tag":50,"props":725,"children":726},{"class":52,"line":231},[727,731,736,741,745,749,754,758],{"type":18,"tag":50,"props":728,"children":729},{"style":57},[730],{"type":23,"value":712},{"type":18,"tag":50,"props":732,"children":733},{"style":69},[734],{"type":23,"value":735},".",{"type":18,"tag":50,"props":737,"children":739},{"style":738},"--shiki-default:#1E66F5;--shiki-dark:#82AAFF",[740],{"type":23,"value":557},{"type":18,"tag":50,"props":742,"children":743},{"style":69},[744],{"type":23,"value":178},{"type":18,"tag":50,"props":746,"children":747},{"style":75},[748],{"type":23,"value":78},{"type":18,"tag":50,"props":750,"children":751},{"style":81},[752],{"type":23,"value":753},"Gouda cheese",{"type":18,"tag":50,"props":755,"children":756},{"style":75},[757],{"type":23,"value":78},{"type":18,"tag":50,"props":759,"children":760},{"style":69},[761],{"type":23,"value":196},{"type":18,"tag":50,"props":763,"children":764},{"class":52,"line":275},[765,769,773,777,782,786],{"type":18,"tag":50,"props":766,"children":767},{"style":170},[768],{"type":23,"value":173},{"type":18,"tag":50,"props":770,"children":771},{"style":69},[772],{"type":23,"value":178},{"type":18,"tag":50,"props":774,"children":775},{"style":75},[776],{"type":23,"value":78},{"type":18,"tag":50,"props":778,"children":779},{"style":81},[780],{"type":23,"value":781},"Shopping list after append:",{"type":18,"tag":50,"props":783,"children":784},{"style":75},[785],{"type":23,"value":78},{"type":18,"tag":50,"props":787,"children":788},{"style":69},[789],{"type":23,"value":196},{"type":18,"tag":50,"props":791,"children":792},{"class":52,"line":304},[793,797,801,805],{"type":18,"tag":50,"props":794,"children":795},{"style":170},[796],{"type":23,"value":173},{"type":18,"tag":50,"props":798,"children":799},{"style":69},[800],{"type":23,"value":178},{"type":18,"tag":50,"props":802,"children":803},{"style":211},[804],{"type":23,"value":712},{"type":18,"tag":50,"props":806,"children":807},{"style":69},[808],{"type":23,"value":196},{"type":18,"tag":19,"props":810,"children":811},{},[812],{"type":23,"value":813},"Įvykdžius kodą, gauname:",{"type":18,"tag":38,"props":815,"children":817},{"className":329,"code":816,"language":23,"meta":43,"style":43},"Shopping list before append\n['1,5 kg of apples', 'chuck steak', 'toilet paper', 'tomato paste']\nShopping list after append:\n['1,5 kg of apples', 'chuck steak', 'toilet paper', 'tomato paste', 'Gouda cheese']\n",[818],{"type":18,"tag":46,"props":819,"children":820},{"__ignoreMap":43},[821,829,837,845],{"type":18,"tag":50,"props":822,"children":823},{"class":52,"line":53},[824],{"type":18,"tag":50,"props":825,"children":826},{},[827],{"type":23,"value":828},"Shopping list before append\n",{"type":18,"tag":50,"props":830,"children":831},{"class":52,"line":166},[832],{"type":18,"tag":50,"props":833,"children":834},{},[835],{"type":23,"value":836},"['1,5 kg of apples', 'chuck steak', 'toilet paper', 'tomato paste']\n",{"type":18,"tag":50,"props":838,"children":839},{"class":52,"line":199},[840],{"type":18,"tag":50,"props":841,"children":842},{},[843],{"type":23,"value":844},"Shopping list after append:\n",{"type":18,"tag":50,"props":846,"children":847},{"class":52,"line":221},[848],{"type":18,"tag":50,"props":849,"children":850},{},[851],{"type":23,"value":852},"['1,5 kg of apples', 'chuck steak', 'toilet paper', 'tomato paste', 'Gouda cheese']\n",{"type":18,"tag":19,"props":854,"children":855},{},[856],{"type":23,"value":857},"Tą patį galima padaryti ir su tuščiu sąrašu:",{"type":18,"tag":38,"props":859,"children":861},{"className":40,"code":860,"language":42,"meta":43,"style":43},"abc = []\nabc.append(\"a\")\nabc.append(\"b\")\nabc.append(\"c\")\nabc.append(\"d\")\nprint(abc) # prints: ['a', 'b', 'c', 'd']\n",[862],{"type":18,"tag":46,"props":863,"children":864},{"__ignoreMap":43},[865,882,919,955,991,1027],{"type":18,"tag":50,"props":866,"children":867},{"class":52,"line":53},[868,873,877],{"type":18,"tag":50,"props":869,"children":870},{"style":57},[871],{"type":23,"value":872},"abc ",{"type":18,"tag":50,"props":874,"children":875},{"style":63},[876],{"type":23,"value":66},{"type":18,"tag":50,"props":878,"children":879},{"style":69},[880],{"type":23,"value":881}," []\n",{"type":18,"tag":50,"props":883,"children":884},{"class":52,"line":166},[885,890,894,898,902,906,911,915],{"type":18,"tag":50,"props":886,"children":887},{"style":57},[888],{"type":23,"value":889},"abc",{"type":18,"tag":50,"props":891,"children":892},{"style":69},[893],{"type":23,"value":735},{"type":18,"tag":50,"props":895,"children":896},{"style":738},[897],{"type":23,"value":557},{"type":18,"tag":50,"props":899,"children":900},{"style":69},[901],{"type":23,"value":178},{"type":18,"tag":50,"props":903,"children":904},{"style":75},[905],{"type":23,"value":78},{"type":18,"tag":50,"props":907,"children":908},{"style":81},[909],{"type":23,"value":910},"a",{"type":18,"tag":50,"props":912,"children":913},{"style":75},[914],{"type":23,"value":78},{"type":18,"tag":50,"props":916,"children":917},{"style":69},[918],{"type":23,"value":196},{"type":18,"tag":50,"props":920,"children":921},{"class":52,"line":199},[922,926,930,934,938,942,947,951],{"type":18,"tag":50,"props":923,"children":924},{"style":57},[925],{"type":23,"value":889},{"type":18,"tag":50,"props":927,"children":928},{"style":69},[929],{"type":23,"value":735},{"type":18,"tag":50,"props":931,"children":932},{"style":738},[933],{"type":23,"value":557},{"type":18,"tag":50,"props":935,"children":936},{"style":69},[937],{"type":23,"value":178},{"type":18,"tag":50,"props":939,"children":940},{"style":75},[941],{"type":23,"value":78},{"type":18,"tag":50,"props":943,"children":944},{"style":81},[945],{"type":23,"value":946},"b",{"type":18,"tag":50,"props":948,"children":949},{"style":75},[950],{"type":23,"value":78},{"type":18,"tag":50,"props":952,"children":953},{"style":69},[954],{"type":23,"value":196},{"type":18,"tag":50,"props":956,"children":957},{"class":52,"line":221},[958,962,966,970,974,978,983,987],{"type":18,"tag":50,"props":959,"children":960},{"style":57},[961],{"type":23,"value":889},{"type":18,"tag":50,"props":963,"children":964},{"style":69},[965],{"type":23,"value":735},{"type":18,"tag":50,"props":967,"children":968},{"style":738},[969],{"type":23,"value":557},{"type":18,"tag":50,"props":971,"children":972},{"style":69},[973],{"type":23,"value":178},{"type":18,"tag":50,"props":975,"children":976},{"style":75},[977],{"type":23,"value":78},{"type":18,"tag":50,"props":979,"children":980},{"style":81},[981],{"type":23,"value":982},"c",{"type":18,"tag":50,"props":984,"children":985},{"style":75},[986],{"type":23,"value":78},{"type":18,"tag":50,"props":988,"children":989},{"style":69},[990],{"type":23,"value":196},{"type":18,"tag":50,"props":992,"children":993},{"class":52,"line":231},[994,998,1002,1006,1010,1014,1019,1023],{"type":18,"tag":50,"props":995,"children":996},{"style":57},[997],{"type":23,"value":889},{"type":18,"tag":50,"props":999,"children":1000},{"style":69},[1001],{"type":23,"value":735},{"type":18,"tag":50,"props":1003,"children":1004},{"style":738},[1005],{"type":23,"value":557},{"type":18,"tag":50,"props":1007,"children":1008},{"style":69},[1009],{"type":23,"value":178},{"type":18,"tag":50,"props":1011,"children":1012},{"style":75},[1013],{"type":23,"value":78},{"type":18,"tag":50,"props":1015,"children":1016},{"style":81},[1017],{"type":23,"value":1018},"d",{"type":18,"tag":50,"props":1020,"children":1021},{"style":75},[1022],{"type":23,"value":78},{"type":18,"tag":50,"props":1024,"children":1025},{"style":69},[1026],{"type":23,"value":196},{"type":18,"tag":50,"props":1028,"children":1029},{"class":52,"line":275},[1030,1034,1038,1042,1047],{"type":18,"tag":50,"props":1031,"children":1032},{"style":170},[1033],{"type":23,"value":173},{"type":18,"tag":50,"props":1035,"children":1036},{"style":69},[1037],{"type":23,"value":178},{"type":18,"tag":50,"props":1039,"children":1040},{"style":211},[1041],{"type":23,"value":889},{"type":18,"tag":50,"props":1043,"children":1044},{"style":69},[1045],{"type":23,"value":1046},")",{"type":18,"tag":50,"props":1048,"children":1050},{"style":1049},"--shiki-default:#9CA0B0;--shiki-dark:#545454;--shiki-default-font-style:italic;--shiki-dark-font-style:italic",[1051],{"type":23,"value":1052}," # prints: ['a', 'b', 'c', 'd']\n",{"type":18,"tag":19,"props":1054,"children":1055},{},[1056],{"type":23,"value":1057},"Daugiau panaudojimo atvejų pamatysite toliau - pavyzdžiuose.",{"type":18,"tag":555,"props":1059,"children":1061},{"id":1060},"insert",[1062],{"type":23,"value":1063},"insert()",{"type":18,"tag":19,"props":1065,"children":1066},{},[1067,1069,1081],{"type":23,"value":1068},"Su ",{"type":18,"tag":46,"props":1070,"children":1071},{"className":40,"language":42,"style":43},[1072,1076],{"type":18,"tag":50,"props":1073,"children":1074},{"style":738},[1075],{"type":23,"value":1060},{"type":18,"tag":50,"props":1077,"children":1078},{"style":69},[1079],{"type":23,"value":1080},"()",{"type":23,"value":1082}," metodu galima elementą įterpti į bet kurią sąrašo vietą.",{"type":18,"tag":38,"props":1084,"children":1086},{"className":40,"code":1085,"language":42,"meta":43,"style":43},"elements = [\"e1\", \"e2\", \"e3\", \"e4\", \"e5\"]\nprint(\"List before insert:\")\nprint(elements)\n\nelements.insert(4, \"f\")\nprint(\"List after insert\")\nprint(elements)\n",[1087],{"type":18,"tag":46,"props":1088,"children":1089},{"__ignoreMap":43},[1090,1191,1219,1239,1246,1292,1320],{"type":18,"tag":50,"props":1091,"children":1092},{"class":52,"line":53},[1093,1098,1102,1106,1110,1115,1119,1123,1127,1132,1136,1140,1144,1149,1153,1157,1161,1166,1170,1174,1178,1183,1187],{"type":18,"tag":50,"props":1094,"children":1095},{"style":57},[1096],{"type":23,"value":1097},"elements ",{"type":18,"tag":50,"props":1099,"children":1100},{"style":63},[1101],{"type":23,"value":66},{"type":18,"tag":50,"props":1103,"children":1104},{"style":69},[1105],{"type":23,"value":72},{"type":18,"tag":50,"props":1107,"children":1108},{"style":75},[1109],{"type":23,"value":78},{"type":18,"tag":50,"props":1111,"children":1112},{"style":81},[1113],{"type":23,"value":1114},"e1",{"type":18,"tag":50,"props":1116,"children":1117},{"style":75},[1118],{"type":23,"value":78},{"type":18,"tag":50,"props":1120,"children":1121},{"style":69},[1122],{"type":23,"value":93},{"type":18,"tag":50,"props":1124,"children":1125},{"style":75},[1126],{"type":23,"value":98},{"type":18,"tag":50,"props":1128,"children":1129},{"style":81},[1130],{"type":23,"value":1131},"e2",{"type":18,"tag":50,"props":1133,"children":1134},{"style":75},[1135],{"type":23,"value":78},{"type":18,"tag":50,"props":1137,"children":1138},{"style":69},[1139],{"type":23,"value":93},{"type":18,"tag":50,"props":1141,"children":1142},{"style":75},[1143],{"type":23,"value":98},{"type":18,"tag":50,"props":1145,"children":1146},{"style":81},[1147],{"type":23,"value":1148},"e3",{"type":18,"tag":50,"props":1150,"children":1151},{"style":75},[1152],{"type":23,"value":78},{"type":18,"tag":50,"props":1154,"children":1155},{"style":69},[1156],{"type":23,"value":93},{"type":18,"tag":50,"props":1158,"children":1159},{"style":75},[1160],{"type":23,"value":98},{"type":18,"tag":50,"props":1162,"children":1163},{"style":81},[1164],{"type":23,"value":1165},"e4",{"type":18,"tag":50,"props":1167,"children":1168},{"style":75},[1169],{"type":23,"value":78},{"type":18,"tag":50,"props":1171,"children":1172},{"style":69},[1173],{"type":23,"value":93},{"type":18,"tag":50,"props":1175,"children":1176},{"style":75},[1177],{"type":23,"value":98},{"type":18,"tag":50,"props":1179,"children":1180},{"style":81},[1181],{"type":23,"value":1182},"e5",{"type":18,"tag":50,"props":1184,"children":1185},{"style":75},[1186],{"type":23,"value":78},{"type":18,"tag":50,"props":1188,"children":1189},{"style":69},[1190],{"type":23,"value":163},{"type":18,"tag":50,"props":1192,"children":1193},{"class":52,"line":166},[1194,1198,1202,1206,1211,1215],{"type":18,"tag":50,"props":1195,"children":1196},{"style":170},[1197],{"type":23,"value":173},{"type":18,"tag":50,"props":1199,"children":1200},{"style":69},[1201],{"type":23,"value":178},{"type":18,"tag":50,"props":1203,"children":1204},{"style":75},[1205],{"type":23,"value":78},{"type":18,"tag":50,"props":1207,"children":1208},{"style":81},[1209],{"type":23,"value":1210},"List before insert:",{"type":18,"tag":50,"props":1212,"children":1213},{"style":75},[1214],{"type":23,"value":78},{"type":18,"tag":50,"props":1216,"children":1217},{"style":69},[1218],{"type":23,"value":196},{"type":18,"tag":50,"props":1220,"children":1221},{"class":52,"line":199},[1222,1226,1230,1235],{"type":18,"tag":50,"props":1223,"children":1224},{"style":170},[1225],{"type":23,"value":173},{"type":18,"tag":50,"props":1227,"children":1228},{"style":69},[1229],{"type":23,"value":178},{"type":18,"tag":50,"props":1231,"children":1232},{"style":211},[1233],{"type":23,"value":1234},"elements",{"type":18,"tag":50,"props":1236,"children":1237},{"style":69},[1238],{"type":23,"value":196},{"type":18,"tag":50,"props":1240,"children":1241},{"class":52,"line":221},[1242],{"type":18,"tag":50,"props":1243,"children":1244},{"emptyLinePlaceholder":225},[1245],{"type":23,"value":228},{"type":18,"tag":50,"props":1247,"children":1248},{"class":52,"line":231},[1249,1253,1257,1261,1265,1271,1275,1279,1284,1288],{"type":18,"tag":50,"props":1250,"children":1251},{"style":57},[1252],{"type":23,"value":1234},{"type":18,"tag":50,"props":1254,"children":1255},{"style":69},[1256],{"type":23,"value":735},{"type":18,"tag":50,"props":1258,"children":1259},{"style":738},[1260],{"type":23,"value":1060},{"type":18,"tag":50,"props":1262,"children":1263},{"style":69},[1264],{"type":23,"value":178},{"type":18,"tag":50,"props":1266,"children":1268},{"style":1267},"--shiki-default:#FE640B;--shiki-dark:#F78C6C",[1269],{"type":23,"value":1270},"4",{"type":18,"tag":50,"props":1272,"children":1273},{"style":69},[1274],{"type":23,"value":93},{"type":18,"tag":50,"props":1276,"children":1277},{"style":75},[1278],{"type":23,"value":98},{"type":18,"tag":50,"props":1280,"children":1281},{"style":81},[1282],{"type":23,"value":1283},"f",{"type":18,"tag":50,"props":1285,"children":1286},{"style":75},[1287],{"type":23,"value":78},{"type":18,"tag":50,"props":1289,"children":1290},{"style":69},[1291],{"type":23,"value":196},{"type":18,"tag":50,"props":1293,"children":1294},{"class":52,"line":275},[1295,1299,1303,1307,1312,1316],{"type":18,"tag":50,"props":1296,"children":1297},{"style":170},[1298],{"type":23,"value":173},{"type":18,"tag":50,"props":1300,"children":1301},{"style":69},[1302],{"type":23,"value":178},{"type":18,"tag":50,"props":1304,"children":1305},{"style":75},[1306],{"type":23,"value":78},{"type":18,"tag":50,"props":1308,"children":1309},{"style":81},[1310],{"type":23,"value":1311},"List after insert",{"type":18,"tag":50,"props":1313,"children":1314},{"style":75},[1315],{"type":23,"value":78},{"type":18,"tag":50,"props":1317,"children":1318},{"style":69},[1319],{"type":23,"value":196},{"type":18,"tag":50,"props":1321,"children":1322},{"class":52,"line":304},[1323,1327,1331,1335],{"type":18,"tag":50,"props":1324,"children":1325},{"style":170},[1326],{"type":23,"value":173},{"type":18,"tag":50,"props":1328,"children":1329},{"style":69},[1330],{"type":23,"value":178},{"type":18,"tag":50,"props":1332,"children":1333},{"style":211},[1334],{"type":23,"value":1234},{"type":18,"tag":50,"props":1336,"children":1337},{"style":69},[1338],{"type":23,"value":196},{"type":18,"tag":19,"props":1340,"children":1341},{},[1342],{"type":23,"value":1343},"Šiuo atveju elementas įterpiamas į indeksą - naujai įterpto elemento indeksas yra 4, toks kokį nurodėme pirmajame argumente. Antrajame metodo argumente nurodomas elementas, kurį norime įterpti.",{"type":18,"tag":555,"props":1345,"children":1347},{"id":1346},"sąrašų-sujungimas",[1348],{"type":23,"value":1349},"Sąrašų sujungimas",{"type":18,"tag":19,"props":1351,"children":1352},{},[1353,1355,1367,1369,1377],{"type":23,"value":1354},"Sujungti sąrašą galima dviem būdais su metodu ",{"type":18,"tag":46,"props":1356,"children":1357},{"className":40,"language":42,"style":43},[1358,1363],{"type":18,"tag":50,"props":1359,"children":1360},{"style":738},[1361],{"type":23,"value":1362},"extend",{"type":18,"tag":50,"props":1364,"children":1365},{"style":69},[1366],{"type":23,"value":1080},{"type":23,"value":1368}," ir pliuso ženklu ",{"type":18,"tag":46,"props":1370,"children":1371},{"className":40,"language":42,"style":43},[1372],{"type":18,"tag":50,"props":1373,"children":1374},{"style":63},[1375],{"type":23,"value":1376},"+",{"type":23,"value":1378},":",{"type":18,"tag":38,"props":1380,"children":1382},{"className":40,"code":1381,"language":42,"meta":43,"style":43},"list_1 = [1, 2]\nlist_2 = [3, 4]\n\nlist_1.extend(list_2)\nprint(f\"list_1.extend(list_2): {list_1}\") # Modifies original list\n\nlist_a = [\"a\", \"b\"]\nlist_c = [\"c\", \"d\"]\nprint(f\"list_a+list_c: {list_a+list_c}\") # Does not modify original list\n",[1383],{"type":18,"tag":46,"props":1384,"children":1385},{"__ignoreMap":43},[1386,1419,1453,1460,1489,1538,1545,1593,1642],{"type":18,"tag":50,"props":1387,"children":1388},{"class":52,"line":53},[1389,1394,1398,1402,1406,1410,1415],{"type":18,"tag":50,"props":1390,"children":1391},{"style":57},[1392],{"type":23,"value":1393},"list_1 ",{"type":18,"tag":50,"props":1395,"children":1396},{"style":63},[1397],{"type":23,"value":66},{"type":18,"tag":50,"props":1399,"children":1400},{"style":69},[1401],{"type":23,"value":72},{"type":18,"tag":50,"props":1403,"children":1404},{"style":1267},[1405],{"type":23,"value":248},{"type":18,"tag":50,"props":1407,"children":1408},{"style":69},[1409],{"type":23,"value":93},{"type":18,"tag":50,"props":1411,"children":1412},{"style":1267},[1413],{"type":23,"value":1414}," 2",{"type":18,"tag":50,"props":1416,"children":1417},{"style":69},[1418],{"type":23,"value":163},{"type":18,"tag":50,"props":1420,"children":1421},{"class":52,"line":166},[1422,1427,1431,1435,1440,1444,1449],{"type":18,"tag":50,"props":1423,"children":1424},{"style":57},[1425],{"type":23,"value":1426},"list_2 ",{"type":18,"tag":50,"props":1428,"children":1429},{"style":63},[1430],{"type":23,"value":66},{"type":18,"tag":50,"props":1432,"children":1433},{"style":69},[1434],{"type":23,"value":72},{"type":18,"tag":50,"props":1436,"children":1437},{"style":1267},[1438],{"type":23,"value":1439},"3",{"type":18,"tag":50,"props":1441,"children":1442},{"style":69},[1443],{"type":23,"value":93},{"type":18,"tag":50,"props":1445,"children":1446},{"style":1267},[1447],{"type":23,"value":1448}," 4",{"type":18,"tag":50,"props":1450,"children":1451},{"style":69},[1452],{"type":23,"value":163},{"type":18,"tag":50,"props":1454,"children":1455},{"class":52,"line":199},[1456],{"type":18,"tag":50,"props":1457,"children":1458},{"emptyLinePlaceholder":225},[1459],{"type":23,"value":228},{"type":18,"tag":50,"props":1461,"children":1462},{"class":52,"line":221},[1463,1468,1472,1476,1480,1485],{"type":18,"tag":50,"props":1464,"children":1465},{"style":57},[1466],{"type":23,"value":1467},"list_1",{"type":18,"tag":50,"props":1469,"children":1470},{"style":69},[1471],{"type":23,"value":735},{"type":18,"tag":50,"props":1473,"children":1474},{"style":738},[1475],{"type":23,"value":1362},{"type":18,"tag":50,"props":1477,"children":1478},{"style":69},[1479],{"type":23,"value":178},{"type":18,"tag":50,"props":1481,"children":1482},{"style":211},[1483],{"type":23,"value":1484},"list_2",{"type":18,"tag":50,"props":1486,"children":1487},{"style":69},[1488],{"type":23,"value":196},{"type":18,"tag":50,"props":1490,"children":1491},{"class":52,"line":231},[1492,1496,1500,1505,1510,1516,1520,1525,1529,1533],{"type":18,"tag":50,"props":1493,"children":1494},{"style":170},[1495],{"type":23,"value":173},{"type":18,"tag":50,"props":1497,"children":1498},{"style":69},[1499],{"type":23,"value":178},{"type":18,"tag":50,"props":1501,"children":1503},{"style":1502},"--shiki-default:#40A02B;--shiki-dark:#C792EA;--shiki-default-font-style:italic;--shiki-dark-font-style:inherit",[1504],{"type":23,"value":1283},{"type":18,"tag":50,"props":1506,"children":1507},{"style":81},[1508],{"type":23,"value":1509},"\"list_1.extend(list_2): ",{"type":18,"tag":50,"props":1511,"children":1513},{"style":1512},"--shiki-default:#EA76CB;--shiki-dark:#F78C6C",[1514],{"type":23,"value":1515},"{",{"type":18,"tag":50,"props":1517,"children":1518},{"style":211},[1519],{"type":23,"value":1467},{"type":18,"tag":50,"props":1521,"children":1522},{"style":1512},[1523],{"type":23,"value":1524},"}",{"type":18,"tag":50,"props":1526,"children":1527},{"style":81},[1528],{"type":23,"value":78},{"type":18,"tag":50,"props":1530,"children":1531},{"style":69},[1532],{"type":23,"value":1046},{"type":18,"tag":50,"props":1534,"children":1535},{"style":1049},[1536],{"type":23,"value":1537}," # Modifies original list\n",{"type":18,"tag":50,"props":1539,"children":1540},{"class":52,"line":275},[1541],{"type":18,"tag":50,"props":1542,"children":1543},{"emptyLinePlaceholder":225},[1544],{"type":23,"value":228},{"type":18,"tag":50,"props":1546,"children":1547},{"class":52,"line":304},[1548,1553,1557,1561,1565,1569,1573,1577,1581,1585,1589],{"type":18,"tag":50,"props":1549,"children":1550},{"style":57},[1551],{"type":23,"value":1552},"list_a ",{"type":18,"tag":50,"props":1554,"children":1555},{"style":63},[1556],{"type":23,"value":66},{"type":18,"tag":50,"props":1558,"children":1559},{"style":69},[1560],{"type":23,"value":72},{"type":18,"tag":50,"props":1562,"children":1563},{"style":75},[1564],{"type":23,"value":78},{"type":18,"tag":50,"props":1566,"children":1567},{"style":81},[1568],{"type":23,"value":910},{"type":18,"tag":50,"props":1570,"children":1571},{"style":75},[1572],{"type":23,"value":78},{"type":18,"tag":50,"props":1574,"children":1575},{"style":69},[1576],{"type":23,"value":93},{"type":18,"tag":50,"props":1578,"children":1579},{"style":75},[1580],{"type":23,"value":98},{"type":18,"tag":50,"props":1582,"children":1583},{"style":81},[1584],{"type":23,"value":946},{"type":18,"tag":50,"props":1586,"children":1587},{"style":75},[1588],{"type":23,"value":78},{"type":18,"tag":50,"props":1590,"children":1591},{"style":69},[1592],{"type":23,"value":163},{"type":18,"tag":50,"props":1594,"children":1596},{"class":52,"line":1595},8,[1597,1602,1606,1610,1614,1618,1622,1626,1630,1634,1638],{"type":18,"tag":50,"props":1598,"children":1599},{"style":57},[1600],{"type":23,"value":1601},"list_c ",{"type":18,"tag":50,"props":1603,"children":1604},{"style":63},[1605],{"type":23,"value":66},{"type":18,"tag":50,"props":1607,"children":1608},{"style":69},[1609],{"type":23,"value":72},{"type":18,"tag":50,"props":1611,"children":1612},{"style":75},[1613],{"type":23,"value":78},{"type":18,"tag":50,"props":1615,"children":1616},{"style":81},[1617],{"type":23,"value":982},{"type":18,"tag":50,"props":1619,"children":1620},{"style":75},[1621],{"type":23,"value":78},{"type":18,"tag":50,"props":1623,"children":1624},{"style":69},[1625],{"type":23,"value":93},{"type":18,"tag":50,"props":1627,"children":1628},{"style":75},[1629],{"type":23,"value":98},{"type":18,"tag":50,"props":1631,"children":1632},{"style":81},[1633],{"type":23,"value":1018},{"type":18,"tag":50,"props":1635,"children":1636},{"style":75},[1637],{"type":23,"value":78},{"type":18,"tag":50,"props":1639,"children":1640},{"style":69},[1641],{"type":23,"value":163},{"type":18,"tag":50,"props":1643,"children":1645},{"class":52,"line":1644},9,[1646,1650,1654,1658,1663,1667,1672,1676,1681,1685,1689,1693],{"type":18,"tag":50,"props":1647,"children":1648},{"style":170},[1649],{"type":23,"value":173},{"type":18,"tag":50,"props":1651,"children":1652},{"style":69},[1653],{"type":23,"value":178},{"type":18,"tag":50,"props":1655,"children":1656},{"style":1502},[1657],{"type":23,"value":1283},{"type":18,"tag":50,"props":1659,"children":1660},{"style":81},[1661],{"type":23,"value":1662},"\"list_a+list_c: ",{"type":18,"tag":50,"props":1664,"children":1665},{"style":1512},[1666],{"type":23,"value":1515},{"type":18,"tag":50,"props":1668,"children":1669},{"style":211},[1670],{"type":23,"value":1671},"list_a",{"type":18,"tag":50,"props":1673,"children":1674},{"style":63},[1675],{"type":23,"value":1376},{"type":18,"tag":50,"props":1677,"children":1678},{"style":211},[1679],{"type":23,"value":1680},"list_c",{"type":18,"tag":50,"props":1682,"children":1683},{"style":1512},[1684],{"type":23,"value":1524},{"type":18,"tag":50,"props":1686,"children":1687},{"style":81},[1688],{"type":23,"value":78},{"type":18,"tag":50,"props":1690,"children":1691},{"style":69},[1692],{"type":23,"value":1046},{"type":18,"tag":50,"props":1694,"children":1695},{"style":1049},[1696],{"type":23,"value":1697}," # Does not modify original list\n",{"type":18,"tag":19,"props":1699,"children":1700},{},[1701],{"type":23,"value":1702},"Rezultatas",{"type":18,"tag":38,"props":1704,"children":1706},{"className":329,"code":1705,"language":23,"meta":43,"style":43},"list_1.extend(list_2): [1, 2, 3, 4]\nlist_a+list_c: ['a', 'b', 'c', 'd']\n",[1707],{"type":18,"tag":46,"props":1708,"children":1709},{"__ignoreMap":43},[1710,1718],{"type":18,"tag":50,"props":1711,"children":1712},{"class":52,"line":53},[1713],{"type":18,"tag":50,"props":1714,"children":1715},{},[1716],{"type":23,"value":1717},"list_1.extend(list_2): [1, 2, 3, 4]\n",{"type":18,"tag":50,"props":1719,"children":1720},{"class":52,"line":166},[1721],{"type":18,"tag":50,"props":1722,"children":1723},{},[1724],{"type":23,"value":1725},"list_a+list_c: ['a', 'b', 'c', 'd']\n",{"type":18,"tag":19,"props":1727,"children":1728},{},[1729,1731,1742],{"type":23,"value":1730},"Atkreipkite dėmesį, kad su ",{"type":18,"tag":46,"props":1732,"children":1733},{"className":40,"language":42,"style":43},[1734,1738],{"type":18,"tag":50,"props":1735,"children":1736},{"style":738},[1737],{"type":23,"value":1362},{"type":18,"tag":50,"props":1739,"children":1740},{"style":69},[1741],{"type":23,"value":1080},{"type":23,"value":1743}," metodu pakeičiame sąrašą, o sudedant - ne.",{"type":18,"tag":26,"props":1745,"children":1747},{"id":1746},"elemento-pašalinimas",[1748],{"type":23,"value":1749},"Elemento pašalinimas",{"type":18,"tag":19,"props":1751,"children":1752},{},[1753,1755,1767,1769,1781],{"type":23,"value":1754},"Elemento pašalinimui iš sąrašo naudosime ",{"type":18,"tag":46,"props":1756,"children":1757},{"className":40,"language":42,"style":43},[1758,1763],{"type":18,"tag":50,"props":1759,"children":1760},{"style":738},[1761],{"type":23,"value":1762},"remove",{"type":18,"tag":50,"props":1764,"children":1765},{"style":69},[1766],{"type":23,"value":1080},{"type":23,"value":1768}," ir ",{"type":18,"tag":46,"props":1770,"children":1771},{"className":40,"language":42,"style":43},[1772,1777],{"type":18,"tag":50,"props":1773,"children":1774},{"style":738},[1775],{"type":23,"value":1776},"pop",{"type":18,"tag":50,"props":1778,"children":1779},{"style":69},[1780],{"type":23,"value":1080},{"type":23,"value":1782}," metodus. Vienu atveju nurodysime elemento reikšmę, kitu - indeksą.",{"type":18,"tag":555,"props":1784,"children":1785},{"id":1762},[1786],{"type":23,"value":1787},"remove()",{"type":18,"tag":19,"props":1789,"children":1790},{},[1791,1793,1804],{"type":23,"value":1792},"Naudojant ",{"type":18,"tag":46,"props":1794,"children":1795},{"className":40,"language":42,"style":43},[1796,1800],{"type":18,"tag":50,"props":1797,"children":1798},{"style":738},[1799],{"type":23,"value":1762},{"type":18,"tag":50,"props":1801,"children":1802},{"style":69},[1803],{"type":23,"value":1080},{"type":23,"value":1805}," metodą reikia nurodyti elementą, kurį norime pašalinti:",{"type":18,"tag":38,"props":1807,"children":1809},{"className":40,"code":1808,"language":42,"meta":43,"style":43},"# Words from https://www.youtube.com/watch?v=PKQPey6L42M\ncoconut_song = [\"The\", \"coconut\", \"nut\", \"is\", \"not\", \"a\", \"giant\", \"nut\"]\nprint(\"Coconut song before remove:\")\nprint(coconut_song)\n\ncoconut_song.remove(\"not\")\nprint(\"Coconut song after \\\"not\\\" remove:\")\nprint(coconut_song)\n",[1810],{"type":18,"tag":46,"props":1811,"children":1812},{"__ignoreMap":43},[1813,1821,1971,1999,2019,2026,2061,2108],{"type":18,"tag":50,"props":1814,"children":1815},{"class":52,"line":53},[1816],{"type":18,"tag":50,"props":1817,"children":1818},{"style":1049},[1819],{"type":23,"value":1820},"# Words from https://www.youtube.com/watch?v=PKQPey6L42M\n",{"type":18,"tag":50,"props":1822,"children":1823},{"class":52,"line":166},[1824,1829,1833,1837,1841,1846,1850,1854,1858,1863,1867,1871,1875,1880,1884,1888,1892,1897,1901,1905,1909,1914,1918,1922,1926,1930,1934,1938,1942,1947,1951,1955,1959,1963,1967],{"type":18,"tag":50,"props":1825,"children":1826},{"style":57},[1827],{"type":23,"value":1828},"coconut_song ",{"type":18,"tag":50,"props":1830,"children":1831},{"style":63},[1832],{"type":23,"value":66},{"type":18,"tag":50,"props":1834,"children":1835},{"style":69},[1836],{"type":23,"value":72},{"type":18,"tag":50,"props":1838,"children":1839},{"style":75},[1840],{"type":23,"value":78},{"type":18,"tag":50,"props":1842,"children":1843},{"style":81},[1844],{"type":23,"value":1845},"The",{"type":18,"tag":50,"props":1847,"children":1848},{"style":75},[1849],{"type":23,"value":78},{"type":18,"tag":50,"props":1851,"children":1852},{"style":69},[1853],{"type":23,"value":93},{"type":18,"tag":50,"props":1855,"children":1856},{"style":75},[1857],{"type":23,"value":98},{"type":18,"tag":50,"props":1859,"children":1860},{"style":81},[1861],{"type":23,"value":1862},"coconut",{"type":18,"tag":50,"props":1864,"children":1865},{"style":75},[1866],{"type":23,"value":78},{"type":18,"tag":50,"props":1868,"children":1869},{"style":69},[1870],{"type":23,"value":93},{"type":18,"tag":50,"props":1872,"children":1873},{"style":75},[1874],{"type":23,"value":98},{"type":18,"tag":50,"props":1876,"children":1877},{"style":81},[1878],{"type":23,"value":1879},"nut",{"type":18,"tag":50,"props":1881,"children":1882},{"style":75},[1883],{"type":23,"value":78},{"type":18,"tag":50,"props":1885,"children":1886},{"style":69},[1887],{"type":23,"value":93},{"type":18,"tag":50,"props":1889,"children":1890},{"style":75},[1891],{"type":23,"value":98},{"type":18,"tag":50,"props":1893,"children":1894},{"style":81},[1895],{"type":23,"value":1896},"is",{"type":18,"tag":50,"props":1898,"children":1899},{"style":75},[1900],{"type":23,"value":78},{"type":18,"tag":50,"props":1902,"children":1903},{"style":69},[1904],{"type":23,"value":93},{"type":18,"tag":50,"props":1906,"children":1907},{"style":75},[1908],{"type":23,"value":98},{"type":18,"tag":50,"props":1910,"children":1911},{"style":81},[1912],{"type":23,"value":1913},"not",{"type":18,"tag":50,"props":1915,"children":1916},{"style":75},[1917],{"type":23,"value":78},{"type":18,"tag":50,"props":1919,"children":1920},{"style":69},[1921],{"type":23,"value":93},{"type":18,"tag":50,"props":1923,"children":1924},{"style":75},[1925],{"type":23,"value":98},{"type":18,"tag":50,"props":1927,"children":1928},{"style":81},[1929],{"type":23,"value":910},{"type":18,"tag":50,"props":1931,"children":1932},{"style":75},[1933],{"type":23,"value":78},{"type":18,"tag":50,"props":1935,"children":1936},{"style":69},[1937],{"type":23,"value":93},{"type":18,"tag":50,"props":1939,"children":1940},{"style":75},[1941],{"type":23,"value":98},{"type":18,"tag":50,"props":1943,"children":1944},{"style":81},[1945],{"type":23,"value":1946},"giant",{"type":18,"tag":50,"props":1948,"children":1949},{"style":75},[1950],{"type":23,"value":78},{"type":18,"tag":50,"props":1952,"children":1953},{"style":69},[1954],{"type":23,"value":93},{"type":18,"tag":50,"props":1956,"children":1957},{"style":75},[1958],{"type":23,"value":98},{"type":18,"tag":50,"props":1960,"children":1961},{"style":81},[1962],{"type":23,"value":1879},{"type":18,"tag":50,"props":1964,"children":1965},{"style":75},[1966],{"type":23,"value":78},{"type":18,"tag":50,"props":1968,"children":1969},{"style":69},[1970],{"type":23,"value":163},{"type":18,"tag":50,"props":1972,"children":1973},{"class":52,"line":199},[1974,1978,1982,1986,1991,1995],{"type":18,"tag":50,"props":1975,"children":1976},{"style":170},[1977],{"type":23,"value":173},{"type":18,"tag":50,"props":1979,"children":1980},{"style":69},[1981],{"type":23,"value":178},{"type":18,"tag":50,"props":1983,"children":1984},{"style":75},[1985],{"type":23,"value":78},{"type":18,"tag":50,"props":1987,"children":1988},{"style":81},[1989],{"type":23,"value":1990},"Coconut song before remove:",{"type":18,"tag":50,"props":1992,"children":1993},{"style":75},[1994],{"type":23,"value":78},{"type":18,"tag":50,"props":1996,"children":1997},{"style":69},[1998],{"type":23,"value":196},{"type":18,"tag":50,"props":2000,"children":2001},{"class":52,"line":221},[2002,2006,2010,2015],{"type":18,"tag":50,"props":2003,"children":2004},{"style":170},[2005],{"type":23,"value":173},{"type":18,"tag":50,"props":2007,"children":2008},{"style":69},[2009],{"type":23,"value":178},{"type":18,"tag":50,"props":2011,"children":2012},{"style":211},[2013],{"type":23,"value":2014},"coconut_song",{"type":18,"tag":50,"props":2016,"children":2017},{"style":69},[2018],{"type":23,"value":196},{"type":18,"tag":50,"props":2020,"children":2021},{"class":52,"line":231},[2022],{"type":18,"tag":50,"props":2023,"children":2024},{"emptyLinePlaceholder":225},[2025],{"type":23,"value":228},{"type":18,"tag":50,"props":2027,"children":2028},{"class":52,"line":275},[2029,2033,2037,2041,2045,2049,2053,2057],{"type":18,"tag":50,"props":2030,"children":2031},{"style":57},[2032],{"type":23,"value":2014},{"type":18,"tag":50,"props":2034,"children":2035},{"style":69},[2036],{"type":23,"value":735},{"type":18,"tag":50,"props":2038,"children":2039},{"style":738},[2040],{"type":23,"value":1762},{"type":18,"tag":50,"props":2042,"children":2043},{"style":69},[2044],{"type":23,"value":178},{"type":18,"tag":50,"props":2046,"children":2047},{"style":75},[2048],{"type":23,"value":78},{"type":18,"tag":50,"props":2050,"children":2051},{"style":81},[2052],{"type":23,"value":1913},{"type":18,"tag":50,"props":2054,"children":2055},{"style":75},[2056],{"type":23,"value":78},{"type":18,"tag":50,"props":2058,"children":2059},{"style":69},[2060],{"type":23,"value":196},{"type":18,"tag":50,"props":2062,"children":2063},{"class":52,"line":304},[2064,2068,2072,2076,2081,2087,2091,2095,2100,2104],{"type":18,"tag":50,"props":2065,"children":2066},{"style":170},[2067],{"type":23,"value":173},{"type":18,"tag":50,"props":2069,"children":2070},{"style":69},[2071],{"type":23,"value":178},{"type":18,"tag":50,"props":2073,"children":2074},{"style":75},[2075],{"type":23,"value":78},{"type":18,"tag":50,"props":2077,"children":2078},{"style":81},[2079],{"type":23,"value":2080},"Coconut song after ",{"type":18,"tag":50,"props":2082,"children":2084},{"style":2083},"--shiki-default:#EA76CB;--shiki-dark:#EEFFFF",[2085],{"type":23,"value":2086},"\\\"",{"type":18,"tag":50,"props":2088,"children":2089},{"style":81},[2090],{"type":23,"value":1913},{"type":18,"tag":50,"props":2092,"children":2093},{"style":2083},[2094],{"type":23,"value":2086},{"type":18,"tag":50,"props":2096,"children":2097},{"style":81},[2098],{"type":23,"value":2099}," remove:",{"type":18,"tag":50,"props":2101,"children":2102},{"style":75},[2103],{"type":23,"value":78},{"type":18,"tag":50,"props":2105,"children":2106},{"style":69},[2107],{"type":23,"value":196},{"type":18,"tag":50,"props":2109,"children":2110},{"class":52,"line":1595},[2111,2115,2119,2123],{"type":18,"tag":50,"props":2112,"children":2113},{"style":170},[2114],{"type":23,"value":173},{"type":18,"tag":50,"props":2116,"children":2117},{"style":69},[2118],{"type":23,"value":178},{"type":18,"tag":50,"props":2120,"children":2121},{"style":211},[2122],{"type":23,"value":2014},{"type":18,"tag":50,"props":2124,"children":2125},{"style":69},[2126],{"type":23,"value":196},{"type":18,"tag":19,"props":2128,"children":2129},{},[2130],{"type":23,"value":2131},"Rezultatas:",{"type":18,"tag":38,"props":2133,"children":2135},{"className":329,"code":2134,"language":23,"meta":43,"style":43},"Coconut song before remove:\n['The', 'coconut', 'nut', 'is', 'not', 'a', 'giant', 'nut']\nCoconut song after \"not\" remove:\n['The', 'coconut', 'nut', 'is', 'a', 'giant', 'nut']\n",[2136],{"type":18,"tag":46,"props":2137,"children":2138},{"__ignoreMap":43},[2139,2147,2155,2163],{"type":18,"tag":50,"props":2140,"children":2141},{"class":52,"line":53},[2142],{"type":18,"tag":50,"props":2143,"children":2144},{},[2145],{"type":23,"value":2146},"Coconut song before remove:\n",{"type":18,"tag":50,"props":2148,"children":2149},{"class":52,"line":166},[2150],{"type":18,"tag":50,"props":2151,"children":2152},{},[2153],{"type":23,"value":2154},"['The', 'coconut', 'nut', 'is', 'not', 'a', 'giant', 'nut']\n",{"type":18,"tag":50,"props":2156,"children":2157},{"class":52,"line":199},[2158],{"type":18,"tag":50,"props":2159,"children":2160},{},[2161],{"type":23,"value":2162},"Coconut song after \"not\" remove:\n",{"type":18,"tag":50,"props":2164,"children":2165},{"class":52,"line":221},[2166],{"type":18,"tag":50,"props":2167,"children":2168},{},[2169],{"type":23,"value":2170},"['The', 'coconut', 'nut', 'is', 'a', 'giant', 'nut']\n",{"type":18,"tag":19,"props":2172,"children":2173},{},[2174],{"type":23,"value":2175},"Prieš ištrinant būtina įsitikinti, kad nurodytas elementas egzistuoja sąraše:",{"type":18,"tag":38,"props":2177,"children":2179},{"className":40,"code":2178,"language":42,"meta":43,"style":43},"fruits = [\"pineapple\", \"dragonfruit\", \"durian\", \"rambutan\", \"mango\"]\nfruits.remove(\"ananas\")\n",[2180],{"type":18,"tag":46,"props":2181,"children":2182},{"__ignoreMap":43},[2183,2284],{"type":18,"tag":50,"props":2184,"children":2185},{"class":52,"line":53},[2186,2191,2195,2199,2203,2208,2212,2216,2220,2225,2229,2233,2237,2242,2246,2250,2254,2259,2263,2267,2271,2276,2280],{"type":18,"tag":50,"props":2187,"children":2188},{"style":57},[2189],{"type":23,"value":2190},"fruits ",{"type":18,"tag":50,"props":2192,"children":2193},{"style":63},[2194],{"type":23,"value":66},{"type":18,"tag":50,"props":2196,"children":2197},{"style":69},[2198],{"type":23,"value":72},{"type":18,"tag":50,"props":2200,"children":2201},{"style":75},[2202],{"type":23,"value":78},{"type":18,"tag":50,"props":2204,"children":2205},{"style":81},[2206],{"type":23,"value":2207},"pineapple",{"type":18,"tag":50,"props":2209,"children":2210},{"style":75},[2211],{"type":23,"value":78},{"type":18,"tag":50,"props":2213,"children":2214},{"style":69},[2215],{"type":23,"value":93},{"type":18,"tag":50,"props":2217,"children":2218},{"style":75},[2219],{"type":23,"value":98},{"type":18,"tag":50,"props":2221,"children":2222},{"style":81},[2223],{"type":23,"value":2224},"dragonfruit",{"type":18,"tag":50,"props":2226,"children":2227},{"style":75},[2228],{"type":23,"value":78},{"type":18,"tag":50,"props":2230,"children":2231},{"style":69},[2232],{"type":23,"value":93},{"type":18,"tag":50,"props":2234,"children":2235},{"style":75},[2236],{"type":23,"value":98},{"type":18,"tag":50,"props":2238,"children":2239},{"style":81},[2240],{"type":23,"value":2241},"durian",{"type":18,"tag":50,"props":2243,"children":2244},{"style":75},[2245],{"type":23,"value":78},{"type":18,"tag":50,"props":2247,"children":2248},{"style":69},[2249],{"type":23,"value":93},{"type":18,"tag":50,"props":2251,"children":2252},{"style":75},[2253],{"type":23,"value":98},{"type":18,"tag":50,"props":2255,"children":2256},{"style":81},[2257],{"type":23,"value":2258},"rambutan",{"type":18,"tag":50,"props":2260,"children":2261},{"style":75},[2262],{"type":23,"value":78},{"type":18,"tag":50,"props":2264,"children":2265},{"style":69},[2266],{"type":23,"value":93},{"type":18,"tag":50,"props":2268,"children":2269},{"style":75},[2270],{"type":23,"value":98},{"type":18,"tag":50,"props":2272,"children":2273},{"style":81},[2274],{"type":23,"value":2275},"mango",{"type":18,"tag":50,"props":2277,"children":2278},{"style":75},[2279],{"type":23,"value":78},{"type":18,"tag":50,"props":2281,"children":2282},{"style":69},[2283],{"type":23,"value":163},{"type":18,"tag":50,"props":2285,"children":2286},{"class":52,"line":166},[2287,2292,2296,2300,2304,2308,2313,2317],{"type":18,"tag":50,"props":2288,"children":2289},{"style":57},[2290],{"type":23,"value":2291},"fruits",{"type":18,"tag":50,"props":2293,"children":2294},{"style":69},[2295],{"type":23,"value":735},{"type":18,"tag":50,"props":2297,"children":2298},{"style":738},[2299],{"type":23,"value":1762},{"type":18,"tag":50,"props":2301,"children":2302},{"style":69},[2303],{"type":23,"value":178},{"type":18,"tag":50,"props":2305,"children":2306},{"style":75},[2307],{"type":23,"value":78},{"type":18,"tag":50,"props":2309,"children":2310},{"style":81},[2311],{"type":23,"value":2312},"ananas",{"type":18,"tag":50,"props":2314,"children":2315},{"style":75},[2316],{"type":23,"value":78},{"type":18,"tag":50,"props":2318,"children":2319},{"style":69},[2320],{"type":23,"value":196},{"type":18,"tag":19,"props":2322,"children":2323},{},[2324],{"type":23,"value":2325},"Įvykdžius tokį kodą, kuriame trinamo elemento sąraše nėra, išmetama klaida:",{"type":18,"tag":38,"props":2327,"children":2329},{"className":329,"code":2328,"language":23,"meta":43,"style":43},"ValueError: list.remove(x): x not in list\n",[2330],{"type":18,"tag":46,"props":2331,"children":2332},{"__ignoreMap":43},[2333],{"type":18,"tag":50,"props":2334,"children":2335},{"class":52,"line":53},[2336],{"type":18,"tag":50,"props":2337,"children":2338},{},[2339],{"type":23,"value":2328},{"type":18,"tag":19,"props":2341,"children":2342},{},[2343],{"type":23,"value":2344},"Kaip ir kaskart atsiradus klaidai, perskaitykite klaidos žinutę, iš kurios galėsite suprasti, kur padaryta klaida.",{"type":18,"tag":555,"props":2346,"children":2347},{"id":1776},[2348],{"type":23,"value":2349},"pop()",{"type":18,"tag":19,"props":2351,"children":2352},{},[2353,2355,2366],{"type":23,"value":2354},"Metodą ",{"type":18,"tag":46,"props":2356,"children":2357},{"className":40,"language":42,"style":43},[2358,2362],{"type":18,"tag":50,"props":2359,"children":2360},{"style":738},[2361],{"type":23,"value":1776},{"type":18,"tag":50,"props":2363,"children":2364},{"style":69},[2365],{"type":23,"value":1080},{"type":23,"value":2367}," naudosime, kai elementą norėsime pašalinti nurodant indeksą. Tarkime turime sąrašą su daržovėmis ir žinome, kad elementas, kurio indeksas yra 1, yra ne daržovė, todėl jį reikia pašalinti:",{"type":18,"tag":38,"props":2369,"children":2371},{"className":40,"code":2370,"language":42,"meta":43,"style":43},"vegatables = [\"onion\", \"chicken thights\", \"garlic\", \"tomato\", \"potato\"]\nprint(\"Vegatables before pop:\")\nprint(vegatables)\n\nvegatables.pop(1)\nprint(\"Vegatables after popping element (index 1):\")\nprint(vegatables)\n",[2372],{"type":18,"tag":46,"props":2373,"children":2374},{"__ignoreMap":43},[2375,2476,2504,2524,2531,2558,2586],{"type":18,"tag":50,"props":2376,"children":2377},{"class":52,"line":53},[2378,2383,2387,2391,2395,2400,2404,2408,2412,2417,2421,2425,2429,2434,2438,2442,2446,2451,2455,2459,2463,2468,2472],{"type":18,"tag":50,"props":2379,"children":2380},{"style":57},[2381],{"type":23,"value":2382},"vegatables ",{"type":18,"tag":50,"props":2384,"children":2385},{"style":63},[2386],{"type":23,"value":66},{"type":18,"tag":50,"props":2388,"children":2389},{"style":69},[2390],{"type":23,"value":72},{"type":18,"tag":50,"props":2392,"children":2393},{"style":75},[2394],{"type":23,"value":78},{"type":18,"tag":50,"props":2396,"children":2397},{"style":81},[2398],{"type":23,"value":2399},"onion",{"type":18,"tag":50,"props":2401,"children":2402},{"style":75},[2403],{"type":23,"value":78},{"type":18,"tag":50,"props":2405,"children":2406},{"style":69},[2407],{"type":23,"value":93},{"type":18,"tag":50,"props":2409,"children":2410},{"style":75},[2411],{"type":23,"value":98},{"type":18,"tag":50,"props":2413,"children":2414},{"style":81},[2415],{"type":23,"value":2416},"chicken thights",{"type":18,"tag":50,"props":2418,"children":2419},{"style":75},[2420],{"type":23,"value":78},{"type":18,"tag":50,"props":2422,"children":2423},{"style":69},[2424],{"type":23,"value":93},{"type":18,"tag":50,"props":2426,"children":2427},{"style":75},[2428],{"type":23,"value":98},{"type":18,"tag":50,"props":2430,"children":2431},{"style":81},[2432],{"type":23,"value":2433},"garlic",{"type":18,"tag":50,"props":2435,"children":2436},{"style":75},[2437],{"type":23,"value":78},{"type":18,"tag":50,"props":2439,"children":2440},{"style":69},[2441],{"type":23,"value":93},{"type":18,"tag":50,"props":2443,"children":2444},{"style":75},[2445],{"type":23,"value":98},{"type":18,"tag":50,"props":2447,"children":2448},{"style":81},[2449],{"type":23,"value":2450},"tomato",{"type":18,"tag":50,"props":2452,"children":2453},{"style":75},[2454],{"type":23,"value":78},{"type":18,"tag":50,"props":2456,"children":2457},{"style":69},[2458],{"type":23,"value":93},{"type":18,"tag":50,"props":2460,"children":2461},{"style":75},[2462],{"type":23,"value":98},{"type":18,"tag":50,"props":2464,"children":2465},{"style":81},[2466],{"type":23,"value":2467},"potato",{"type":18,"tag":50,"props":2469,"children":2470},{"style":75},[2471],{"type":23,"value":78},{"type":18,"tag":50,"props":2473,"children":2474},{"style":69},[2475],{"type":23,"value":163},{"type":18,"tag":50,"props":2477,"children":2478},{"class":52,"line":166},[2479,2483,2487,2491,2496,2500],{"type":18,"tag":50,"props":2480,"children":2481},{"style":170},[2482],{"type":23,"value":173},{"type":18,"tag":50,"props":2484,"children":2485},{"style":69},[2486],{"type":23,"value":178},{"type":18,"tag":50,"props":2488,"children":2489},{"style":75},[2490],{"type":23,"value":78},{"type":18,"tag":50,"props":2492,"children":2493},{"style":81},[2494],{"type":23,"value":2495},"Vegatables before pop:",{"type":18,"tag":50,"props":2497,"children":2498},{"style":75},[2499],{"type":23,"value":78},{"type":18,"tag":50,"props":2501,"children":2502},{"style":69},[2503],{"type":23,"value":196},{"type":18,"tag":50,"props":2505,"children":2506},{"class":52,"line":199},[2507,2511,2515,2520],{"type":18,"tag":50,"props":2508,"children":2509},{"style":170},[2510],{"type":23,"value":173},{"type":18,"tag":50,"props":2512,"children":2513},{"style":69},[2514],{"type":23,"value":178},{"type":18,"tag":50,"props":2516,"children":2517},{"style":211},[2518],{"type":23,"value":2519},"vegatables",{"type":18,"tag":50,"props":2521,"children":2522},{"style":69},[2523],{"type":23,"value":196},{"type":18,"tag":50,"props":2525,"children":2526},{"class":52,"line":221},[2527],{"type":18,"tag":50,"props":2528,"children":2529},{"emptyLinePlaceholder":225},[2530],{"type":23,"value":228},{"type":18,"tag":50,"props":2532,"children":2533},{"class":52,"line":231},[2534,2538,2542,2546,2550,2554],{"type":18,"tag":50,"props":2535,"children":2536},{"style":57},[2537],{"type":23,"value":2519},{"type":18,"tag":50,"props":2539,"children":2540},{"style":69},[2541],{"type":23,"value":735},{"type":18,"tag":50,"props":2543,"children":2544},{"style":738},[2545],{"type":23,"value":1776},{"type":18,"tag":50,"props":2547,"children":2548},{"style":69},[2549],{"type":23,"value":178},{"type":18,"tag":50,"props":2551,"children":2552},{"style":1267},[2553],{"type":23,"value":248},{"type":18,"tag":50,"props":2555,"children":2556},{"style":69},[2557],{"type":23,"value":196},{"type":18,"tag":50,"props":2559,"children":2560},{"class":52,"line":275},[2561,2565,2569,2573,2578,2582],{"type":18,"tag":50,"props":2562,"children":2563},{"style":170},[2564],{"type":23,"value":173},{"type":18,"tag":50,"props":2566,"children":2567},{"style":69},[2568],{"type":23,"value":178},{"type":18,"tag":50,"props":2570,"children":2571},{"style":75},[2572],{"type":23,"value":78},{"type":18,"tag":50,"props":2574,"children":2575},{"style":81},[2576],{"type":23,"value":2577},"Vegatables after popping element (index 1):",{"type":18,"tag":50,"props":2579,"children":2580},{"style":75},[2581],{"type":23,"value":78},{"type":18,"tag":50,"props":2583,"children":2584},{"style":69},[2585],{"type":23,"value":196},{"type":18,"tag":50,"props":2587,"children":2588},{"class":52,"line":304},[2589,2593,2597,2601],{"type":18,"tag":50,"props":2590,"children":2591},{"style":170},[2592],{"type":23,"value":173},{"type":18,"tag":50,"props":2594,"children":2595},{"style":69},[2596],{"type":23,"value":178},{"type":18,"tag":50,"props":2598,"children":2599},{"style":211},[2600],{"type":23,"value":2519},{"type":18,"tag":50,"props":2602,"children":2603},{"style":69},[2604],{"type":23,"value":196},{"type":18,"tag":19,"props":2606,"children":2607},{},[2608],{"type":23,"value":2131},{"type":18,"tag":38,"props":2610,"children":2612},{"className":329,"code":2611,"language":23,"meta":43,"style":43},"Vegatables before pop:\n['onion', 'chicken thights', 'garlic', 'tomato', 'potato']\nVegatables after popping element (index 1):\n['onion', 'garlic', 'tomato', 'potato']\n",[2613],{"type":18,"tag":46,"props":2614,"children":2615},{"__ignoreMap":43},[2616,2624,2632,2640],{"type":18,"tag":50,"props":2617,"children":2618},{"class":52,"line":53},[2619],{"type":18,"tag":50,"props":2620,"children":2621},{},[2622],{"type":23,"value":2623},"Vegatables before pop:\n",{"type":18,"tag":50,"props":2625,"children":2626},{"class":52,"line":166},[2627],{"type":18,"tag":50,"props":2628,"children":2629},{},[2630],{"type":23,"value":2631},"['onion', 'chicken thights', 'garlic', 'tomato', 'potato']\n",{"type":18,"tag":50,"props":2633,"children":2634},{"class":52,"line":199},[2635],{"type":18,"tag":50,"props":2636,"children":2637},{},[2638],{"type":23,"value":2639},"Vegatables after popping element (index 1):\n",{"type":18,"tag":50,"props":2641,"children":2642},{"class":52,"line":221},[2643],{"type":18,"tag":50,"props":2644,"children":2645},{},[2646],{"type":23,"value":2647},"['onion', 'garlic', 'tomato', 'potato']\n",{"type":18,"tag":26,"props":2649,"children":2651},{"id":2650},"užduotys",[2652],{"type":23,"value":2653},"Užduotys",{"type":18,"tag":555,"props":2655,"children":2657},{"id":2656},"_1-skaičiai-dalūs-iš-7",[2658],{"type":23,"value":2659},"1. Skaičiai dalūs iš 7",{"type":18,"tag":19,"props":2661,"children":2662},{},[2663,2665,2672,2674,2681,2683,2690,2692,2699],{"type":23,"value":2664},"Sukurkite sąrašą skaičių nuo ",{"type":18,"tag":46,"props":2666,"children":2667},{"className":40,"language":42,"style":43},[2668],{"type":18,"tag":50,"props":2669,"children":2670},{"style":57},[2671],{"type":23,"value":910},{"type":23,"value":2673},"(įskaitant) iki ",{"type":18,"tag":46,"props":2675,"children":2676},{"className":40,"language":42,"style":43},[2677],{"type":18,"tag":50,"props":2678,"children":2679},{"style":57},[2680],{"type":23,"value":946},{"type":23,"value":2682},"(įskaitant), kurie dalijasi be liekanos iš 7. Skaičius ",{"type":18,"tag":46,"props":2684,"children":2685},{"className":40,"language":42,"style":43},[2686],{"type":18,"tag":50,"props":2687,"children":2688},{"style":57},[2689],{"type":23,"value":910},{"type":23,"value":2691}," iki ",{"type":18,"tag":46,"props":2693,"children":2694},{"className":40,"language":42,"style":43},[2695],{"type":18,"tag":50,"props":2696,"children":2697},{"style":57},[2698],{"type":23,"value":946},{"type":23,"value":2700}," turi įvesti programos naudotojas.",{"type":18,"tag":555,"props":2702,"children":2704},{"id":2703},"_2-skaičių-pašalinimas",[2705],{"type":23,"value":2706},"2. Skaičių pašalinimas",{"type":18,"tag":19,"props":2708,"children":2709},{},[2710],{"type":23,"value":2711},"Sukurkite programą, kuri iš sąrašo pašalintų skaičius, kurie yra mažesni negu nurodytas (įvestas iš konsolės). Nurodykite kiek skaičių buvo pašalinta iš sąrašo.",{"type":18,"tag":19,"props":2713,"children":2714},{},[2715],{"type":23,"value":2716},"Programa turi pabaigti darbą, jeigu įvestis (tekstas) nėra skaičius arba (sudėtingiau) iš naujo paprašyti, kad vartotojas įvestų skaičių.",{"type":18,"tag":19,"props":2718,"children":2719},{},[2720],{"type":23,"value":2721},"Programos išvesties pavyzdys:",{"type":18,"tag":38,"props":2723,"children":2725},{"className":329,"code":2724,"language":23,"meta":43,"style":43},"Initial list:\n[10, 25, 25.55, 200, -10, 55]\nInput threshold number: 25\n\n2 numbers were removed:\n[25, 25.55, 200, 55]\n",[2726],{"type":18,"tag":46,"props":2727,"children":2728},{"__ignoreMap":43},[2729,2737,2745,2753,2760,2768],{"type":18,"tag":50,"props":2730,"children":2731},{"class":52,"line":53},[2732],{"type":18,"tag":50,"props":2733,"children":2734},{},[2735],{"type":23,"value":2736},"Initial list:\n",{"type":18,"tag":50,"props":2738,"children":2739},{"class":52,"line":166},[2740],{"type":18,"tag":50,"props":2741,"children":2742},{},[2743],{"type":23,"value":2744},"[10, 25, 25.55, 200, -10, 55]\n",{"type":18,"tag":50,"props":2746,"children":2747},{"class":52,"line":199},[2748],{"type":18,"tag":50,"props":2749,"children":2750},{},[2751],{"type":23,"value":2752},"Input threshold number: 25\n",{"type":18,"tag":50,"props":2754,"children":2755},{"class":52,"line":221},[2756],{"type":18,"tag":50,"props":2757,"children":2758},{"emptyLinePlaceholder":225},[2759],{"type":23,"value":228},{"type":18,"tag":50,"props":2761,"children":2762},{"class":52,"line":231},[2763],{"type":18,"tag":50,"props":2764,"children":2765},{},[2766],{"type":23,"value":2767},"2 numbers were removed:\n",{"type":18,"tag":50,"props":2769,"children":2770},{"class":52,"line":275},[2771],{"type":18,"tag":50,"props":2772,"children":2773},{},[2774],{"type":23,"value":2775},"[25, 25.55, 200, 55]\n",{"type":18,"tag":555,"props":2777,"children":2779},{"id":2778},"_3-darbų-sąrašas",[2780],{"type":23,"value":2781},"3. Darbų sąrašas",{"type":18,"tag":19,"props":2783,"children":2784},{},[2785],{"type":23,"value":2786},"Sukurkite programą, kuri pašalintų atliktą darbą (pagal eilės numerį) iš darbų sąrašo.",{"type":18,"tag":19,"props":2788,"children":2789},{},[2790],{"type":23,"value":2791},"Pavyzdinis darbų sąrašas:",{"type":18,"tag":38,"props":2793,"children":2795},{"className":40,"code":2794,"language":42,"meta":43,"style":43},"todo_list = [\n    \"Buy groceries\",\n    \"Finish homework\",\n    \"Call mom\",\n    \"Clean the house\",\n    \"Pay electricity bill\",\n    \"Walk the dog\",\n    \"Read a book for 30 minutes\",\n    \"Prepare dinner\",\n    \"Water the plants\",\n    \"Schedule a meeting with the team\"\n]\n",[2796],{"type":18,"tag":46,"props":2797,"children":2798},{"__ignoreMap":43},[2799,2816,2838,2858,2878,2898,2918,2938,2958,2978,2999,3016],{"type":18,"tag":50,"props":2800,"children":2801},{"class":52,"line":53},[2802,2807,2811],{"type":18,"tag":50,"props":2803,"children":2804},{"style":57},[2805],{"type":23,"value":2806},"todo_list ",{"type":18,"tag":50,"props":2808,"children":2809},{"style":63},[2810],{"type":23,"value":66},{"type":18,"tag":50,"props":2812,"children":2813},{"style":69},[2814],{"type":23,"value":2815}," [\n",{"type":18,"tag":50,"props":2817,"children":2818},{"class":52,"line":166},[2819,2824,2829,2833],{"type":18,"tag":50,"props":2820,"children":2821},{"style":75},[2822],{"type":23,"value":2823},"    \"",{"type":18,"tag":50,"props":2825,"children":2826},{"style":81},[2827],{"type":23,"value":2828},"Buy groceries",{"type":18,"tag":50,"props":2830,"children":2831},{"style":75},[2832],{"type":23,"value":78},{"type":18,"tag":50,"props":2834,"children":2835},{"style":69},[2836],{"type":23,"value":2837},",\n",{"type":18,"tag":50,"props":2839,"children":2840},{"class":52,"line":199},[2841,2845,2850,2854],{"type":18,"tag":50,"props":2842,"children":2843},{"style":75},[2844],{"type":23,"value":2823},{"type":18,"tag":50,"props":2846,"children":2847},{"style":81},[2848],{"type":23,"value":2849},"Finish homework",{"type":18,"tag":50,"props":2851,"children":2852},{"style":75},[2853],{"type":23,"value":78},{"type":18,"tag":50,"props":2855,"children":2856},{"style":69},[2857],{"type":23,"value":2837},{"type":18,"tag":50,"props":2859,"children":2860},{"class":52,"line":221},[2861,2865,2870,2874],{"type":18,"tag":50,"props":2862,"children":2863},{"style":75},[2864],{"type":23,"value":2823},{"type":18,"tag":50,"props":2866,"children":2867},{"style":81},[2868],{"type":23,"value":2869},"Call mom",{"type":18,"tag":50,"props":2871,"children":2872},{"style":75},[2873],{"type":23,"value":78},{"type":18,"tag":50,"props":2875,"children":2876},{"style":69},[2877],{"type":23,"value":2837},{"type":18,"tag":50,"props":2879,"children":2880},{"class":52,"line":231},[2881,2885,2890,2894],{"type":18,"tag":50,"props":2882,"children":2883},{"style":75},[2884],{"type":23,"value":2823},{"type":18,"tag":50,"props":2886,"children":2887},{"style":81},[2888],{"type":23,"value":2889},"Clean the house",{"type":18,"tag":50,"props":2891,"children":2892},{"style":75},[2893],{"type":23,"value":78},{"type":18,"tag":50,"props":2895,"children":2896},{"style":69},[2897],{"type":23,"value":2837},{"type":18,"tag":50,"props":2899,"children":2900},{"class":52,"line":275},[2901,2905,2910,2914],{"type":18,"tag":50,"props":2902,"children":2903},{"style":75},[2904],{"type":23,"value":2823},{"type":18,"tag":50,"props":2906,"children":2907},{"style":81},[2908],{"type":23,"value":2909},"Pay electricity bill",{"type":18,"tag":50,"props":2911,"children":2912},{"style":75},[2913],{"type":23,"value":78},{"type":18,"tag":50,"props":2915,"children":2916},{"style":69},[2917],{"type":23,"value":2837},{"type":18,"tag":50,"props":2919,"children":2920},{"class":52,"line":304},[2921,2925,2930,2934],{"type":18,"tag":50,"props":2922,"children":2923},{"style":75},[2924],{"type":23,"value":2823},{"type":18,"tag":50,"props":2926,"children":2927},{"style":81},[2928],{"type":23,"value":2929},"Walk the dog",{"type":18,"tag":50,"props":2931,"children":2932},{"style":75},[2933],{"type":23,"value":78},{"type":18,"tag":50,"props":2935,"children":2936},{"style":69},[2937],{"type":23,"value":2837},{"type":18,"tag":50,"props":2939,"children":2940},{"class":52,"line":1595},[2941,2945,2950,2954],{"type":18,"tag":50,"props":2942,"children":2943},{"style":75},[2944],{"type":23,"value":2823},{"type":18,"tag":50,"props":2946,"children":2947},{"style":81},[2948],{"type":23,"value":2949},"Read a book for 30 minutes",{"type":18,"tag":50,"props":2951,"children":2952},{"style":75},[2953],{"type":23,"value":78},{"type":18,"tag":50,"props":2955,"children":2956},{"style":69},[2957],{"type":23,"value":2837},{"type":18,"tag":50,"props":2959,"children":2960},{"class":52,"line":1644},[2961,2965,2970,2974],{"type":18,"tag":50,"props":2962,"children":2963},{"style":75},[2964],{"type":23,"value":2823},{"type":18,"tag":50,"props":2966,"children":2967},{"style":81},[2968],{"type":23,"value":2969},"Prepare dinner",{"type":18,"tag":50,"props":2971,"children":2972},{"style":75},[2973],{"type":23,"value":78},{"type":18,"tag":50,"props":2975,"children":2976},{"style":69},[2977],{"type":23,"value":2837},{"type":18,"tag":50,"props":2979,"children":2981},{"class":52,"line":2980},10,[2982,2986,2991,2995],{"type":18,"tag":50,"props":2983,"children":2984},{"style":75},[2985],{"type":23,"value":2823},{"type":18,"tag":50,"props":2987,"children":2988},{"style":81},[2989],{"type":23,"value":2990},"Water the plants",{"type":18,"tag":50,"props":2992,"children":2993},{"style":75},[2994],{"type":23,"value":78},{"type":18,"tag":50,"props":2996,"children":2997},{"style":69},[2998],{"type":23,"value":2837},{"type":18,"tag":50,"props":3000,"children":3002},{"class":52,"line":3001},11,[3003,3007,3012],{"type":18,"tag":50,"props":3004,"children":3005},{"style":75},[3006],{"type":23,"value":2823},{"type":18,"tag":50,"props":3008,"children":3009},{"style":81},[3010],{"type":23,"value":3011},"Schedule a meeting with the team",{"type":18,"tag":50,"props":3013,"children":3014},{"style":75},[3015],{"type":23,"value":272},{"type":18,"tag":50,"props":3017,"children":3019},{"class":52,"line":3018},12,[3020],{"type":18,"tag":50,"props":3021,"children":3022},{"style":69},[3023],{"type":23,"value":163},{"type":18,"tag":19,"props":3025,"children":3026},{},[3027],{"type":23,"value":2721},{"type":18,"tag":38,"props":3029,"children":3031},{"className":329,"code":3030,"language":23,"meta":43,"style":43},"Your todo list:\n0. Buy groceries\n1. Finish homework\n2. Call mom\n3. Clean the house\n4. Pay electricity bill\n5. Walk the dog\n6. Read a book for 30 minutes\n7. Prepare dinner\n8. Water the plants\n9. Schedule a meeting with the team\n\nSelect the number of the task you have completed: 3\n\nUpdated to-do list:\n0. Buy groceries\n1. Finish homework\n2. Call mom\n3. Pay electricity bill\n4. Walk the dog\n5. Read a book for 30 minutes\n6. Prepare dinner\n7. Water the plants\n8. Schedule a meeting with the team\n",[3032],{"type":18,"tag":46,"props":3033,"children":3034},{"__ignoreMap":43},[3035,3043,3051,3059,3067,3075,3083,3091,3099,3107,3115,3123,3130,3139,3147,3156,3164,3172,3180,3189,3198,3207,3216,3225],{"type":18,"tag":50,"props":3036,"children":3037},{"class":52,"line":53},[3038],{"type":18,"tag":50,"props":3039,"children":3040},{},[3041],{"type":23,"value":3042},"Your todo list:\n",{"type":18,"tag":50,"props":3044,"children":3045},{"class":52,"line":166},[3046],{"type":18,"tag":50,"props":3047,"children":3048},{},[3049],{"type":23,"value":3050},"0. Buy groceries\n",{"type":18,"tag":50,"props":3052,"children":3053},{"class":52,"line":199},[3054],{"type":18,"tag":50,"props":3055,"children":3056},{},[3057],{"type":23,"value":3058},"1. Finish homework\n",{"type":18,"tag":50,"props":3060,"children":3061},{"class":52,"line":221},[3062],{"type":18,"tag":50,"props":3063,"children":3064},{},[3065],{"type":23,"value":3066},"2. Call mom\n",{"type":18,"tag":50,"props":3068,"children":3069},{"class":52,"line":231},[3070],{"type":18,"tag":50,"props":3071,"children":3072},{},[3073],{"type":23,"value":3074},"3. Clean the house\n",{"type":18,"tag":50,"props":3076,"children":3077},{"class":52,"line":275},[3078],{"type":18,"tag":50,"props":3079,"children":3080},{},[3081],{"type":23,"value":3082},"4. Pay electricity bill\n",{"type":18,"tag":50,"props":3084,"children":3085},{"class":52,"line":304},[3086],{"type":18,"tag":50,"props":3087,"children":3088},{},[3089],{"type":23,"value":3090},"5. Walk the dog\n",{"type":18,"tag":50,"props":3092,"children":3093},{"class":52,"line":1595},[3094],{"type":18,"tag":50,"props":3095,"children":3096},{},[3097],{"type":23,"value":3098},"6. Read a book for 30 minutes\n",{"type":18,"tag":50,"props":3100,"children":3101},{"class":52,"line":1644},[3102],{"type":18,"tag":50,"props":3103,"children":3104},{},[3105],{"type":23,"value":3106},"7. Prepare dinner\n",{"type":18,"tag":50,"props":3108,"children":3109},{"class":52,"line":2980},[3110],{"type":18,"tag":50,"props":3111,"children":3112},{},[3113],{"type":23,"value":3114},"8. Water the plants\n",{"type":18,"tag":50,"props":3116,"children":3117},{"class":52,"line":3001},[3118],{"type":18,"tag":50,"props":3119,"children":3120},{},[3121],{"type":23,"value":3122},"9. Schedule a meeting with the team\n",{"type":18,"tag":50,"props":3124,"children":3125},{"class":52,"line":3018},[3126],{"type":18,"tag":50,"props":3127,"children":3128},{"emptyLinePlaceholder":225},[3129],{"type":23,"value":228},{"type":18,"tag":50,"props":3131,"children":3133},{"class":52,"line":3132},13,[3134],{"type":18,"tag":50,"props":3135,"children":3136},{},[3137],{"type":23,"value":3138},"Select the number of the task you have completed: 3\n",{"type":18,"tag":50,"props":3140,"children":3142},{"class":52,"line":3141},14,[3143],{"type":18,"tag":50,"props":3144,"children":3145},{"emptyLinePlaceholder":225},[3146],{"type":23,"value":228},{"type":18,"tag":50,"props":3148,"children":3150},{"class":52,"line":3149},15,[3151],{"type":18,"tag":50,"props":3152,"children":3153},{},[3154],{"type":23,"value":3155},"Updated to-do list:\n",{"type":18,"tag":50,"props":3157,"children":3159},{"class":52,"line":3158},16,[3160],{"type":18,"tag":50,"props":3161,"children":3162},{},[3163],{"type":23,"value":3050},{"type":18,"tag":50,"props":3165,"children":3167},{"class":52,"line":3166},17,[3168],{"type":18,"tag":50,"props":3169,"children":3170},{},[3171],{"type":23,"value":3058},{"type":18,"tag":50,"props":3173,"children":3175},{"class":52,"line":3174},18,[3176],{"type":18,"tag":50,"props":3177,"children":3178},{},[3179],{"type":23,"value":3066},{"type":18,"tag":50,"props":3181,"children":3183},{"class":52,"line":3182},19,[3184],{"type":18,"tag":50,"props":3185,"children":3186},{},[3187],{"type":23,"value":3188},"3. Pay electricity bill\n",{"type":18,"tag":50,"props":3190,"children":3192},{"class":52,"line":3191},20,[3193],{"type":18,"tag":50,"props":3194,"children":3195},{},[3196],{"type":23,"value":3197},"4. Walk the dog\n",{"type":18,"tag":50,"props":3199,"children":3201},{"class":52,"line":3200},21,[3202],{"type":18,"tag":50,"props":3203,"children":3204},{},[3205],{"type":23,"value":3206},"5. Read a book for 30 minutes\n",{"type":18,"tag":50,"props":3208,"children":3210},{"class":52,"line":3209},22,[3211],{"type":18,"tag":50,"props":3212,"children":3213},{},[3214],{"type":23,"value":3215},"6. Prepare dinner\n",{"type":18,"tag":50,"props":3217,"children":3219},{"class":52,"line":3218},23,[3220],{"type":18,"tag":50,"props":3221,"children":3222},{},[3223],{"type":23,"value":3224},"7. Water the plants\n",{"type":18,"tag":50,"props":3226,"children":3228},{"class":52,"line":3227},24,[3229],{"type":18,"tag":50,"props":3230,"children":3231},{},[3232],{"type":23,"value":3233},"8. Schedule a meeting with the team\n",{"type":18,"tag":555,"props":3235,"children":3237},{"id":3236},"_4-savaitės-temperatūra",[3238],{"type":23,"value":3239},"4. Savaitės temperatūra",{"type":18,"tag":19,"props":3241,"children":3242},{},[3243],{"type":23,"value":3244},"Sukurkite programą, kurioje apskaičiuojamas savaitės temperatūros vidurkis, įvedant vartotojui temperatūra į konsolinį langą.",{"type":18,"tag":19,"props":3246,"children":3247},{},[3248],{"type":23,"value":3249},"Programos išvestis galėtų atrodyti taip:",{"type":18,"tag":38,"props":3251,"children":3253},{"className":329,"code":3252,"language":23,"meta":43,"style":43},"Enter the temperature for day 1: 31\nEnter the temperature for day 2: 28\nEnter the temperature for day 3: 25\nEnter the temperature for day 4: 25\nEnter the temperature for day 5: 27\nEnter the temperature for day 6: 22\nEnter the temperature for day 7: 30\nTemperatures for the week: [31.0, 28.0, 25.0, 25.0, 27.0, 22.0, 30.0]\nAverage temperature: 26.86\n",[3254],{"type":18,"tag":46,"props":3255,"children":3256},{"__ignoreMap":43},[3257,3265,3273,3281,3289,3297,3305,3313,3321],{"type":18,"tag":50,"props":3258,"children":3259},{"class":52,"line":53},[3260],{"type":18,"tag":50,"props":3261,"children":3262},{},[3263],{"type":23,"value":3264},"Enter the temperature for day 1: 31\n",{"type":18,"tag":50,"props":3266,"children":3267},{"class":52,"line":166},[3268],{"type":18,"tag":50,"props":3269,"children":3270},{},[3271],{"type":23,"value":3272},"Enter the temperature for day 2: 28\n",{"type":18,"tag":50,"props":3274,"children":3275},{"class":52,"line":199},[3276],{"type":18,"tag":50,"props":3277,"children":3278},{},[3279],{"type":23,"value":3280},"Enter the temperature for day 3: 25\n",{"type":18,"tag":50,"props":3282,"children":3283},{"class":52,"line":221},[3284],{"type":18,"tag":50,"props":3285,"children":3286},{},[3287],{"type":23,"value":3288},"Enter the temperature for day 4: 25\n",{"type":18,"tag":50,"props":3290,"children":3291},{"class":52,"line":231},[3292],{"type":18,"tag":50,"props":3293,"children":3294},{},[3295],{"type":23,"value":3296},"Enter the temperature for day 5: 27\n",{"type":18,"tag":50,"props":3298,"children":3299},{"class":52,"line":275},[3300],{"type":18,"tag":50,"props":3301,"children":3302},{},[3303],{"type":23,"value":3304},"Enter the temperature for day 6: 22\n",{"type":18,"tag":50,"props":3306,"children":3307},{"class":52,"line":304},[3308],{"type":18,"tag":50,"props":3309,"children":3310},{},[3311],{"type":23,"value":3312},"Enter the temperature for day 7: 30\n",{"type":18,"tag":50,"props":3314,"children":3315},{"class":52,"line":1595},[3316],{"type":18,"tag":50,"props":3317,"children":3318},{},[3319],{"type":23,"value":3320},"Temperatures for the week: [31.0, 28.0, 25.0, 25.0, 27.0, 22.0, 30.0]\n",{"type":18,"tag":50,"props":3322,"children":3323},{"class":52,"line":1644},[3324],{"type":18,"tag":50,"props":3325,"children":3326},{},[3327],{"type":23,"value":3328},"Average temperature: 26.86\n",{"type":18,"tag":555,"props":3330,"children":3332},{"id":3331},"_5-žaidimas-akmuo-žirklės-popierius",[3333],{"type":23,"value":3334},"5. Žaidimas - akmuo, žirklės, popierius",{"type":18,"tag":19,"props":3336,"children":3337},{},[3338],{"type":23,"value":3339},"Žaidimo esmė - pasirinkti vieną iš trijų ženklų ir laimėti prieš kompiuterį",{"type":18,"tag":19,"props":3341,"children":3342},{},[3343],{"type":23,"value":3344},"Žaidimo reikalavimai:",{"type":18,"tag":3346,"props":3347,"children":3348},"ul",{},[3349,3355,3360],{"type":18,"tag":3350,"props":3351,"children":3352},"li",{},[3353],{"type":23,"value":3354},"Žaidimas nesibaigiantis, žaidžiama, kol žaidėjas išjungia žaidimą arba pasirenką specialų simbolį (jūsų sugalvotas, pvz.: 'Q');",{"type":18,"tag":3350,"props":3356,"children":3357},{},[3358],{"type":23,"value":3359},"Po kiekvienio raundo, parodoma statistika, kiek žaidėjas kartų laimėjo prieš kompiuterį ir kiek buvo raundų;",{"type":18,"tag":3350,"props":3361,"children":3362},{},[3363],{"type":23,"value":3364},"Įvedus specialių simbolį (pvz.: 'H'), parodama visų raundų istorija, pvz.: \"1. žirklės - popierius; 2. žirklės - akmuo; 3. popierius - akmuo...\";",{"type":18,"tag":19,"props":3366,"children":3367},{},[3368],{"type":23,"value":3369},"Taisyklės:",{"type":18,"tag":3346,"props":3371,"children":3372},{},[3373,3378,3383],{"type":18,"tag":3350,"props":3374,"children":3375},{},[3376],{"type":23,"value":3377},"Akmuo laimi prieš žirkles;",{"type":18,"tag":3350,"props":3379,"children":3380},{},[3381],{"type":23,"value":3382},"Žirklės laimi prieš popierių;",{"type":18,"tag":3350,"props":3384,"children":3385},{},[3386],{"type":23,"value":3387},"Popierius laimi prieš akmenį;",{"type":18,"tag":19,"props":3389,"children":3390},{},[3391],{"type":23,"value":3392},"Vietoje rašymo viso ženklo žodžio į konsolę, žaidėjas galėtų pasirinkti skaičių nuo 1-3, kurie reprezentuotų akmenį, žirkles ir popierių. Žaidimo pradžia konsolėje galėtų atrodyti taip:",{"type":18,"tag":38,"props":3394,"children":3396},{"className":329,"code":3395,"language":23,"meta":43,"style":43},"Žaidimas - akmuo, žirklės, popierius\n\nInstrukcija:\nKiekviename raunde kompiuteris sugalvos savo ženklą, o jūs su skaičiais turite pasirinkti vieną iš trijų ženklų;\n1 - akmuo\n2 - žirklės\n3 - Popierius\n\nPapildomos komandos:\nq - žaidimo išjungimas\nh - raundų istorija\n\nTaisyklės:\n...\n\nPasirinkite ženklą:\n...\n",[3397],{"type":18,"tag":46,"props":3398,"children":3399},{"__ignoreMap":43},[3400,3408,3415,3423,3431,3439,3447,3455,3462,3470,3478,3486,3493,3501,3509,3516,3524],{"type":18,"tag":50,"props":3401,"children":3402},{"class":52,"line":53},[3403],{"type":18,"tag":50,"props":3404,"children":3405},{},[3406],{"type":23,"value":3407},"Žaidimas - akmuo, žirklės, popierius\n",{"type":18,"tag":50,"props":3409,"children":3410},{"class":52,"line":166},[3411],{"type":18,"tag":50,"props":3412,"children":3413},{"emptyLinePlaceholder":225},[3414],{"type":23,"value":228},{"type":18,"tag":50,"props":3416,"children":3417},{"class":52,"line":199},[3418],{"type":18,"tag":50,"props":3419,"children":3420},{},[3421],{"type":23,"value":3422},"Instrukcija:\n",{"type":18,"tag":50,"props":3424,"children":3425},{"class":52,"line":221},[3426],{"type":18,"tag":50,"props":3427,"children":3428},{},[3429],{"type":23,"value":3430},"Kiekviename raunde kompiuteris sugalvos savo ženklą, o jūs su skaičiais turite pasirinkti vieną iš trijų ženklų;\n",{"type":18,"tag":50,"props":3432,"children":3433},{"class":52,"line":231},[3434],{"type":18,"tag":50,"props":3435,"children":3436},{},[3437],{"type":23,"value":3438},"1 - akmuo\n",{"type":18,"tag":50,"props":3440,"children":3441},{"class":52,"line":275},[3442],{"type":18,"tag":50,"props":3443,"children":3444},{},[3445],{"type":23,"value":3446},"2 - žirklės\n",{"type":18,"tag":50,"props":3448,"children":3449},{"class":52,"line":304},[3450],{"type":18,"tag":50,"props":3451,"children":3452},{},[3453],{"type":23,"value":3454},"3 - Popierius\n",{"type":18,"tag":50,"props":3456,"children":3457},{"class":52,"line":1595},[3458],{"type":18,"tag":50,"props":3459,"children":3460},{"emptyLinePlaceholder":225},[3461],{"type":23,"value":228},{"type":18,"tag":50,"props":3463,"children":3464},{"class":52,"line":1644},[3465],{"type":18,"tag":50,"props":3466,"children":3467},{},[3468],{"type":23,"value":3469},"Papildomos komandos:\n",{"type":18,"tag":50,"props":3471,"children":3472},{"class":52,"line":2980},[3473],{"type":18,"tag":50,"props":3474,"children":3475},{},[3476],{"type":23,"value":3477},"q - žaidimo išjungimas\n",{"type":18,"tag":50,"props":3479,"children":3480},{"class":52,"line":3001},[3481],{"type":18,"tag":50,"props":3482,"children":3483},{},[3484],{"type":23,"value":3485},"h - raundų istorija\n",{"type":18,"tag":50,"props":3487,"children":3488},{"class":52,"line":3018},[3489],{"type":18,"tag":50,"props":3490,"children":3491},{"emptyLinePlaceholder":225},[3492],{"type":23,"value":228},{"type":18,"tag":50,"props":3494,"children":3495},{"class":52,"line":3132},[3496],{"type":18,"tag":50,"props":3497,"children":3498},{},[3499],{"type":23,"value":3500},"Taisyklės:\n",{"type":18,"tag":50,"props":3502,"children":3503},{"class":52,"line":3141},[3504],{"type":18,"tag":50,"props":3505,"children":3506},{},[3507],{"type":23,"value":3508},"...\n",{"type":18,"tag":50,"props":3510,"children":3511},{"class":52,"line":3149},[3512],{"type":18,"tag":50,"props":3513,"children":3514},{"emptyLinePlaceholder":225},[3515],{"type":23,"value":228},{"type":18,"tag":50,"props":3517,"children":3518},{"class":52,"line":3158},[3519],{"type":18,"tag":50,"props":3520,"children":3521},{},[3522],{"type":23,"value":3523},"Pasirinkite ženklą:\n",{"type":18,"tag":50,"props":3525,"children":3526},{"class":52,"line":3166},[3527],{"type":18,"tag":50,"props":3528,"children":3529},{},[3530],{"type":23,"value":3508},{"type":18,"tag":3532,"props":3533,"children":3536},"prose-alert",{"icon":3534,"type":3535},"mdi-information-box-outline","info",[3537,3551],{"type":18,"tag":19,"props":3538,"children":3539},{},[3540,3542,3550],{"type":23,"value":3541},"Vieno simbolio įvedimui (klaviatūros spaudimo registravimui) galite panaudoti ",{"type":18,"tag":910,"props":3543,"children":3547},{"href":3544,"rel":3545},"https://github.com/magmax/python-readchar",[3546],"nofollow",[3548],{"type":23,"value":3549},"python-readchar biblioteką",{"type":23,"value":735},{"type":18,"tag":3552,"props":3553,"children":3554},"template",{"v-slot:title":43},[3555],{"type":18,"tag":19,"props":3556,"children":3557},{},[3558],{"type":23,"value":3559},"Motyvuotiems",{"type":18,"tag":555,"props":3561,"children":3563},{"id":3562},"_6-žaidimas-atspėk-skaičių",[3564],{"type":23,"value":3565},"6. Žaidimas - atspėk skaičių",{"type":18,"tag":19,"props":3567,"children":3568},{},[3569],{"type":23,"value":3570},"Žaidimo esmė - atspėti skaičių (sveikąjį), kurį jūsų programa sugeneruoja atsitiktinai.",{"type":18,"tag":19,"props":3572,"children":3573},{},[3574],{"type":23,"value":3344},{"type":18,"tag":3346,"props":3576,"children":3577},{},[3578,3583,3588,3593,3598,3603,3608],{"type":18,"tag":3350,"props":3579,"children":3580},{},[3581],{"type":23,"value":3582},"Turi prasidėti dviejų skaičių įvedimu (konsoliniame lange), pagal kuriuos bus generuojamas skaičius;",{"type":18,"tag":3350,"props":3584,"children":3585},{},[3586],{"type":23,"value":3587},"Spėjimas vykdomas įvedant skaičių į konsolinį langą;",{"type":18,"tag":3350,"props":3589,"children":3590},{},[3591],{"type":23,"value":3592},"Žaidimas turi turėti bandymų skaičių, kuriuos išnaudojus žaidimas pralaimimas;",{"type":18,"tag":3350,"props":3594,"children":3595},{},[3596],{"type":23,"value":3597},"Žaidimas laimimas atspėjus skaičių;",{"type":18,"tag":3350,"props":3599,"children":3600},{},[3601],{"type":23,"value":3602},"Po kiekvieno spėjimo žaidimas turi pranešti, ar įvestas skaičius didesnis ar mažesnis už atsiktiktinį;",{"type":18,"tag":3350,"props":3604,"children":3605},{},[3606],{"type":23,"value":3607},"Žaidimo gale turi būti pavaizduoti visi spėjimai.",{"type":18,"tag":3350,"props":3609,"children":3610},{},[3611],{"type":23,"value":3612},"Papildomas: įvedus kažką kito negu skaičių, programa turi pranešti, kad įvestas tekstas nėra skaičius;",{"type":18,"tag":19,"props":3614,"children":3615},{},[3616],{"type":23,"value":3617},"Žaidimo eiga galėtų atrodyti taip:",{"type":18,"tag":38,"props":3619,"children":3621},{"className":329,"code":3620,"language":23,"meta":43,"style":43},"=========================================\nŽaidimas - atspėkite skaičių\n=========================================\nĮveskite generavimo intervalo pirmąjį skaičių:\n2\n\nĮveskite generavimo intervalo antrajį skaičių:\n143\n----------------------------------------------\nPradėkite spėjimus (nuo 2 iki 143)\n1 bandymas: 4\nNeatspėjote skaičiaus, sugalvotas skaičius didesnis už jūsų bandymo skaičių.\n\n2 bandymas: 143\nNeatspėjote skaičiaus, sugalvotas skaičius mažesnis už jūsų bandymo skaičių.\n\n3. bandymas: 7\nAtspėjote skaičių!\n\nRezultatas: 3/7\nJūsų spėjimai: 4, 143, 7\n",[3622],{"type":18,"tag":46,"props":3623,"children":3624},{"__ignoreMap":43},[3625,3633,3641,3648,3656,3664,3671,3679,3687,3695,3703,3711,3719,3726,3734,3742,3749,3757,3765,3772,3780],{"type":18,"tag":50,"props":3626,"children":3627},{"class":52,"line":53},[3628],{"type":18,"tag":50,"props":3629,"children":3630},{},[3631],{"type":23,"value":3632},"=========================================\n",{"type":18,"tag":50,"props":3634,"children":3635},{"class":52,"line":166},[3636],{"type":18,"tag":50,"props":3637,"children":3638},{},[3639],{"type":23,"value":3640},"Žaidimas - atspėkite skaičių\n",{"type":18,"tag":50,"props":3642,"children":3643},{"class":52,"line":199},[3644],{"type":18,"tag":50,"props":3645,"children":3646},{},[3647],{"type":23,"value":3632},{"type":18,"tag":50,"props":3649,"children":3650},{"class":52,"line":221},[3651],{"type":18,"tag":50,"props":3652,"children":3653},{},[3654],{"type":23,"value":3655},"Įveskite generavimo intervalo pirmąjį skaičių:\n",{"type":18,"tag":50,"props":3657,"children":3658},{"class":52,"line":231},[3659],{"type":18,"tag":50,"props":3660,"children":3661},{},[3662],{"type":23,"value":3663},"2\n",{"type":18,"tag":50,"props":3665,"children":3666},{"class":52,"line":275},[3667],{"type":18,"tag":50,"props":3668,"children":3669},{"emptyLinePlaceholder":225},[3670],{"type":23,"value":228},{"type":18,"tag":50,"props":3672,"children":3673},{"class":52,"line":304},[3674],{"type":18,"tag":50,"props":3675,"children":3676},{},[3677],{"type":23,"value":3678},"Įveskite generavimo intervalo antrajį skaičių:\n",{"type":18,"tag":50,"props":3680,"children":3681},{"class":52,"line":1595},[3682],{"type":18,"tag":50,"props":3683,"children":3684},{},[3685],{"type":23,"value":3686},"143\n",{"type":18,"tag":50,"props":3688,"children":3689},{"class":52,"line":1644},[3690],{"type":18,"tag":50,"props":3691,"children":3692},{},[3693],{"type":23,"value":3694},"----------------------------------------------\n",{"type":18,"tag":50,"props":3696,"children":3697},{"class":52,"line":2980},[3698],{"type":18,"tag":50,"props":3699,"children":3700},{},[3701],{"type":23,"value":3702},"Pradėkite spėjimus (nuo 2 iki 143)\n",{"type":18,"tag":50,"props":3704,"children":3705},{"class":52,"line":3001},[3706],{"type":18,"tag":50,"props":3707,"children":3708},{},[3709],{"type":23,"value":3710},"1 bandymas: 4\n",{"type":18,"tag":50,"props":3712,"children":3713},{"class":52,"line":3018},[3714],{"type":18,"tag":50,"props":3715,"children":3716},{},[3717],{"type":23,"value":3718},"Neatspėjote skaičiaus, sugalvotas skaičius didesnis už jūsų bandymo skaičių.\n",{"type":18,"tag":50,"props":3720,"children":3721},{"class":52,"line":3132},[3722],{"type":18,"tag":50,"props":3723,"children":3724},{"emptyLinePlaceholder":225},[3725],{"type":23,"value":228},{"type":18,"tag":50,"props":3727,"children":3728},{"class":52,"line":3141},[3729],{"type":18,"tag":50,"props":3730,"children":3731},{},[3732],{"type":23,"value":3733},"2 bandymas: 143\n",{"type":18,"tag":50,"props":3735,"children":3736},{"class":52,"line":3149},[3737],{"type":18,"tag":50,"props":3738,"children":3739},{},[3740],{"type":23,"value":3741},"Neatspėjote skaičiaus, sugalvotas skaičius mažesnis už jūsų bandymo skaičių.\n",{"type":18,"tag":50,"props":3743,"children":3744},{"class":52,"line":3158},[3745],{"type":18,"tag":50,"props":3746,"children":3747},{"emptyLinePlaceholder":225},[3748],{"type":23,"value":228},{"type":18,"tag":50,"props":3750,"children":3751},{"class":52,"line":3166},[3752],{"type":18,"tag":50,"props":3753,"children":3754},{},[3755],{"type":23,"value":3756},"3. bandymas: 7\n",{"type":18,"tag":50,"props":3758,"children":3759},{"class":52,"line":3174},[3760],{"type":18,"tag":50,"props":3761,"children":3762},{},[3763],{"type":23,"value":3764},"Atspėjote skaičių!\n",{"type":18,"tag":50,"props":3766,"children":3767},{"class":52,"line":3182},[3768],{"type":18,"tag":50,"props":3769,"children":3770},{"emptyLinePlaceholder":225},[3771],{"type":23,"value":228},{"type":18,"tag":50,"props":3773,"children":3774},{"class":52,"line":3191},[3775],{"type":18,"tag":50,"props":3776,"children":3777},{},[3778],{"type":23,"value":3779},"Rezultatas: 3/7\n",{"type":18,"tag":50,"props":3781,"children":3782},{"class":52,"line":3200},[3783],{"type":18,"tag":50,"props":3784,"children":3785},{},[3786],{"type":23,"value":3787},"Jūsų spėjimai: 4, 143, 7\n",{"type":18,"tag":3789,"props":3790,"children":3791},"style",{},[3792],{"type":23,"value":3793},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":43,"searchDepth":166,"depth":166,"links":3795},[3796,3797,3802,3806],{"id":28,"depth":166,"text":31},{"id":545,"depth":166,"text":548,"children":3798},[3799,3800,3801],{"id":557,"depth":199,"text":560},{"id":1060,"depth":199,"text":1063},{"id":1346,"depth":199,"text":1349},{"id":1746,"depth":166,"text":1749,"children":3803},[3804,3805],{"id":1762,"depth":199,"text":1787},{"id":1776,"depth":199,"text":2349},{"id":2650,"depth":166,"text":2653,"children":3807},[3808,3809,3810,3811,3812,3813],{"id":2656,"depth":199,"text":2659},{"id":2703,"depth":199,"text":2706},{"id":2778,"depth":199,"text":2781},{"id":3236,"depth":199,"text":3239},{"id":3331,"depth":199,"text":3334},{"id":3562,"depth":199,"text":3565},"markdown","content:lt:1.basics:2.lists:3.list_modifcation.md","content","lt/1.basics/2.lists/3.list_modifcation.md","lt/1.basics/2.lists/3.list_modifcation","md",[3821,3824],{"_path":3822,"title":3823},"/basics/lists/loop","Python ciklai",{"_path":3825,"title":3826},"/basics/lists/nested_loop","Ciklas cikle",1734339588572]