[{"data":1,"prerenderedAt":1165},["ShallowReactive",2],{"doc-\u002Fglossary\u002Fwhat-is-a-list-in-python":3},{"id":4,"title":5,"body":6,"description":1158,"extension":1159,"meta":1160,"navigation":475,"path":1161,"seo":1162,"stem":1163,"__hash__":1164},"content\u002Fglossary\u002Fwhat-is-a-list-in-python.md","What Is a List in Python?",{"type":7,"value":8,"toc":1140},"minimark",[9,13,17,20,25,105,108,153,156,172,176,179,182,195,198,241,248,252,255,258,272,275,316,319,323,326,368,370,423,427,430,536,538,584,587,613,625,642,646,649,652,663,666,692,695,845,858,862,865,868,879,882,902,906,909,958,961,1020,1023,1049,1060,1064,1069,1072,1076,1079,1083,1086,1090,1093,1097,1102,1106,1136],[10,11,5],"h1",{"id":12},"what-is-a-list-in-python",[14,15,16],"p",{},"A list in Python is a beginner-friendly way to store multiple values in one variable. This page explains what a list is, what it is used for, and how to recognize one when you see it.",[14,18,19],{},"If you are just getting started, the main idea is simple: a list lets you keep related items together in order. For example, you might use a list for names, scores, or file paths.",[21,22,24],"h2",{"id":23},"quick-example","Quick example",[26,27,32],"pre",{"className":28,"code":29,"language":30,"meta":31,"style":31},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","numbers = [1, 2, 3]\nprint(numbers)\nprint(type(numbers))\n","python","",[33,34,35,70,87],"code",{"__ignoreMap":31},[36,37,40,44,48,52,56,59,62,64,67],"span",{"class":38,"line":39},"line",1,[36,41,43],{"class":42},"su5hD","numbers ",[36,45,47],{"class":46},"smGrS","=",[36,49,51],{"class":50},"sP7_E"," [",[36,53,55],{"class":54},"srdBf","1",[36,57,58],{"class":50},",",[36,60,61],{"class":54}," 2",[36,63,58],{"class":50},[36,65,66],{"class":54}," 3",[36,68,69],{"class":50},"]\n",[36,71,73,77,80,84],{"class":38,"line":72},2,[36,74,76],{"class":75},"sptTA","print",[36,78,79],{"class":50},"(",[36,81,83],{"class":82},"slqww","numbers",[36,85,86],{"class":50},")\n",[36,88,90,92,94,98,100,102],{"class":38,"line":89},3,[36,91,76],{"class":75},[36,93,79],{"class":50},[36,95,97],{"class":96},"sZMiF","type",[36,99,79],{"class":50},[36,101,83],{"class":82},[36,103,104],{"class":50},"))\n",[14,106,107],{},"Output:",[26,109,111],{"className":28,"code":110,"language":30,"meta":31,"style":31},"[1, 2, 3]\n\u003Cclass 'list'>\n",[33,112,113,130],{"__ignoreMap":31},[36,114,115,118,120,122,124,126,128],{"class":38,"line":39},[36,116,117],{"class":50},"[",[36,119,55],{"class":54},[36,121,58],{"class":50},[36,123,61],{"class":54},[36,125,58],{"class":50},[36,127,66],{"class":54},[36,129,69],{"class":50},[36,131,132,135,139,143,147,150],{"class":38,"line":72},[36,133,134],{"class":46},"\u003C",[36,136,138],{"class":137},"sbsja","class",[36,140,142],{"class":141},"sjJ54"," '",[36,144,146],{"class":145},"s_sjI","list",[36,148,149],{"class":141},"'",[36,151,152],{"class":46},">\n",[14,154,155],{},"This example shows two important things:",[157,158,159,166],"ul",{},[160,161,162,163],"li",{},"A list uses square brackets ",[33,164,165],{},"[]",[160,167,168,169,171],{},"Python recognizes it as a ",[33,170,146],{}," type",[21,173,175],{"id":174},"what-a-list-is","What a list is",[14,177,178],{},"A list is a Python data type used to store multiple values in one variable.",[14,180,181],{},"Lists have a few easy-to-spot rules:",[157,183,184,189,192],{},[160,185,186,187],{},"They use square brackets: ",[33,188,165],{},[160,190,191],{},"Items are separated by commas",[160,193,194],{},"Items stay in order",[14,196,197],{},"Example:",[26,199,201],{"className":28,"code":200,"language":30,"meta":31,"style":31},"colors = [\"red\", \"green\", \"blue\"]\n",[33,202,203],{"__ignoreMap":31},[36,204,205,208,210,212,215,218,220,222,225,228,230,232,234,237,239],{"class":38,"line":39},[36,206,207],{"class":42},"colors ",[36,209,47],{"class":46},[36,211,51],{"class":50},[36,213,214],{"class":141},"\"",[36,216,217],{"class":145},"red",[36,219,214],{"class":141},[36,221,58],{"class":50},[36,223,224],{"class":141}," \"",[36,226,227],{"class":145},"green",[36,229,214],{"class":141},[36,231,58],{"class":50},[36,233,224],{"class":141},[36,235,236],{"class":145},"blue",[36,238,214],{"class":141},[36,240,69],{"class":50},[14,242,243,244,247],{},"Here, ",[33,245,246],{},"colors"," is a list with three items.",[21,249,251],{"id":250},"what-lists-are-used-for","What lists are used for",[14,253,254],{},"Lists are useful when you need to work with a group of related values.",[14,256,257],{},"Common uses include:",[157,259,260,263,266,269],{},[160,261,262],{},"Storing names, numbers, scores, or file paths",[160,264,265],{},"Looping through items one by one",[160,267,268],{},"Keeping data in a specific order",[160,270,271],{},"Changing the collection later by adding or removing items",[14,273,274],{},"For example, you could store student names in a list:",[26,276,278],{"className":28,"code":277,"language":30,"meta":31,"style":31},"students = [\"Maya\", \"Leo\", \"Sam\"]\n",[33,279,280],{"__ignoreMap":31},[36,281,282,285,287,289,291,294,296,298,300,303,305,307,309,312,314],{"class":38,"line":39},[36,283,284],{"class":42},"students ",[36,286,47],{"class":46},[36,288,51],{"class":50},[36,290,214],{"class":141},[36,292,293],{"class":145},"Maya",[36,295,214],{"class":141},[36,297,58],{"class":50},[36,299,224],{"class":141},[36,301,302],{"class":145},"Leo",[36,304,214],{"class":141},[36,306,58],{"class":50},[36,308,224],{"class":141},[36,310,311],{"class":145},"Sam",[36,313,214],{"class":141},[36,315,69],{"class":50},[14,317,318],{},"Then later, you could add another name or go through each student in a loop.",[21,320,322],{"id":321},"main-features-of-a-python-list","Main features of a Python list",[14,324,325],{},"Python lists have a few important features:",[157,327,328,338,352,360],{},[160,329,330,334,337],{},[331,332,333],"strong",{},"Lists are ordered",[335,336],"br",{},"\nThe first item stays first, the second stays second, and so on.",[160,339,340,343,345,346,351],{},[331,341,342],{},"Lists are mutable",[335,344],{},"\nThis means you can change them after creating them. You can add, remove, or update items. If you want to learn more about this idea, see ",[347,348,350],"a",{"href":349},"\u002Flearn\u002Fmutability-in-python-explained-mutable-vs-immutable-types","mutability in Python",".",[160,353,354,357,359],{},[331,355,356],{},"A list can contain different data types",[335,358],{},"\nA single list can store strings, numbers, booleans, or even other lists.",[160,361,362,365,367],{},[331,363,364],{},"A list can contain duplicate values",[335,366],{},"\nThe same value can appear more than once.",[14,369,197],{},[26,371,373],{"className":28,"code":372,"language":30,"meta":31,"style":31},"mixed = [\"apple\", 10, True, \"apple\"]\nprint(mixed)\n",[33,374,375,412],{"__ignoreMap":31},[36,376,377,380,382,384,386,389,391,393,396,398,402,404,406,408,410],{"class":38,"line":39},[36,378,379],{"class":42},"mixed ",[36,381,47],{"class":46},[36,383,51],{"class":50},[36,385,214],{"class":141},[36,387,388],{"class":145},"apple",[36,390,214],{"class":141},[36,392,58],{"class":50},[36,394,395],{"class":54}," 10",[36,397,58],{"class":50},[36,399,401],{"class":400},"s39Yj"," True",[36,403,58],{"class":50},[36,405,224],{"class":141},[36,407,388],{"class":145},[36,409,214],{"class":141},[36,411,69],{"class":50},[36,413,414,416,418,421],{"class":38,"line":72},[36,415,76],{"class":75},[36,417,79],{"class":50},[36,419,420],{"class":82},"mixed",[36,422,86],{"class":50},[21,424,426],{"id":425},"simple-example","Simple example",[14,428,429],{},"Here is a small example that shows how to create a list, get one item, add a new item, and print the result.",[26,431,433],{"className":28,"code":432,"language":30,"meta":31,"style":31},"names = [\"Ana\", \"Ben\", \"Cara\"]\n\nprint(names[0])\n\nnames.append(\"Diego\")\n\nprint(names)\n",[33,434,435,471,477,494,499,520,525],{"__ignoreMap":31},[36,436,437,440,442,444,446,449,451,453,455,458,460,462,464,467,469],{"class":38,"line":39},[36,438,439],{"class":42},"names ",[36,441,47],{"class":46},[36,443,51],{"class":50},[36,445,214],{"class":141},[36,447,448],{"class":145},"Ana",[36,450,214],{"class":141},[36,452,58],{"class":50},[36,454,224],{"class":141},[36,456,457],{"class":145},"Ben",[36,459,214],{"class":141},[36,461,58],{"class":50},[36,463,224],{"class":141},[36,465,466],{"class":145},"Cara",[36,468,214],{"class":141},[36,470,69],{"class":50},[36,472,473],{"class":38,"line":72},[36,474,476],{"emptyLinePlaceholder":475},true,"\n",[36,478,479,481,483,486,488,491],{"class":38,"line":89},[36,480,76],{"class":75},[36,482,79],{"class":50},[36,484,485],{"class":82},"names",[36,487,117],{"class":50},[36,489,490],{"class":54},"0",[36,492,493],{"class":50},"])\n",[36,495,497],{"class":38,"line":496},4,[36,498,476],{"emptyLinePlaceholder":475},[36,500,502,504,506,509,511,513,516,518],{"class":38,"line":501},5,[36,503,485],{"class":42},[36,505,351],{"class":50},[36,507,508],{"class":82},"append",[36,510,79],{"class":50},[36,512,214],{"class":141},[36,514,515],{"class":145},"Diego",[36,517,214],{"class":141},[36,519,86],{"class":50},[36,521,523],{"class":38,"line":522},6,[36,524,476],{"emptyLinePlaceholder":475},[36,526,528,530,532,534],{"class":38,"line":527},7,[36,529,76],{"class":75},[36,531,79],{"class":50},[36,533,485],{"class":82},[36,535,86],{"class":50},[14,537,107],{},[26,539,541],{"className":28,"code":540,"language":30,"meta":31,"style":31},"Ana\n['Ana', 'Ben', 'Cara', 'Diego']\n",[33,542,543,548],{"__ignoreMap":31},[36,544,545],{"class":38,"line":39},[36,546,547],{"class":42},"Ana\n",[36,549,550,552,554,556,558,560,562,564,566,568,570,572,574,576,578,580,582],{"class":38,"line":72},[36,551,117],{"class":50},[36,553,149],{"class":141},[36,555,448],{"class":145},[36,557,149],{"class":141},[36,559,58],{"class":50},[36,561,142],{"class":141},[36,563,457],{"class":145},[36,565,149],{"class":141},[36,567,58],{"class":50},[36,569,142],{"class":141},[36,571,466],{"class":145},[36,573,149],{"class":141},[36,575,58],{"class":50},[36,577,142],{"class":141},[36,579,515],{"class":145},[36,581,149],{"class":141},[36,583,69],{"class":50},[14,585,586],{},"What this code does:",[157,588,589,595,601,607],{},[160,590,591,594],{},[33,592,593],{},"names = [\"Ana\", \"Ben\", \"Cara\"]"," creates a list",[160,596,597,600],{},[33,598,599],{},"names[0]"," gets the first item",[160,602,603,606],{},[33,604,605],{},"append(\"Diego\")"," adds a new item to the end",[160,608,609,612],{},[33,610,611],{},"print(names)"," shows the updated list",[14,614,615,616,618,619,621,622,624],{},"A useful detail for beginners: list indexes start at ",[33,617,490],{},", not ",[33,620,55],{},". So ",[33,623,599],{}," means the first item.",[14,626,627,628,632,633,637,638,351],{},"If you want a full guide, see ",[347,629,631],{"href":630},"\u002Flearn\u002Fpython-lists-explained-beginner-guide","Python lists explained for beginners",". If you specifically want to add items, see ",[347,634,636],{"href":635},"\u002Fhow-to\u002Fhow-to-add-an-item-to-a-list-in-python","how to add an item to a list in Python"," or the ",[347,639,641],{"href":640},"\u002Freference\u002Fpython-list-append-method","Python list append() method",[21,643,645],{"id":644},"list-vs-other-collection-types","List vs other collection types",[14,647,648],{},"Lists are one of several ways to store groups of data in Python.",[14,650,651],{},"Use a list when:",[157,653,654,657,660],{},[160,655,656],{},"Order matters",[160,658,659],{},"You may need to change the data later",[160,661,662],{},"You want to access items by position",[14,664,665],{},"Here is how lists compare to other common collection types:",[157,667,668,674,680,686],{},[160,669,670,673],{},[331,671,672],{},"List",": ordered and changeable",[160,675,676,679],{},[331,677,678],{},"Tuple",": similar to a list, but not meant to be changed",[160,681,682,685],{},[331,683,684],{},"Set",": does not allow duplicates and does not keep items in a fixed order the same way",[160,687,688,691],{},[331,689,690],{},"Dictionary",": stores key-value pairs instead of positions",[14,693,694],{},"Examples:",[26,696,698],{"className":28,"code":697,"language":30,"meta":31,"style":31},"my_list = [\"a\", \"b\", \"c\"]\nmy_tuple = (\"a\", \"b\", \"c\")\nmy_set = {\"a\", \"b\", \"c\"}\nmy_dict = {\"name\": \"Ana\", \"age\": 12}\n",[33,699,700,735,769,804],{"__ignoreMap":31},[36,701,702,705,707,709,711,713,715,717,719,722,724,726,728,731,733],{"class":38,"line":39},[36,703,704],{"class":42},"my_list ",[36,706,47],{"class":46},[36,708,51],{"class":50},[36,710,214],{"class":141},[36,712,347],{"class":145},[36,714,214],{"class":141},[36,716,58],{"class":50},[36,718,224],{"class":141},[36,720,721],{"class":145},"b",[36,723,214],{"class":141},[36,725,58],{"class":50},[36,727,224],{"class":141},[36,729,730],{"class":145},"c",[36,732,214],{"class":141},[36,734,69],{"class":50},[36,736,737,740,742,745,747,749,751,753,755,757,759,761,763,765,767],{"class":38,"line":72},[36,738,739],{"class":42},"my_tuple ",[36,741,47],{"class":46},[36,743,744],{"class":50}," (",[36,746,214],{"class":141},[36,748,347],{"class":145},[36,750,214],{"class":141},[36,752,58],{"class":50},[36,754,224],{"class":141},[36,756,721],{"class":145},[36,758,214],{"class":141},[36,760,58],{"class":50},[36,762,224],{"class":141},[36,764,730],{"class":145},[36,766,214],{"class":141},[36,768,86],{"class":50},[36,770,771,774,776,779,781,783,785,787,789,791,793,795,797,799,801],{"class":38,"line":89},[36,772,773],{"class":42},"my_set ",[36,775,47],{"class":46},[36,777,778],{"class":50}," {",[36,780,214],{"class":141},[36,782,347],{"class":145},[36,784,214],{"class":141},[36,786,58],{"class":50},[36,788,224],{"class":141},[36,790,721],{"class":145},[36,792,214],{"class":141},[36,794,58],{"class":50},[36,796,224],{"class":141},[36,798,730],{"class":145},[36,800,214],{"class":141},[36,802,803],{"class":50},"}\n",[36,805,806,809,811,813,815,818,820,823,825,827,829,831,833,836,838,840,843],{"class":38,"line":496},[36,807,808],{"class":42},"my_dict ",[36,810,47],{"class":46},[36,812,778],{"class":50},[36,814,214],{"class":141},[36,816,817],{"class":145},"name",[36,819,214],{"class":141},[36,821,822],{"class":50},":",[36,824,224],{"class":141},[36,826,448],{"class":145},[36,828,214],{"class":141},[36,830,58],{"class":50},[36,832,224],{"class":141},[36,834,835],{"class":145},"age",[36,837,214],{"class":141},[36,839,822],{"class":50},[36,841,842],{"class":54}," 12",[36,844,803],{"class":50},[14,846,847,848,852,853,857],{},"If you want a beginner-friendly comparison, read ",[347,849,851],{"href":850},"\u002Flearn\u002Fwhen-to-use-lists-vs-tuples-vs-sets-vs-dictionaries","when to use lists vs tuples vs sets vs dictionaries",". You can also see ",[347,854,856],{"href":855},"\u002Fglossary\u002Fwhat-is-a-tuple-in-python","what is a tuple in Python"," for a closer look at tuples.",[21,859,861],{"id":860},"what-this-page-does-not-cover","What this page does not cover",[14,863,864],{},"This page is a glossary-style definition, not a full tutorial.",[14,866,867],{},"It does not cover:",[157,869,870,873,876],{},[160,871,872],{},"Every list method",[160,874,875],{},"Step-by-step tasks for adding or removing items",[160,877,878],{},"Advanced list topics",[14,880,881],{},"For the next step, you can read:",[157,883,884,890,896],{},[160,885,886],{},[347,887,889],{"href":888},"\u002Freference\u002Fpython-list-creating-a-list","how to create a list in Python",[160,891,892],{},[347,893,895],{"href":894},"\u002Fhow-to\u002Fhow-to-remove-an-item-from-a-list-in-python","how to remove an item from a list in Python",[160,897,898],{},[347,899,901],{"href":900},"\u002Freference\u002Fpython-list-length-len","Python len() for list length",[21,903,905],{"id":904},"common-mistakes","Common mistakes",[14,907,908],{},"Beginners often run into the same list-related problems. Here are a few common ones.",[157,910,911,919,938,950],{},[160,912,913,916,918],{},[331,914,915],{},"Thinking a list can only store one type of value",[335,917],{},"\nThis is not true. A list can store mixed types.",[160,920,921,924,926,927,929,930,933,934,937],{},[331,922,923],{},"Confusing lists with tuples or dictionaries",[335,925],{},"\nLists use square brackets ",[33,928,165],{},". Tuples use parentheses ",[33,931,932],{},"()",". Dictionaries use curly braces ",[33,935,936],{},"{}"," with keys and values.",[160,939,940,943,945,946,618,948,351],{},[331,941,942],{},"Forgetting that list indexes start at 0",[335,944],{},"\nThe first item is at index ",[33,947,490],{},[33,949,55],{},[160,951,952,955,957],{},[331,953,954],{},"Using parentheses instead of square brackets",[335,956],{},"\nThis creates a tuple, not a list.",[14,959,960],{},"These quick checks can help when you are unsure what a variable contains:",[26,962,964],{"className":28,"code":963,"language":30,"meta":31,"style":31},"print(my_list)\nprint(type(my_list))\nprint(len(my_list))\nprint(my_list[0])\n",[33,965,966,977,991,1006],{"__ignoreMap":31},[36,967,968,970,972,975],{"class":38,"line":39},[36,969,76],{"class":75},[36,971,79],{"class":50},[36,973,974],{"class":82},"my_list",[36,976,86],{"class":50},[36,978,979,981,983,985,987,989],{"class":38,"line":72},[36,980,76],{"class":75},[36,982,79],{"class":50},[36,984,97],{"class":96},[36,986,79],{"class":50},[36,988,974],{"class":82},[36,990,104],{"class":50},[36,992,993,995,997,1000,1002,1004],{"class":38,"line":89},[36,994,76],{"class":75},[36,996,79],{"class":50},[36,998,999],{"class":75},"len",[36,1001,79],{"class":50},[36,1003,974],{"class":82},[36,1005,104],{"class":50},[36,1007,1008,1010,1012,1014,1016,1018],{"class":38,"line":496},[36,1009,76],{"class":75},[36,1011,79],{"class":50},[36,1013,974],{"class":82},[36,1015,117],{"class":50},[36,1017,490],{"class":54},[36,1019,493],{"class":50},[14,1021,1022],{},"What each line does:",[157,1024,1025,1031,1037,1043],{},[160,1026,1027,1030],{},[33,1028,1029],{},"print(my_list)"," shows the full value",[160,1032,1033,1036],{},[33,1034,1035],{},"print(type(my_list))"," confirms whether it is a list",[160,1038,1039,1042],{},[33,1040,1041],{},"print(len(my_list))"," shows how many items it contains",[160,1044,1045,1048],{},[33,1046,1047],{},"print(my_list[0])"," shows the first item",[14,1050,1051,1052,1055,1056,351],{},"Be careful with ",[33,1053,1054],{},"my_list[0]"," if the list might be empty. If you access an index that does not exist, you may get an error. For help with that, see ",[347,1057,1059],{"href":1058},"\u002Ferrors\u002Findexerror-list-index-out-of-range-fix-explained","IndexError: list index out of range",[21,1061,1063],{"id":1062},"faq","FAQ",[1065,1066,1068],"h3",{"id":1067},"what-is-a-list-in-python-in-simple-words","What is a list in Python in simple words?",[14,1070,1071],{},"A list is a container that holds multiple values in a single variable.",[1065,1073,1075],{"id":1074},"can-a-python-list-store-different-types-of-values","Can a Python list store different types of values?",[14,1077,1078],{},"Yes. A list can contain strings, numbers, booleans, and even other lists.",[1065,1080,1082],{"id":1081},"are-python-lists-ordered","Are Python lists ordered?",[14,1084,1085],{},"Yes. Items stay in a specific order, and you can access them by index.",[1065,1087,1089],{"id":1088},"can-you-change-a-list-after-creating-it","Can you change a list after creating it?",[14,1091,1092],{},"Yes. Lists are mutable, so you can add, remove, or update items.",[1065,1094,1096],{"id":1095},"what-symbols-are-used-to-create-a-list","What symbols are used to create a list?",[14,1098,1099,1100],{},"Square brackets: ",[33,1101,165],{},[21,1103,1105],{"id":1104},"see-also","See also",[157,1107,1108,1112,1117,1121,1126,1131],{},[160,1109,1110],{},[347,1111,631],{"href":630},[160,1113,1114],{},[347,1115,1116],{"href":888},"How to create a list in Python",[160,1118,1119],{},[347,1120,641],{"href":640},[160,1122,1123],{},[347,1124,1125],{"href":635},"How to add an item to a list in Python",[160,1127,1128],{},[347,1129,1130],{"href":894},"How to remove an item from a list in Python",[160,1132,1133],{},[347,1134,1135],{"href":850},"When to use lists vs tuples vs sets vs dictionaries",[1137,1138,1139],"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 .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--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 .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--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 .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}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 .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":31,"searchDepth":72,"depth":72,"links":1141},[1142,1143,1144,1145,1146,1147,1148,1149,1150,1157],{"id":23,"depth":72,"text":24},{"id":174,"depth":72,"text":175},{"id":250,"depth":72,"text":251},{"id":321,"depth":72,"text":322},{"id":425,"depth":72,"text":426},{"id":644,"depth":72,"text":645},{"id":860,"depth":72,"text":861},{"id":904,"depth":72,"text":905},{"id":1062,"depth":72,"text":1063,"children":1151},[1152,1153,1154,1155,1156],{"id":1067,"depth":89,"text":1068},{"id":1074,"depth":89,"text":1075},{"id":1081,"depth":89,"text":1082},{"id":1088,"depth":89,"text":1089},{"id":1095,"depth":89,"text":1096},{"id":1104,"depth":72,"text":1105},"Master what is a list in python in our comprehensive Python beginner guide.","md",{},"\u002Fglossary\u002Fwhat-is-a-list-in-python",{"title":5,"description":1158},"glossary\u002Fwhat-is-a-list-in-python","dh7DeBT0q0jLOhGG99UV3YC86vCppkWBoDPlSDWoyPQ",1777585468117]