[{"data":1,"prerenderedAt":2159},["ShallowReactive",2],{"doc-\u002Freference\u002Fpython-list-pop-method":3},{"id":4,"title":5,"body":6,"description":2152,"extension":2153,"meta":2154,"navigation":127,"path":2155,"seo":2156,"stem":2157,"__hash__":2158},"content\u002Freference\u002Fpython-list-pop-method.md","Python List pop() Method",{"type":7,"value":8,"toc":2125},"minimark",[9,13,21,24,34,52,57,157,160,183,189,193,198,206,209,220,223,315,317,349,353,377,383,400,402,493,495,525,532,536,542,629,631,661,664,668,671,769,771,809,812,898,900,930,937,947,951,956,966,968,1060,1062,1092,1095,1104,1108,1113,1122,1148,1150,1175,1178,1194,1196,1262,1266,1271,1311,1313,1330,1332,1343,1449,1456,1460,1465,1508,1510,1541,1543,1559,1635,1637,1659,1663,1666,1672,1683,1688,1696,1699,1770,1772,1797,1856,1858,1879,1888,1897,1904,1908,1913,1937,1940,2018,2021,2035,2042,2046,2050,2056,2060,2070,2074,2081,2085,2091,2095,2121],[10,11,5],"h1",{"id":12},"python-list-pop-method",[14,15,16,20],"p",{},[17,18,19],"code",{},"list.pop()"," removes an item from a list and returns it.",[14,22,23],{},"This method is useful when you want to both:",[25,26,27,31],"ul",{},[28,29,30],"li",{},"delete an item from a list",[28,32,33],{},"keep the removed value for later use",[14,35,36,37,40,41,43,44,51],{},"If you do not pass an index, ",[17,38,39],{},"pop()"," removes the last item. Beginners often confuse ",[17,42,39],{}," with ",[45,46,48],"a",{"href":47},"\u002Freference\u002Fpython-list-remove-method\u002F",[17,49,50],{},"remove()",", or expect it to create a new list instead of changing the original one.",[53,54,56],"h2",{"id":55},"quick-example","Quick example",[58,59,64],"pre",{"className":60,"code":61,"language":62,"meta":63,"style":63},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","numbers = [10, 20, 30]\nlast_item = numbers.pop()\n\nprint(last_item)\nprint(numbers)\n","python","",[17,65,66,101,122,129,145],{"__ignoreMap":63},[67,68,71,75,79,83,87,90,93,95,98],"span",{"class":69,"line":70},"line",1,[67,72,74],{"class":73},"su5hD","numbers ",[67,76,78],{"class":77},"smGrS","=",[67,80,82],{"class":81},"sP7_E"," [",[67,84,86],{"class":85},"srdBf","10",[67,88,89],{"class":81},",",[67,91,92],{"class":85}," 20",[67,94,89],{"class":81},[67,96,97],{"class":85}," 30",[67,99,100],{"class":81},"]\n",[67,102,104,107,109,112,115,119],{"class":69,"line":103},2,[67,105,106],{"class":73},"last_item ",[67,108,78],{"class":77},[67,110,111],{"class":73}," numbers",[67,113,114],{"class":81},".",[67,116,118],{"class":117},"slqww","pop",[67,120,121],{"class":81},"()\n",[67,123,125],{"class":69,"line":124},3,[67,126,128],{"emptyLinePlaceholder":127},true,"\n",[67,130,132,136,139,142],{"class":69,"line":131},4,[67,133,135],{"class":134},"sptTA","print",[67,137,138],{"class":81},"(",[67,140,141],{"class":117},"last_item",[67,143,144],{"class":81},")\n",[67,146,148,150,152,155],{"class":69,"line":147},5,[67,149,135],{"class":134},[67,151,138],{"class":81},[67,153,154],{"class":117},"numbers",[67,156,144],{"class":81},[14,158,159],{},"Output:",[58,161,163],{"className":60,"code":162,"language":62,"meta":63,"style":63},"30\n[10, 20]\n",[17,164,165,170],{"__ignoreMap":63},[67,166,167],{"class":69,"line":70},[67,168,169],{"class":85},"30\n",[67,171,172,175,177,179,181],{"class":69,"line":103},[67,173,174],{"class":81},"[",[67,176,86],{"class":85},[67,178,89],{"class":81},[67,180,92],{"class":85},[67,182,100],{"class":81},[14,184,185,186,188],{},"Use ",[17,187,39],{}," to remove and return an item from a list. With no argument, it removes the last item.",[53,190,192],{"id":191},"what-pop-does","What pop() does",[14,194,195,197],{},[17,196,39],{}," has two main jobs:",[25,199,200,203],{},[28,201,202],{},"It removes one item from a list",[28,204,205],{},"It returns the item that was removed",[14,207,208],{},"Important details:",[25,210,211,214,217],{},[28,212,213],{},"If no index is given, it removes the last item",[28,215,216],{},"It changes the original list",[28,218,219],{},"It does not create a new list",[14,221,222],{},"Example:",[58,224,226],{"className":60,"code":225,"language":62,"meta":63,"style":63},"colors = [\"red\", \"green\", \"blue\"]\n\nremoved = colors.pop()\n\nprint(removed)\nprint(colors)\n",[17,227,228,268,272,288,292,303],{"__ignoreMap":63},[67,229,230,233,235,237,241,245,247,249,252,255,257,259,261,264,266],{"class":69,"line":70},[67,231,232],{"class":73},"colors ",[67,234,78],{"class":77},[67,236,82],{"class":81},[67,238,240],{"class":239},"sjJ54","\"",[67,242,244],{"class":243},"s_sjI","red",[67,246,240],{"class":239},[67,248,89],{"class":81},[67,250,251],{"class":239}," \"",[67,253,254],{"class":243},"green",[67,256,240],{"class":239},[67,258,89],{"class":81},[67,260,251],{"class":239},[67,262,263],{"class":243},"blue",[67,265,240],{"class":239},[67,267,100],{"class":81},[67,269,270],{"class":69,"line":103},[67,271,128],{"emptyLinePlaceholder":127},[67,273,274,277,279,282,284,286],{"class":69,"line":124},[67,275,276],{"class":73},"removed ",[67,278,78],{"class":77},[67,280,281],{"class":73}," colors",[67,283,114],{"class":81},[67,285,118],{"class":117},[67,287,121],{"class":81},[67,289,290],{"class":69,"line":131},[67,291,128],{"emptyLinePlaceholder":127},[67,293,294,296,298,301],{"class":69,"line":147},[67,295,135],{"class":134},[67,297,138],{"class":81},[67,299,300],{"class":117},"removed",[67,302,144],{"class":81},[67,304,306,308,310,313],{"class":69,"line":305},6,[67,307,135],{"class":134},[67,309,138],{"class":81},[67,311,312],{"class":117},"colors",[67,314,144],{"class":81},[14,316,159],{},[58,318,320],{"className":60,"code":319,"language":62,"meta":63,"style":63},"blue\n['red', 'green']\n",[17,321,322,327],{"__ignoreMap":63},[67,323,324],{"class":69,"line":70},[67,325,326],{"class":73},"blue\n",[67,328,329,331,334,336,338,340,343,345,347],{"class":69,"line":103},[67,330,174],{"class":81},[67,332,333],{"class":239},"'",[67,335,244],{"class":243},[67,337,333],{"class":239},[67,339,89],{"class":81},[67,341,342],{"class":239}," '",[67,344,254],{"class":243},[67,346,333],{"class":239},[67,348,100],{"class":81},[53,350,352],{"id":351},"basic-syntax","Basic syntax",[58,354,356],{"className":60,"code":355,"language":62,"meta":63,"style":63},"list.pop([index])\n",[17,357,358],{"__ignoreMap":63},[67,359,360,364,366,368,371,374],{"class":69,"line":70},[67,361,363],{"class":362},"sZMiF","list",[67,365,114],{"class":81},[67,367,118],{"class":117},[67,369,370],{"class":81},"([",[67,372,373],{"class":117},"index",[67,375,376],{"class":81},"])\n",[14,378,379,380,382],{},"The ",[17,381,373],{}," is optional.",[25,384,385,391,397],{},[28,386,387,388,390],{},"If you do not give an index, ",[17,389,39],{}," removes the last item",[28,392,393,394,396],{},"If you give an index, ",[17,395,39],{}," removes the item at that position",[28,398,399],{},"You can store the result in a variable",[14,401,222],{},[58,403,405],{"className":60,"code":404,"language":62,"meta":63,"style":63},"letters = [\"a\", \"b\", \"c\"]\n\nitem = letters.pop(1)\n\nprint(item)\nprint(letters)\n",[17,406,407,442,446,467,471,482],{"__ignoreMap":63},[67,408,409,412,414,416,418,420,422,424,426,429,431,433,435,438,440],{"class":69,"line":70},[67,410,411],{"class":73},"letters ",[67,413,78],{"class":77},[67,415,82],{"class":81},[67,417,240],{"class":239},[67,419,45],{"class":243},[67,421,240],{"class":239},[67,423,89],{"class":81},[67,425,251],{"class":239},[67,427,428],{"class":243},"b",[67,430,240],{"class":239},[67,432,89],{"class":81},[67,434,251],{"class":239},[67,436,437],{"class":243},"c",[67,439,240],{"class":239},[67,441,100],{"class":81},[67,443,444],{"class":69,"line":103},[67,445,128],{"emptyLinePlaceholder":127},[67,447,448,451,453,456,458,460,462,465],{"class":69,"line":124},[67,449,450],{"class":73},"item ",[67,452,78],{"class":77},[67,454,455],{"class":73}," letters",[67,457,114],{"class":81},[67,459,118],{"class":117},[67,461,138],{"class":81},[67,463,464],{"class":85},"1",[67,466,144],{"class":81},[67,468,469],{"class":69,"line":131},[67,470,128],{"emptyLinePlaceholder":127},[67,472,473,475,477,480],{"class":69,"line":147},[67,474,135],{"class":134},[67,476,138],{"class":81},[67,478,479],{"class":117},"item",[67,481,144],{"class":81},[67,483,484,486,488,491],{"class":69,"line":305},[67,485,135],{"class":134},[67,487,138],{"class":81},[67,489,490],{"class":117},"letters",[67,492,144],{"class":81},[14,494,159],{},[58,496,498],{"className":60,"code":497,"language":62,"meta":63,"style":63},"b\n['a', 'c']\n",[17,499,500,505],{"__ignoreMap":63},[67,501,502],{"class":69,"line":70},[67,503,504],{"class":73},"b\n",[67,506,507,509,511,513,515,517,519,521,523],{"class":69,"line":103},[67,508,174],{"class":81},[67,510,333],{"class":239},[67,512,45],{"class":243},[67,514,333],{"class":239},[67,516,89],{"class":81},[67,518,342],{"class":239},[67,520,437],{"class":243},[67,522,333],{"class":239},[67,524,100],{"class":81},[14,526,527,528,114],{},"If you are new to list positions, see ",[45,529,531],{"href":530},"\u002Flearn\u002Fpython-lists-explained-beginner-guide\u002F","Python lists explained for beginners",[53,533,535],{"id":534},"using-pop-without-an-index","Using pop() without an index",[14,537,538,539,541],{},"When you call ",[17,540,39],{}," with no argument, Python removes the last item in the list.",[58,543,545],{"className":60,"code":544,"language":62,"meta":63,"style":63},"tasks = [\"write\", \"test\", \"submit\"]\n\nlast_task = tasks.pop()\n\nprint(last_task)\nprint(tasks)\n",[17,546,547,583,587,603,607,618],{"__ignoreMap":63},[67,548,549,552,554,556,558,561,563,565,567,570,572,574,576,579,581],{"class":69,"line":70},[67,550,551],{"class":73},"tasks ",[67,553,78],{"class":77},[67,555,82],{"class":81},[67,557,240],{"class":239},[67,559,560],{"class":243},"write",[67,562,240],{"class":239},[67,564,89],{"class":81},[67,566,251],{"class":239},[67,568,569],{"class":243},"test",[67,571,240],{"class":239},[67,573,89],{"class":81},[67,575,251],{"class":239},[67,577,578],{"class":243},"submit",[67,580,240],{"class":239},[67,582,100],{"class":81},[67,584,585],{"class":69,"line":103},[67,586,128],{"emptyLinePlaceholder":127},[67,588,589,592,594,597,599,601],{"class":69,"line":124},[67,590,591],{"class":73},"last_task ",[67,593,78],{"class":77},[67,595,596],{"class":73}," tasks",[67,598,114],{"class":81},[67,600,118],{"class":117},[67,602,121],{"class":81},[67,604,605],{"class":69,"line":131},[67,606,128],{"emptyLinePlaceholder":127},[67,608,609,611,613,616],{"class":69,"line":147},[67,610,135],{"class":134},[67,612,138],{"class":81},[67,614,615],{"class":117},"last_task",[67,617,144],{"class":81},[67,619,620,622,624,627],{"class":69,"line":305},[67,621,135],{"class":134},[67,623,138],{"class":81},[67,625,626],{"class":117},"tasks",[67,628,144],{"class":81},[14,630,159],{},[58,632,634],{"className":60,"code":633,"language":62,"meta":63,"style":63},"submit\n['write', 'test']\n",[17,635,636,641],{"__ignoreMap":63},[67,637,638],{"class":69,"line":70},[67,639,640],{"class":73},"submit\n",[67,642,643,645,647,649,651,653,655,657,659],{"class":69,"line":103},[67,644,174],{"class":81},[67,646,333],{"class":239},[67,648,560],{"class":243},[67,650,333],{"class":239},[67,652,89],{"class":81},[67,654,342],{"class":239},[67,656,569],{"class":243},[67,658,333],{"class":239},[67,660,100],{"class":81},[14,662,663],{},"This is useful when using a list like a stack, where the last item added is the first item removed.",[53,665,667],{"id":666},"using-pop-with-an-index","Using pop() with an index",[14,669,670],{},"You can pass an integer index to remove an item at a specific position.",[58,672,674],{"className":60,"code":673,"language":62,"meta":63,"style":63},"fruits = [\"apple\", \"banana\", \"cherry\", \"orange\"]\n\nremoved = fruits.pop(1)\n\nprint(removed)\nprint(fruits)\n",[17,675,676,721,725,744,748,758],{"__ignoreMap":63},[67,677,678,681,683,685,687,690,692,694,696,699,701,703,705,708,710,712,714,717,719],{"class":69,"line":70},[67,679,680],{"class":73},"fruits ",[67,682,78],{"class":77},[67,684,82],{"class":81},[67,686,240],{"class":239},[67,688,689],{"class":243},"apple",[67,691,240],{"class":239},[67,693,89],{"class":81},[67,695,251],{"class":239},[67,697,698],{"class":243},"banana",[67,700,240],{"class":239},[67,702,89],{"class":81},[67,704,251],{"class":239},[67,706,707],{"class":243},"cherry",[67,709,240],{"class":239},[67,711,89],{"class":81},[67,713,251],{"class":239},[67,715,716],{"class":243},"orange",[67,718,240],{"class":239},[67,720,100],{"class":81},[67,722,723],{"class":69,"line":103},[67,724,128],{"emptyLinePlaceholder":127},[67,726,727,729,731,734,736,738,740,742],{"class":69,"line":124},[67,728,276],{"class":73},[67,730,78],{"class":77},[67,732,733],{"class":73}," fruits",[67,735,114],{"class":81},[67,737,118],{"class":117},[67,739,138],{"class":81},[67,741,464],{"class":85},[67,743,144],{"class":81},[67,745,746],{"class":69,"line":131},[67,747,128],{"emptyLinePlaceholder":127},[67,749,750,752,754,756],{"class":69,"line":147},[67,751,135],{"class":134},[67,753,138],{"class":81},[67,755,300],{"class":117},[67,757,144],{"class":81},[67,759,760,762,764,767],{"class":69,"line":305},[67,761,135],{"class":134},[67,763,138],{"class":81},[67,765,766],{"class":117},"fruits",[67,768,144],{"class":81},[14,770,159],{},[58,772,774],{"className":60,"code":773,"language":62,"meta":63,"style":63},"banana\n['apple', 'cherry', 'orange']\n",[17,775,776,781],{"__ignoreMap":63},[67,777,778],{"class":69,"line":70},[67,779,780],{"class":73},"banana\n",[67,782,783,785,787,789,791,793,795,797,799,801,803,805,807],{"class":69,"line":103},[67,784,174],{"class":81},[67,786,333],{"class":239},[67,788,689],{"class":243},[67,790,333],{"class":239},[67,792,89],{"class":81},[67,794,342],{"class":239},[67,796,707],{"class":243},[67,798,333],{"class":239},[67,800,89],{"class":81},[67,802,342],{"class":239},[67,804,716],{"class":243},[67,806,333],{"class":239},[67,808,100],{"class":81},[14,810,811],{},"You can also use negative indexes:",[58,813,815],{"className":60,"code":814,"language":62,"meta":63,"style":63},"fruits = [\"apple\", \"banana\", \"cherry\"]\n\nremoved = fruits.pop(-1)\n\nprint(removed)\nprint(fruits)\n",[17,816,817,849,853,874,878,888],{"__ignoreMap":63},[67,818,819,821,823,825,827,829,831,833,835,837,839,841,843,845,847],{"class":69,"line":70},[67,820,680],{"class":73},[67,822,78],{"class":77},[67,824,82],{"class":81},[67,826,240],{"class":239},[67,828,689],{"class":243},[67,830,240],{"class":239},[67,832,89],{"class":81},[67,834,251],{"class":239},[67,836,698],{"class":243},[67,838,240],{"class":239},[67,840,89],{"class":81},[67,842,251],{"class":239},[67,844,707],{"class":243},[67,846,240],{"class":239},[67,848,100],{"class":81},[67,850,851],{"class":69,"line":103},[67,852,128],{"emptyLinePlaceholder":127},[67,854,855,857,859,861,863,865,867,870,872],{"class":69,"line":124},[67,856,276],{"class":73},[67,858,78],{"class":77},[67,860,733],{"class":73},[67,862,114],{"class":81},[67,864,118],{"class":117},[67,866,138],{"class":81},[67,868,869],{"class":77},"-",[67,871,464],{"class":85},[67,873,144],{"class":81},[67,875,876],{"class":69,"line":131},[67,877,128],{"emptyLinePlaceholder":127},[67,879,880,882,884,886],{"class":69,"line":147},[67,881,135],{"class":134},[67,883,138],{"class":81},[67,885,300],{"class":117},[67,887,144],{"class":81},[67,889,890,892,894,896],{"class":69,"line":305},[67,891,135],{"class":134},[67,893,138],{"class":81},[67,895,766],{"class":117},[67,897,144],{"class":81},[14,899,159],{},[58,901,903],{"className":60,"code":902,"language":62,"meta":63,"style":63},"cherry\n['apple', 'banana']\n",[17,904,905,910],{"__ignoreMap":63},[67,906,907],{"class":69,"line":70},[67,908,909],{"class":73},"cherry\n",[67,911,912,914,916,918,920,922,924,926,928],{"class":69,"line":103},[67,913,174],{"class":81},[67,915,333],{"class":239},[67,917,689],{"class":243},[67,919,333],{"class":239},[67,921,89],{"class":81},[67,923,342],{"class":239},[67,925,698],{"class":243},[67,927,333],{"class":239},[67,929,100],{"class":81},[14,931,932,933,936],{},"Negative indexes count from the end of the list. So ",[17,934,935],{},"-1"," means the last item.",[14,938,939,940,114],{},"If you need to find a position before removing it, see the ",[45,941,943,946],{"href":942},"\u002Freference\u002Fpython-list-index-method\u002F",[17,944,945],{},"list.index()"," method",[53,948,950],{"id":949},"what-pop-returns","What pop() returns",[14,952,953,955],{},[17,954,39],{}," returns the item that was removed.",[14,957,958,959,961,962,114],{},"This is one of the biggest differences between ",[17,960,39],{}," and ",[45,963,964],{"href":47},[17,965,50],{},[14,967,222],{},[58,969,971],{"className":60,"code":970,"language":62,"meta":63,"style":63},"names = [\"Ana\", \"Ben\", \"Cara\"]\n\nremoved_name = names.pop(0)\n\nprint(removed_name)\nprint(names)\n",[17,972,973,1009,1013,1034,1038,1049],{"__ignoreMap":63},[67,974,975,978,980,982,984,987,989,991,993,996,998,1000,1002,1005,1007],{"class":69,"line":70},[67,976,977],{"class":73},"names ",[67,979,78],{"class":77},[67,981,82],{"class":81},[67,983,240],{"class":239},[67,985,986],{"class":243},"Ana",[67,988,240],{"class":239},[67,990,89],{"class":81},[67,992,251],{"class":239},[67,994,995],{"class":243},"Ben",[67,997,240],{"class":239},[67,999,89],{"class":81},[67,1001,251],{"class":239},[67,1003,1004],{"class":243},"Cara",[67,1006,240],{"class":239},[67,1008,100],{"class":81},[67,1010,1011],{"class":69,"line":103},[67,1012,128],{"emptyLinePlaceholder":127},[67,1014,1015,1018,1020,1023,1025,1027,1029,1032],{"class":69,"line":124},[67,1016,1017],{"class":73},"removed_name ",[67,1019,78],{"class":77},[67,1021,1022],{"class":73}," names",[67,1024,114],{"class":81},[67,1026,118],{"class":117},[67,1028,138],{"class":81},[67,1030,1031],{"class":85},"0",[67,1033,144],{"class":81},[67,1035,1036],{"class":69,"line":131},[67,1037,128],{"emptyLinePlaceholder":127},[67,1039,1040,1042,1044,1047],{"class":69,"line":147},[67,1041,135],{"class":134},[67,1043,138],{"class":81},[67,1045,1046],{"class":117},"removed_name",[67,1048,144],{"class":81},[67,1050,1051,1053,1055,1058],{"class":69,"line":305},[67,1052,135],{"class":134},[67,1054,138],{"class":81},[67,1056,1057],{"class":117},"names",[67,1059,144],{"class":81},[14,1061,159],{},[58,1063,1065],{"className":60,"code":1064,"language":62,"meta":63,"style":63},"Ana\n['Ben', 'Cara']\n",[17,1066,1067,1072],{"__ignoreMap":63},[67,1068,1069],{"class":69,"line":70},[67,1070,1071],{"class":73},"Ana\n",[67,1073,1074,1076,1078,1080,1082,1084,1086,1088,1090],{"class":69,"line":103},[67,1075,174],{"class":81},[67,1077,333],{"class":239},[67,1079,995],{"class":243},[67,1081,333],{"class":239},[67,1083,89],{"class":81},[67,1085,342],{"class":239},[67,1087,1004],{"class":243},[67,1089,333],{"class":239},[67,1091,100],{"class":81},[14,1093,1094],{},"This is useful when you need the removed value after taking it out of the list.",[14,1096,1097,1098,1100,1101,114],{},"By comparison, ",[17,1099,50],{}," deletes by value and returns ",[17,1102,1103],{},"None",[53,1105,1107],{"id":1106},"common-errors-and-edge-cases","Common errors and edge cases",[1109,1110,1112],"h3",{"id":1111},"popping-from-an-empty-list","Popping from an empty list",[14,1114,1115,1116,1118,1119,114],{},"If the list is empty, ",[17,1117,39],{}," raises an ",[17,1120,1121],{},"IndexError",[58,1123,1125],{"className":60,"code":1124,"language":62,"meta":63,"style":63},"items = []\nitems.pop()\n",[17,1126,1127,1137],{"__ignoreMap":63},[67,1128,1129,1132,1134],{"class":69,"line":70},[67,1130,1131],{"class":73},"items ",[67,1133,78],{"class":77},[67,1135,1136],{"class":81}," []\n",[67,1138,1139,1142,1144,1146],{"class":69,"line":103},[67,1140,1141],{"class":73},"items",[67,1143,114],{"class":81},[67,1145,118],{"class":117},[67,1147,121],{"class":81},[14,1149,159],{},[58,1151,1153],{"className":60,"code":1152,"language":62,"meta":63,"style":63},"IndexError: pop from empty list\n",[17,1154,1155],{"__ignoreMap":63},[67,1156,1157,1159,1162,1165,1169,1172],{"class":69,"line":70},[67,1158,1121],{"class":362},[67,1160,1161],{"class":81},":",[67,1163,1164],{"class":73}," pop ",[67,1166,1168],{"class":1167},"sVHd0","from",[67,1170,1171],{"class":73}," empty ",[67,1173,1174],{"class":362},"list\n",[14,1176,1177],{},"Fix:",[25,1179,1180,1185],{},[28,1181,1182,1183],{},"Check that the list is not empty before calling ",[17,1184,39],{},[28,1186,1187,1188,961,1191],{},"Or handle the error with ",[17,1189,1190],{},"try",[17,1192,1193],{},"except",[14,1195,222],{},[58,1197,1199],{"className":60,"code":1198,"language":62,"meta":63,"style":63},"items = []\n\nif items:\n    print(items.pop())\nelse:\n    print(\"The list is empty.\")\n",[17,1200,1201,1209,1213,1224,1240,1247],{"__ignoreMap":63},[67,1202,1203,1205,1207],{"class":69,"line":70},[67,1204,1131],{"class":73},[67,1206,78],{"class":77},[67,1208,1136],{"class":81},[67,1210,1211],{"class":69,"line":103},[67,1212,128],{"emptyLinePlaceholder":127},[67,1214,1215,1218,1221],{"class":69,"line":124},[67,1216,1217],{"class":1167},"if",[67,1219,1220],{"class":73}," items",[67,1222,1223],{"class":81},":\n",[67,1225,1226,1229,1231,1233,1235,1237],{"class":69,"line":131},[67,1227,1228],{"class":134},"    print",[67,1230,138],{"class":81},[67,1232,1141],{"class":117},[67,1234,114],{"class":81},[67,1236,118],{"class":117},[67,1238,1239],{"class":81},"())\n",[67,1241,1242,1245],{"class":69,"line":147},[67,1243,1244],{"class":1167},"else",[67,1246,1223],{"class":81},[67,1248,1249,1251,1253,1255,1258,1260],{"class":69,"line":305},[67,1250,1228],{"class":134},[67,1252,138],{"class":81},[67,1254,240],{"class":239},[67,1256,1257],{"class":243},"The list is empty.",[67,1259,240],{"class":239},[67,1261,144],{"class":81},[1109,1263,1265],{"id":1264},"using-an-index-that-does-not-exist","Using an index that does not exist",[14,1267,1268,1269,114],{},"If the index is outside the valid range, Python raises an ",[17,1270,1121],{},[58,1272,1274],{"className":60,"code":1273,"language":62,"meta":63,"style":63},"numbers = [10, 20, 30]\nnumbers.pop(5)\n",[17,1275,1276,1296],{"__ignoreMap":63},[67,1277,1278,1280,1282,1284,1286,1288,1290,1292,1294],{"class":69,"line":70},[67,1279,74],{"class":73},[67,1281,78],{"class":77},[67,1283,82],{"class":81},[67,1285,86],{"class":85},[67,1287,89],{"class":81},[67,1289,92],{"class":85},[67,1291,89],{"class":81},[67,1293,97],{"class":85},[67,1295,100],{"class":81},[67,1297,1298,1300,1302,1304,1306,1309],{"class":69,"line":103},[67,1299,154],{"class":73},[67,1301,114],{"class":81},[67,1303,118],{"class":117},[67,1305,138],{"class":81},[67,1307,1308],{"class":85},"5",[67,1310,144],{"class":81},[14,1312,159],{},[58,1314,1316],{"className":60,"code":1315,"language":62,"meta":63,"style":63},"IndexError: pop index out of range\n",[17,1317,1318],{"__ignoreMap":63},[67,1319,1320,1322,1324,1327],{"class":69,"line":70},[67,1321,1121],{"class":362},[67,1323,1161],{"class":81},[67,1325,1326],{"class":73}," pop index out of ",[67,1328,1329],{"class":134},"range\n",[14,1331,1177],{},[25,1333,1334,1340],{},[28,1335,1336,1337],{},"Check the list length with ",[17,1338,1339],{},"len()",[28,1341,1342],{},"Make sure the index is valid before removing",[58,1344,1346],{"className":60,"code":1345,"language":62,"meta":63,"style":63},"numbers = [10, 20, 30]\nindex = 2\n\nif 0 \u003C= index \u003C len(numbers):\n    print(numbers.pop(index))\nelse:\n    print(\"Index is out of range.\")\n",[17,1347,1348,1368,1378,1382,1408,1427,1433],{"__ignoreMap":63},[67,1349,1350,1352,1354,1356,1358,1360,1362,1364,1366],{"class":69,"line":70},[67,1351,74],{"class":73},[67,1353,78],{"class":77},[67,1355,82],{"class":81},[67,1357,86],{"class":85},[67,1359,89],{"class":81},[67,1361,92],{"class":85},[67,1363,89],{"class":81},[67,1365,97],{"class":85},[67,1367,100],{"class":81},[67,1369,1370,1373,1375],{"class":69,"line":103},[67,1371,1372],{"class":73},"index ",[67,1374,78],{"class":77},[67,1376,1377],{"class":85}," 2\n",[67,1379,1380],{"class":69,"line":124},[67,1381,128],{"emptyLinePlaceholder":127},[67,1383,1384,1386,1389,1392,1395,1398,1401,1403,1405],{"class":69,"line":131},[67,1385,1217],{"class":1167},[67,1387,1388],{"class":85}," 0",[67,1390,1391],{"class":77}," \u003C=",[67,1393,1394],{"class":73}," index ",[67,1396,1397],{"class":77},"\u003C",[67,1399,1400],{"class":134}," len",[67,1402,138],{"class":81},[67,1404,154],{"class":117},[67,1406,1407],{"class":81},"):\n",[67,1409,1410,1412,1414,1416,1418,1420,1422,1424],{"class":69,"line":147},[67,1411,1228],{"class":134},[67,1413,138],{"class":81},[67,1415,154],{"class":117},[67,1417,114],{"class":81},[67,1419,118],{"class":117},[67,1421,138],{"class":81},[67,1423,373],{"class":117},[67,1425,1426],{"class":81},"))\n",[67,1428,1429,1431],{"class":69,"line":305},[67,1430,1244],{"class":1167},[67,1432,1223],{"class":81},[67,1434,1436,1438,1440,1442,1445,1447],{"class":69,"line":1435},7,[67,1437,1228],{"class":134},[67,1439,138],{"class":81},[67,1441,240],{"class":239},[67,1443,1444],{"class":243},"Index is out of range.",[67,1446,240],{"class":239},[67,1448,144],{"class":81},[14,1450,1451,1452,114],{},"For more help with this kind of problem, see ",[45,1453,1455],{"href":1454},"\u002Ferrors\u002Findexerror-list-index-out-of-range-fix-explained\u002F","IndexError: list index out of range",[1109,1457,1459],{"id":1458},"passing-a-non-integer-index","Passing a non-integer index",[14,1461,1462,1464],{},[17,1463,39],{}," expects an integer index.",[58,1466,1468],{"className":60,"code":1467,"language":62,"meta":63,"style":63},"numbers = [10, 20, 30]\nnumbers.pop(\"1\")\n",[17,1469,1470,1490],{"__ignoreMap":63},[67,1471,1472,1474,1476,1478,1480,1482,1484,1486,1488],{"class":69,"line":70},[67,1473,74],{"class":73},[67,1475,78],{"class":77},[67,1477,82],{"class":81},[67,1479,86],{"class":85},[67,1481,89],{"class":81},[67,1483,92],{"class":85},[67,1485,89],{"class":81},[67,1487,97],{"class":85},[67,1489,100],{"class":81},[67,1491,1492,1494,1496,1498,1500,1502,1504,1506],{"class":69,"line":103},[67,1493,154],{"class":73},[67,1495,114],{"class":81},[67,1497,118],{"class":117},[67,1499,138],{"class":81},[67,1501,240],{"class":239},[67,1503,464],{"class":243},[67,1505,240],{"class":239},[67,1507,144],{"class":81},[14,1509,159],{},[58,1511,1513],{"className":60,"code":1512,"language":62,"meta":63,"style":63},"TypeError: 'str' object cannot be interpreted as an integer\n",[17,1514,1515],{"__ignoreMap":63},[67,1516,1517,1520,1522,1524,1527,1529,1532,1535,1538],{"class":69,"line":70},[67,1518,1519],{"class":362},"TypeError",[67,1521,1161],{"class":81},[67,1523,342],{"class":239},[67,1525,1526],{"class":243},"str",[67,1528,333],{"class":239},[67,1530,1531],{"class":362}," object",[67,1533,1534],{"class":73}," cannot be interpreted ",[67,1536,1537],{"class":1167},"as",[67,1539,1540],{"class":73}," an integer\n",[14,1542,1177],{},[25,1544,1545,1556],{},[28,1546,1547,1548,1550,1551,1553,1554],{},"Pass an integer such as ",[17,1549,1031],{},", ",[17,1552,464],{},", or ",[17,1555,935],{},[28,1557,1558],{},"If the value comes from input, convert it first",[58,1560,1562],{"className":60,"code":1561,"language":62,"meta":63,"style":63},"numbers = [10, 20, 30]\nindex = int(\"1\")\n\nprint(numbers.pop(index))\nprint(numbers)\n",[17,1563,1564,1584,1603,1607,1625],{"__ignoreMap":63},[67,1565,1566,1568,1570,1572,1574,1576,1578,1580,1582],{"class":69,"line":70},[67,1567,74],{"class":73},[67,1569,78],{"class":77},[67,1571,82],{"class":81},[67,1573,86],{"class":85},[67,1575,89],{"class":81},[67,1577,92],{"class":85},[67,1579,89],{"class":81},[67,1581,97],{"class":85},[67,1583,100],{"class":81},[67,1585,1586,1588,1590,1593,1595,1597,1599,1601],{"class":69,"line":103},[67,1587,1372],{"class":73},[67,1589,78],{"class":77},[67,1591,1592],{"class":362}," int",[67,1594,138],{"class":81},[67,1596,240],{"class":239},[67,1598,464],{"class":243},[67,1600,240],{"class":239},[67,1602,144],{"class":81},[67,1604,1605],{"class":69,"line":124},[67,1606,128],{"emptyLinePlaceholder":127},[67,1608,1609,1611,1613,1615,1617,1619,1621,1623],{"class":69,"line":131},[67,1610,135],{"class":134},[67,1612,138],{"class":81},[67,1614,154],{"class":117},[67,1616,114],{"class":81},[67,1618,118],{"class":117},[67,1620,138],{"class":81},[67,1622,373],{"class":117},[67,1624,1426],{"class":81},[67,1626,1627,1629,1631,1633],{"class":69,"line":147},[67,1628,135],{"class":134},[67,1630,138],{"class":81},[67,1632,154],{"class":117},[67,1634,144],{"class":81},[14,1636,159],{},[58,1638,1640],{"className":60,"code":1639,"language":62,"meta":63,"style":63},"20\n[10, 30]\n",[17,1641,1642,1647],{"__ignoreMap":63},[67,1643,1644],{"class":69,"line":70},[67,1645,1646],{"class":85},"20\n",[67,1648,1649,1651,1653,1655,1657],{"class":69,"line":103},[67,1650,174],{"class":81},[67,1652,86],{"class":85},[67,1654,89],{"class":81},[67,1656,97],{"class":85},[67,1658,100],{"class":81},[53,1660,1662],{"id":1661},"pop-vs-remove","pop() vs remove()",[14,1664,1665],{},"These methods are similar, but they are not the same.",[1109,1667,185,1669,1671],{"id":1668},"use-pop-when",[17,1670,39],{}," when:",[25,1673,1674,1677,1680],{},[28,1675,1676],{},"you want to remove by index",[28,1678,1679],{},"you want the removed item returned",[28,1681,1682],{},"you want to remove the last item by default",[1109,1684,185,1686,1671],{"id":1685},"use-remove-when",[17,1687,50],{},[25,1689,1690,1693],{},[28,1691,1692],{},"you want to remove by value",[28,1694,1695],{},"you know the item itself, not its position",[14,1697,1698],{},"Compare these examples:",[58,1700,1702],{"className":60,"code":1701,"language":62,"meta":63,"style":63},"numbers = [10, 20, 30, 20]\n\nremoved = numbers.pop(1)\nprint(removed)\nprint(numbers)\n",[17,1703,1704,1728,1732,1750,1760],{"__ignoreMap":63},[67,1705,1706,1708,1710,1712,1714,1716,1718,1720,1722,1724,1726],{"class":69,"line":70},[67,1707,74],{"class":73},[67,1709,78],{"class":77},[67,1711,82],{"class":81},[67,1713,86],{"class":85},[67,1715,89],{"class":81},[67,1717,92],{"class":85},[67,1719,89],{"class":81},[67,1721,97],{"class":85},[67,1723,89],{"class":81},[67,1725,92],{"class":85},[67,1727,100],{"class":81},[67,1729,1730],{"class":69,"line":103},[67,1731,128],{"emptyLinePlaceholder":127},[67,1733,1734,1736,1738,1740,1742,1744,1746,1748],{"class":69,"line":124},[67,1735,276],{"class":73},[67,1737,78],{"class":77},[67,1739,111],{"class":73},[67,1741,114],{"class":81},[67,1743,118],{"class":117},[67,1745,138],{"class":81},[67,1747,464],{"class":85},[67,1749,144],{"class":81},[67,1751,1752,1754,1756,1758],{"class":69,"line":131},[67,1753,135],{"class":134},[67,1755,138],{"class":81},[67,1757,300],{"class":117},[67,1759,144],{"class":81},[67,1761,1762,1764,1766,1768],{"class":69,"line":147},[67,1763,135],{"class":134},[67,1765,138],{"class":81},[67,1767,154],{"class":117},[67,1769,144],{"class":81},[14,1771,159],{},[58,1773,1775],{"className":60,"code":1774,"language":62,"meta":63,"style":63},"20\n[10, 30, 20]\n",[17,1776,1777,1781],{"__ignoreMap":63},[67,1778,1779],{"class":69,"line":70},[67,1780,1646],{"class":85},[67,1782,1783,1785,1787,1789,1791,1793,1795],{"class":69,"line":103},[67,1784,174],{"class":81},[67,1786,86],{"class":85},[67,1788,89],{"class":81},[67,1790,97],{"class":85},[67,1792,89],{"class":81},[67,1794,92],{"class":85},[67,1796,100],{"class":81},[58,1798,1800],{"className":60,"code":1799,"language":62,"meta":63,"style":63},"numbers = [10, 20, 30, 20]\n\nnumbers.remove(20)\nprint(numbers)\n",[17,1801,1802,1826,1830,1846],{"__ignoreMap":63},[67,1803,1804,1806,1808,1810,1812,1814,1816,1818,1820,1822,1824],{"class":69,"line":70},[67,1805,74],{"class":73},[67,1807,78],{"class":77},[67,1809,82],{"class":81},[67,1811,86],{"class":85},[67,1813,89],{"class":81},[67,1815,92],{"class":85},[67,1817,89],{"class":81},[67,1819,97],{"class":85},[67,1821,89],{"class":81},[67,1823,92],{"class":85},[67,1825,100],{"class":81},[67,1827,1828],{"class":69,"line":103},[67,1829,128],{"emptyLinePlaceholder":127},[67,1831,1832,1834,1836,1839,1841,1844],{"class":69,"line":124},[67,1833,154],{"class":73},[67,1835,114],{"class":81},[67,1837,1838],{"class":117},"remove",[67,1840,138],{"class":81},[67,1842,1843],{"class":85},"20",[67,1845,144],{"class":81},[67,1847,1848,1850,1852,1854],{"class":69,"line":131},[67,1849,135],{"class":134},[67,1851,138],{"class":81},[67,1853,154],{"class":117},[67,1855,144],{"class":81},[14,1857,159],{},[58,1859,1861],{"className":60,"code":1860,"language":62,"meta":63,"style":63},"[10, 30, 20]\n",[17,1862,1863],{"__ignoreMap":63},[67,1864,1865,1867,1869,1871,1873,1875,1877],{"class":69,"line":70},[67,1866,174],{"class":81},[67,1868,86],{"class":85},[67,1870,89],{"class":81},[67,1872,97],{"class":85},[67,1874,89],{"class":81},[67,1876,92],{"class":85},[67,1878,100],{"class":81},[14,1880,1881,1882,1885,1886,114],{},"In the first example, ",[17,1883,1884],{},"pop(1)"," removes the item at index ",[17,1887,464],{},[14,1889,1890,1891,1894,1895,114],{},"In the second example, ",[17,1892,1893],{},"remove(20)"," removes the first matching value ",[17,1896,1843],{},[14,1898,1899,1900,114],{},"If your goal is practical list cleanup, see ",[45,1901,1903],{"href":1902},"\u002Fhow-to\u002Fhow-to-remove-an-item-from-a-list-in-python\u002F","how to remove an item from a list in Python",[53,1905,1907],{"id":1906},"common-mistakes","Common mistakes",[14,1909,1910,1911,1161],{},"Beginners often run into these problems with ",[17,1912,39],{},[25,1914,1915,1918,1921,1928,1934],{},[28,1916,1917],{},"Trying to pop from an empty list",[28,1919,1920],{},"Using an index larger than the list length",[28,1922,1923,1924,43,1926],{},"Confusing ",[17,1925,39],{},[17,1927,50],{},[28,1929,1930,1931,1933],{},"Expecting ",[17,1932,39],{}," to return a new list",[28,1935,1936],{},"Passing a string instead of an integer index",[14,1938,1939],{},"Helpful checks while debugging:",[58,1941,1943],{"className":60,"code":1942,"language":62,"meta":63,"style":63},"print(my_list)\nprint(len(my_list))\nprint(my_list.pop())\nprint(my_list.pop(0))\nprint(type(index))\n",[17,1944,1945,1956,1971,1985,2003],{"__ignoreMap":63},[67,1946,1947,1949,1951,1954],{"class":69,"line":70},[67,1948,135],{"class":134},[67,1950,138],{"class":81},[67,1952,1953],{"class":117},"my_list",[67,1955,144],{"class":81},[67,1957,1958,1960,1962,1965,1967,1969],{"class":69,"line":103},[67,1959,135],{"class":134},[67,1961,138],{"class":81},[67,1963,1964],{"class":134},"len",[67,1966,138],{"class":81},[67,1968,1953],{"class":117},[67,1970,1426],{"class":81},[67,1972,1973,1975,1977,1979,1981,1983],{"class":69,"line":124},[67,1974,135],{"class":134},[67,1976,138],{"class":81},[67,1978,1953],{"class":117},[67,1980,114],{"class":81},[67,1982,118],{"class":117},[67,1984,1239],{"class":81},[67,1986,1987,1989,1991,1993,1995,1997,1999,2001],{"class":69,"line":131},[67,1988,135],{"class":134},[67,1990,138],{"class":81},[67,1992,1953],{"class":117},[67,1994,114],{"class":81},[67,1996,118],{"class":117},[67,1998,138],{"class":81},[67,2000,1031],{"class":85},[67,2002,1426],{"class":81},[67,2004,2005,2007,2009,2012,2014,2016],{"class":69,"line":147},[67,2006,135],{"class":134},[67,2008,138],{"class":81},[67,2010,2011],{"class":362},"type",[67,2013,138],{"class":81},[67,2015,373],{"class":117},[67,2017,1426],{"class":81},[14,2019,2020],{},"Be careful with these debugging lines:",[25,2022,2023,2029],{},[28,2024,2025,2028],{},[17,2026,2027],{},"print(my_list.pop())"," changes the list",[28,2030,2031,2034],{},[17,2032,2033],{},"print(my_list.pop(0))"," also changes the list",[14,2036,2037,2038,2041],{},"If you only want to inspect the list, use ",[17,2039,2040],{},"print(my_list)"," first.",[53,2043,2045],{"id":2044},"faq","FAQ",[1109,2047,2049],{"id":2048},"does-pop-remove-the-last-item-by-default","Does pop() remove the last item by default?",[14,2051,2052,2053,2055],{},"Yes. If you do not pass an index, ",[17,2054,39],{}," removes and returns the last item.",[1109,2057,2059],{"id":2058},"what-is-the-difference-between-pop-and-remove","What is the difference between pop() and remove()?",[14,2061,2062,2064,2065,2067,2068,114],{},[17,2063,39],{}," removes by index and returns the removed item. ",[17,2066,50],{}," removes by value and returns ",[17,2069,1103],{},[1109,2071,2073],{"id":2072},"can-pop-use-negative-indexes","Can pop() use negative indexes?",[14,2075,2076,2077,2080],{},"Yes. For example, ",[17,2078,2079],{},"pop(-1)"," removes the last item.",[1109,2082,2084],{"id":2083},"what-happens-if-the-list-is-empty","What happens if the list is empty?",[14,2086,2087,2088,2090],{},"Python raises ",[17,2089,1121],{}," because there is no item to remove.",[53,2092,2094],{"id":2093},"see-also","See also",[25,2096,2097,2102,2107,2112,2117],{},[28,2098,2099],{},[45,2100,2101],{"href":1902},"How to remove an item from a list in Python",[28,2103,2104],{},[45,2105,2106],{"href":47},"Python list remove() method",[28,2108,2109],{},[45,2110,2111],{"href":942},"Python list index() method",[28,2113,2114],{},[45,2115,2116],{"href":530},"Python lists explained: beginner guide",[28,2118,2119],{},[45,2120,1455],{"href":1454},[2122,2123,2124],"style",{},"html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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);}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}",{"title":63,"searchDepth":103,"depth":103,"links":2126},[2127,2128,2129,2130,2131,2132,2133,2138,2144,2145,2151],{"id":55,"depth":103,"text":56},{"id":191,"depth":103,"text":192},{"id":351,"depth":103,"text":352},{"id":534,"depth":103,"text":535},{"id":666,"depth":103,"text":667},{"id":949,"depth":103,"text":950},{"id":1106,"depth":103,"text":1107,"children":2134},[2135,2136,2137],{"id":1111,"depth":124,"text":1112},{"id":1264,"depth":124,"text":1265},{"id":1458,"depth":124,"text":1459},{"id":1661,"depth":103,"text":1662,"children":2139},[2140,2142],{"id":1668,"depth":124,"text":2141},"Use pop() when:",{"id":1685,"depth":124,"text":2143},"Use remove() when:",{"id":1906,"depth":103,"text":1907},{"id":2044,"depth":103,"text":2045,"children":2146},[2147,2148,2149,2150],{"id":2048,"depth":124,"text":2049},{"id":2058,"depth":124,"text":2059},{"id":2072,"depth":124,"text":2073},{"id":2083,"depth":124,"text":2084},{"id":2093,"depth":103,"text":2094},"Master python list pop method in our comprehensive Python beginner guide.","md",{},"\u002Freference\u002Fpython-list-pop-method",{"title":5,"description":2152},"reference\u002Fpython-list-pop-method","kHX2O4xs3stUx9ClpKy3mBjYQCERRseG-ecaBv6b1II",1777585514789]