[{"data":1,"prerenderedAt":1167},["ShallowReactive",2],{"doc-\u002Ferrors\u002Fsyntaxerror-missing-colon-fix":3},{"id":4,"title":5,"body":6,"description":1160,"extension":1161,"meta":1162,"navigation":134,"path":1163,"seo":1164,"stem":1165,"__hash__":1166},"content\u002Ferrors\u002Fsyntaxerror-missing-colon-fix.md","SyntaxError: missing colon (Fix)",{"type":7,"value":8,"toc":1140},"minimark",[9,13,22,27,73,247,250,254,261,264,288,291,321,324,328,334,337,390,393,397,400,457,473,477,480,525,528,588,591,594,637,640,648,652,655,676,679,714,717,720,755,757,784,787,825,828,865,867,873,877,880,915,918,932,935,953,964,968,971,973,988,995,999,1002,1042,1046,1051,1060,1064,1067,1071,1074,1081,1089,1093,1096,1100,1136],[10,11,5],"h1",{"id":12},"syntaxerror-missing-colon-fix",[14,15,16,17,21],"p",{},"Fix the Python error ",[18,19,20],"code",{},"SyntaxError: missing colon",". This page helps beginners find where the colon is missing, understand why Python needs it, and correct the code quickly.",[23,24,26],"h2",{"id":25},"quick-fix","Quick fix",[14,28,29,30,33,34,33,37,33,40,33,43,33,46,33,49,33,52,33,55,33,58,33,61,64,65,68,69,72],{},"Add a colon at the end of lines that start a block, such as ",[18,31,32],{},"if",", ",[18,35,36],{},"elif",[18,38,39],{},"else",[18,41,42],{},"for",[18,44,45],{},"while",[18,47,48],{},"def",[18,50,51],{},"class",[18,53,54],{},"try",[18,56,57],{},"except",[18,59,60],{},"finally",[18,62,63],{},"with",", and ",[18,66,67],{},"match","\u002F",[18,70,71],{},"case",".",[74,75,80],"pre",{"className":76,"code":77,"language":78,"meta":79,"style":79},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","if age > 18:\n    print(\"Adult\")\n\nfor item in [1, 2, 3]:\n    print(item)\n\ndef greet(name):\n    print(\"Hello\", name)\n\nclass Person:\n    pass\n","python","",[18,81,82,106,129,136,167,180,185,204,225,230,241],{"__ignoreMap":79},[83,84,87,90,94,98,102],"span",{"class":85,"line":86},"line",1,[83,88,32],{"class":89},"sVHd0",[83,91,93],{"class":92},"su5hD"," age ",[83,95,97],{"class":96},"smGrS",">",[83,99,101],{"class":100},"srdBf"," 18",[83,103,105],{"class":104},"sP7_E",":\n",[83,107,109,113,116,120,124,126],{"class":85,"line":108},2,[83,110,112],{"class":111},"sptTA","    print",[83,114,115],{"class":104},"(",[83,117,119],{"class":118},"sjJ54","\"",[83,121,123],{"class":122},"s_sjI","Adult",[83,125,119],{"class":118},[83,127,128],{"class":104},")\n",[83,130,132],{"class":85,"line":131},3,[83,133,135],{"emptyLinePlaceholder":134},true,"\n",[83,137,139,141,144,147,150,153,156,159,161,164],{"class":85,"line":138},4,[83,140,42],{"class":89},[83,142,143],{"class":92}," item ",[83,145,146],{"class":89},"in",[83,148,149],{"class":104}," [",[83,151,152],{"class":100},"1",[83,154,155],{"class":104},",",[83,157,158],{"class":100}," 2",[83,160,155],{"class":104},[83,162,163],{"class":100}," 3",[83,165,166],{"class":104},"]:\n",[83,168,170,172,174,178],{"class":85,"line":169},5,[83,171,112],{"class":111},[83,173,115],{"class":104},[83,175,177],{"class":176},"slqww","item",[83,179,128],{"class":104},[83,181,183],{"class":85,"line":182},6,[83,184,135],{"emptyLinePlaceholder":134},[83,186,188,191,195,197,201],{"class":85,"line":187},7,[83,189,48],{"class":190},"sbsja",[83,192,194],{"class":193},"sGLFI"," greet",[83,196,115],{"class":104},[83,198,200],{"class":199},"sFwrP","name",[83,202,203],{"class":104},"):\n",[83,205,207,209,211,213,216,218,220,223],{"class":85,"line":206},8,[83,208,112],{"class":111},[83,210,115],{"class":104},[83,212,119],{"class":118},[83,214,215],{"class":122},"Hello",[83,217,119],{"class":118},[83,219,155],{"class":104},[83,221,222],{"class":176}," name",[83,224,128],{"class":104},[83,226,228],{"class":85,"line":227},9,[83,229,135],{"emptyLinePlaceholder":134},[83,231,233,235,239],{"class":85,"line":232},10,[83,234,51],{"class":190},[83,236,238],{"class":237},"sbgvK"," Person",[83,240,105],{"class":104},[83,242,244],{"class":85,"line":243},11,[83,245,246],{"class":89},"    pass\n",[14,248,249],{},"If you add the colon, also make sure the next line is indented.",[23,251,253],{"id":252},"what-this-error-means","What this error means",[14,255,256,257,260],{},"Python expected a colon ",[18,258,259],{},":"," at the end of a statement that starts an indented block.",[14,262,263],{},"A block is a group of indented lines under statements like:",[265,266,267,272,276,280,284],"ul",{},[268,269,270],"li",{},[18,271,32],{},[268,273,274],{},[18,275,42],{},[268,277,278],{},[18,279,45],{},[268,281,282],{},[18,283,48],{},[268,285,286],{},[18,287,51],{},[14,289,290],{},"For example:",[74,292,294],{"className":76,"code":293,"language":78,"meta":79,"style":79},"if True:\n    print(\"This line is inside the if block\")\n",[18,295,296,306],{"__ignoreMap":79},[83,297,298,300,304],{"class":85,"line":86},[83,299,32],{"class":89},[83,301,303],{"class":302},"s39Yj"," True",[83,305,105],{"class":104},[83,307,308,310,312,314,317,319],{"class":85,"line":108},[83,309,112],{"class":111},[83,311,115],{"class":104},[83,313,119],{"class":118},[83,315,316],{"class":122},"This line is inside the if block",[83,318,119],{"class":118},[83,320,128],{"class":104},[14,322,323],{},"This is a syntax error, which means Python cannot run the code until you fix it.",[23,325,327],{"id":326},"why-this-happens","Why this happens",[14,329,330,331,333],{},"This error usually happens when you forget ",[18,332,259],{}," after a line that should start a block.",[14,335,336],{},"Common cases include:",[265,338,339,353,363,370,377],{},[268,340,341,342,344,345,33,347,349,350,352],{},"You forgot ",[18,343,259],{}," after an ",[18,346,32],{},[18,348,36],{},", or ",[18,351,39],{}," statement.",[268,354,341,355,357,358,360,361,72],{},[18,356,259],{}," after a loop like ",[18,359,42],{}," or ",[18,362,45],{},[268,364,341,365,367,368,72],{},[18,366,259],{}," after defining a function with ",[18,369,48],{},[268,371,341,372,374,375,72],{},[18,373,259],{}," after defining a class with ",[18,376,51],{},[268,378,341,379,381,382,33,384,33,386,349,388,72],{},[18,380,259],{}," after ",[18,383,54],{},[18,385,57],{},[18,387,60],{},[18,389,63],{},[14,391,392],{},"Sometimes Python highlights the line where it noticed the problem, but the real mistake is on the line above it.",[23,394,396],{"id":395},"common-places-where-a-colon-is-required","Common places where a colon is required",[14,398,399],{},"Here are some common Python statements that must end with a colon:",[265,401,402,407,412,417,422,427,432,437,442,447,452],{},[268,403,404],{},[18,405,406],{},"if condition:",[268,408,409],{},[18,410,411],{},"elif condition:",[268,413,414],{},[18,415,416],{},"else:",[268,418,419],{},[18,420,421],{},"for item in items:",[268,423,424],{},[18,425,426],{},"while condition:",[268,428,429],{},[18,430,431],{},"def my_function():",[268,433,434],{},[18,435,436],{},"class MyClass:",[268,438,439],{},[18,440,441],{},"try:",[268,443,444],{},[18,445,446],{},"except ValueError:",[268,448,449],{},[18,450,451],{},"finally:",[268,453,454],{},[18,455,456],{},"with open(\"file.txt\") as f:",[14,458,459,460,33,465,64,469,72],{},"If you are learning these statements for the first time, see ",[461,462,464],"a",{"href":463},"\u002Flearn\u002Fpython-if-statements-explained\u002F","Python if statements explained",[461,466,468],{"href":467},"\u002Flearn\u002Fpython-for-loops-explained\u002F","Python for loops explained",[461,470,472],{"href":471},"\u002Flearn\u002Fpython-functions-explained\u002F","Python functions explained",[23,474,476],{"id":475},"example-that-causes-the-error","Example that causes the error",[14,478,479],{},"Here is a simple example with a missing colon:",[74,481,483],{"className":76,"code":482,"language":78,"meta":79,"style":79},"age = 20\n\nif age > 18\n    print(\"Adult\")\n",[18,484,485,496,500,511],{"__ignoreMap":79},[83,486,487,490,493],{"class":85,"line":86},[83,488,489],{"class":92},"age ",[83,491,492],{"class":96},"=",[83,494,495],{"class":100}," 20\n",[83,497,498],{"class":85,"line":108},[83,499,135],{"emptyLinePlaceholder":134},[83,501,502,504,506,508],{"class":85,"line":131},[83,503,32],{"class":89},[83,505,93],{"class":92},[83,507,97],{"class":96},[83,509,510],{"class":100}," 18\n",[83,512,513,515,517,519,521,523],{"class":85,"line":138},[83,514,112],{"class":111},[83,516,115],{"class":104},[83,518,119],{"class":118},[83,520,123],{"class":122},[83,522,119],{"class":118},[83,524,128],{"class":104},[14,526,527],{},"A beginner will usually see an error like this:",[74,529,531],{"className":76,"code":530,"language":78,"meta":79,"style":79},"  File \"script.py\", line 3\n    if age > 18\n               ^\nSyntaxError: expected ':'\n",[18,532,533,553,564,569],{"__ignoreMap":79},[83,534,535,538,540,543,545,547,550],{"class":85,"line":86},[83,536,537],{"class":92},"  File ",[83,539,119],{"class":118},[83,541,542],{"class":122},"script.py",[83,544,119],{"class":118},[83,546,155],{"class":104},[83,548,549],{"class":92}," line ",[83,551,552],{"class":100},"3\n",[83,554,555,558,560,562],{"class":85,"line":108},[83,556,557],{"class":89},"    if",[83,559,93],{"class":92},[83,561,97],{"class":96},[83,563,510],{"class":100},[83,565,566],{"class":85,"line":131},[83,567,568],{"class":96},"               ^\n",[83,570,571,575,577,580,583,585],{"class":85,"line":138},[83,572,574],{"class":573},"sZMiF","SyntaxError",[83,576,259],{"class":104},[83,578,579],{"class":92}," expected ",[83,581,582],{"class":118},"'",[83,584,259],{"class":122},[83,586,587],{"class":118},"'\n",[14,589,590],{},"The problem is easy to miss because only one character is missing.",[14,592,593],{},"To fix it, add the colon:",[74,595,597],{"className":76,"code":596,"language":78,"meta":79,"style":79},"age = 20\n\nif age > 18:\n    print(\"Adult\")\n",[18,598,599,607,611,623],{"__ignoreMap":79},[83,600,601,603,605],{"class":85,"line":86},[83,602,489],{"class":92},[83,604,492],{"class":96},[83,606,495],{"class":100},[83,608,609],{"class":85,"line":108},[83,610,135],{"emptyLinePlaceholder":134},[83,612,613,615,617,619,621],{"class":85,"line":131},[83,614,32],{"class":89},[83,616,93],{"class":92},[83,618,97],{"class":96},[83,620,101],{"class":100},[83,622,105],{"class":104},[83,624,625,627,629,631,633,635],{"class":85,"line":138},[83,626,112],{"class":111},[83,628,115],{"class":104},[83,630,119],{"class":118},[83,632,123],{"class":122},[83,634,119],{"class":118},[83,636,128],{"class":104},[14,638,639],{},"Output:",[74,641,646],{"className":642,"code":644,"language":645,"meta":79},[643],"language-text","Adult\n","text",[18,647,644],{"__ignoreMap":79},[23,649,651],{"id":650},"how-to-fix-it","How to fix it",[14,653,654],{},"Use these steps:",[656,657,658,661,664,670,673],"ol",{},[268,659,660],{},"Look at the line named in the error message.",[268,662,663],{},"Check whether that line starts a block.",[268,665,666,667,669],{},"Add ",[18,668,259],{}," at the end of that line.",[268,671,672],{},"Make sure the next line is indented correctly.",[268,674,675],{},"Run the code again.",[14,677,678],{},"Example:",[74,680,682],{"className":76,"code":681,"language":78,"meta":79,"style":79},"def greet(name)\n    print(\"Hello\", name)\n",[18,683,684,696],{"__ignoreMap":79},[83,685,686,688,690,692,694],{"class":85,"line":86},[83,687,48],{"class":190},[83,689,194],{"class":193},[83,691,115],{"class":104},[83,693,200],{"class":199},[83,695,128],{"class":104},[83,697,698,700,702,704,706,708,710,712],{"class":85,"line":108},[83,699,112],{"class":111},[83,701,115],{"class":104},[83,703,119],{"class":118},[83,705,215],{"class":122},[83,707,119],{"class":118},[83,709,155],{"class":104},[83,711,222],{"class":176},[83,713,128],{"class":104},[14,715,716],{},"This is wrong because the function definition is missing a colon.",[14,718,719],{},"Correct version:",[74,721,723],{"className":76,"code":722,"language":78,"meta":79,"style":79},"def greet(name):\n    print(\"Hello\", name)\n",[18,724,725,737],{"__ignoreMap":79},[83,726,727,729,731,733,735],{"class":85,"line":86},[83,728,48],{"class":190},[83,730,194],{"class":193},[83,732,115],{"class":104},[83,734,200],{"class":199},[83,736,203],{"class":104},[83,738,739,741,743,745,747,749,751,753],{"class":85,"line":108},[83,740,112],{"class":111},[83,742,115],{"class":104},[83,744,119],{"class":118},[83,746,215],{"class":122},[83,748,119],{"class":118},[83,750,155],{"class":104},[83,752,222],{"class":176},[83,754,128],{"class":104},[14,756,639],{},[74,758,760],{"className":76,"code":759,"language":78,"meta":79,"style":79},"greet(\"Sam\")\n# Hello Sam\n",[18,761,762,778],{"__ignoreMap":79},[83,763,764,767,769,771,774,776],{"class":85,"line":86},[83,765,766],{"class":176},"greet",[83,768,115],{"class":104},[83,770,119],{"class":118},[83,772,773],{"class":122},"Sam",[83,775,119],{"class":118},[83,777,128],{"class":104},[83,779,780],{"class":85,"line":108},[83,781,783],{"class":782},"sutJx","# Hello Sam\n",[14,785,786],{},"Another example with a loop:",[74,788,790],{"className":76,"code":789,"language":78,"meta":79,"style":79},"for item in [1, 2, 3]\n    print(item)\n",[18,791,792,815],{"__ignoreMap":79},[83,793,794,796,798,800,802,804,806,808,810,812],{"class":85,"line":86},[83,795,42],{"class":89},[83,797,143],{"class":92},[83,799,146],{"class":89},[83,801,149],{"class":104},[83,803,152],{"class":100},[83,805,155],{"class":104},[83,807,158],{"class":100},[83,809,155],{"class":104},[83,811,163],{"class":100},[83,813,814],{"class":104},"]\n",[83,816,817,819,821,823],{"class":85,"line":108},[83,818,112],{"class":111},[83,820,115],{"class":104},[83,822,177],{"class":176},[83,824,128],{"class":104},[14,826,827],{},"Fix:",[74,829,831],{"className":76,"code":830,"language":78,"meta":79,"style":79},"for item in [1, 2, 3]:\n    print(item)\n",[18,832,833,855],{"__ignoreMap":79},[83,834,835,837,839,841,843,845,847,849,851,853],{"class":85,"line":86},[83,836,42],{"class":89},[83,838,143],{"class":92},[83,840,146],{"class":89},[83,842,149],{"class":104},[83,844,152],{"class":100},[83,846,155],{"class":104},[83,848,158],{"class":100},[83,850,155],{"class":104},[83,852,163],{"class":100},[83,854,166],{"class":104},[83,856,857,859,861,863],{"class":85,"line":108},[83,858,112],{"class":111},[83,860,115],{"class":104},[83,862,177],{"class":176},[83,864,128],{"class":104},[14,866,639],{},[74,868,871],{"className":869,"code":870,"language":645,"meta":79},[643],"1\n2\n3\n",[18,872,870],{"__ignoreMap":79},[23,874,876],{"id":875},"debugging-tips-for-beginners","Debugging tips for beginners",[14,878,879],{},"When you get this error, try these simple checks:",[265,881,882,885,888,891,904,909,912],{},[268,883,884],{},"Read the full error message carefully.",[268,886,887],{},"Check the line Python points to.",[268,889,890],{},"Also check the line just above it.",[268,892,893,894,33,896,33,898,33,900,349,902,72],{},"Look for lines starting with ",[18,895,32],{},[18,897,42],{},[18,899,45],{},[18,901,48],{},[18,903,51],{},[268,905,906,907,72],{},"Make sure those lines end with ",[18,908,259],{},[268,910,911],{},"Use a code editor that highlights syntax errors.",[268,913,914],{},"Fix one syntax error at a time, then run the code again.",[14,916,917],{},"You can also run your file from the terminal:",[74,919,923],{"className":920,"code":921,"language":922,"meta":79,"style":79},"language-bash shiki shiki-themes material-theme-lighter github-light github-dark","python script.py\n","bash",[18,924,925],{"__ignoreMap":79},[83,926,927,929],{"class":85,"line":86},[83,928,78],{"class":237},[83,930,931],{"class":122}," script.py\n",[14,933,934],{},"Or ask Python to check the file for syntax problems:",[74,936,938],{"className":920,"code":937,"language":922,"meta":79,"style":79},"python -m py_compile script.py\n",[18,939,940],{"__ignoreMap":79},[83,941,942,944,948,951],{"class":85,"line":86},[83,943,78],{"class":237},[83,945,947],{"class":946},"stzsN"," -m",[83,949,950],{"class":122}," py_compile",[83,952,931],{"class":122},[14,954,955,956,360,960,72],{},"If the colon is fixed but Python then complains about indentation, see ",[461,957,959],{"href":958},"\u002Ferrors\u002Findentationerror-expected-an-indented-block-fix\u002F","IndentationError: expected an indented block",[461,961,963],{"href":962},"\u002Ferrors\u002Findentationerror-unexpected-indent-fix\u002F","IndentationError: unexpected indent",[23,965,967],{"id":966},"related-problems-that-can-look-similar","Related problems that can look similar",[14,969,970],{},"A missing colon often leads to other confusing errors.",[14,972,290],{},[265,974,975,978,981],{},[268,976,977],{},"After adding the colon, you may get an indentation error if the next line is not indented correctly.",[268,979,980],{},"A missing parenthesis or quote can sometimes make Python point to the wrong place.",[268,982,983,984,72],{},"A more general syntax mistake may be better explained by ",[461,985,987],{"href":986},"\u002Ferrors\u002Fsyntaxerror-invalid-syntax-fix\u002F","SyntaxError: invalid syntax",[14,989,990,991,72],{},"If you are unsure how indentation works in Python, read ",[461,992,994],{"href":993},"\u002Flearn\u002Fpython-indentation-rules-and-why-they-matter\u002F","Python indentation rules and why they matter",[23,996,998],{"id":997},"common-mistakes","Common mistakes",[14,1000,1001],{},"These are the most common causes of this error:",[265,1003,1004,1009,1015,1021,1025,1029,1039],{},[268,1005,1006,1007],{},"Missing colon after ",[18,1008,32],{},[268,1010,1006,1011,360,1013],{},[18,1012,36],{},[18,1014,39],{},[268,1016,1006,1017,360,1019],{},[18,1018,42],{},[18,1020,45],{},[268,1022,1006,1023],{},[18,1024,48],{},[268,1026,1006,1027],{},[18,1028,51],{},[268,1030,1006,1031,33,1033,33,1035,349,1037],{},[18,1032,54],{},[18,1034,57],{},[18,1036,60],{},[18,1038,63],{},[268,1040,1041],{},"Looking only at the highlighted line when the actual mistake is just above it",[23,1043,1045],{"id":1044},"faq","FAQ",[1047,1048,1050],"h3",{"id":1049},"where-should-the-colon-go-in-python","Where should the colon go in Python?",[14,1052,1053,1054,360,1057,72],{},"Put the colon at the end of a line that starts a block, like ",[18,1055,1056],{},"if x > 0:",[18,1058,1059],{},"def greet():",[1047,1061,1063],{"id":1062},"why-does-python-need-a-colon","Why does Python need a colon?",[14,1065,1066],{},"The colon tells Python that an indented block of code comes next.",[1047,1068,1070],{"id":1069},"why-is-python-pointing-to-the-wrong-line","Why is Python pointing to the wrong line?",[14,1072,1073],{},"Syntax errors are sometimes reported on the next line, so check the line above too.",[1047,1075,1077,1078,1080],{"id":1076},"can-this-happen-with-else","Can this happen with ",[18,1079,39],{},"?",[14,1082,1083,1084,1086,1087,72],{},"Yes. ",[18,1085,39],{}," must be written as ",[18,1088,416],{},[1047,1090,1092],{"id":1091},"is-this-the-same-as-an-indentation-error","Is this the same as an indentation error?",[14,1094,1095],{},"No. A missing colon is a syntax error. But after adding the colon, you may also need to fix indentation.",[23,1097,1099],{"id":1098},"see-also","See also",[265,1101,1102,1106,1110,1114,1120,1124,1128,1132],{},[268,1103,1104],{},[461,1105,464],{"href":463},[268,1107,1108],{},[461,1109,468],{"href":467},[268,1111,1112],{},[461,1113,472],{"href":471},[268,1115,1116],{},[461,1117,1119],{"href":1118},"\u002Flearn\u002Fpython-classes-and-objects-explained\u002F","Python classes and objects explained",[268,1121,1122],{},[461,1123,987],{"href":986},[268,1125,1126],{},[461,1127,959],{"href":958},[268,1129,1130],{},[461,1131,963],{"href":962},[268,1133,1134],{},[461,1135,994],{"href":993},[1137,1138,1139],"style",{},"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}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 .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--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 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 .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sFwrP, html code.shiki .sFwrP{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#24292E;--shiki-default-font-style:inherit;--shiki-dark:#E1E4E8;--shiki-dark-font-style:inherit}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}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 .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .stzsN, html code.shiki .stzsN{--shiki-light:#91B859;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":79,"searchDepth":108,"depth":108,"links":1141},[1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1159],{"id":25,"depth":108,"text":26},{"id":252,"depth":108,"text":253},{"id":326,"depth":108,"text":327},{"id":395,"depth":108,"text":396},{"id":475,"depth":108,"text":476},{"id":650,"depth":108,"text":651},{"id":875,"depth":108,"text":876},{"id":966,"depth":108,"text":967},{"id":997,"depth":108,"text":998},{"id":1044,"depth":108,"text":1045,"children":1152},[1153,1154,1155,1156,1158],{"id":1049,"depth":131,"text":1050},{"id":1062,"depth":131,"text":1063},{"id":1069,"depth":131,"text":1070},{"id":1076,"depth":131,"text":1157},"Can this happen with else?",{"id":1091,"depth":131,"text":1092},{"id":1098,"depth":108,"text":1099},"Master syntaxerror missing colon fix in our comprehensive Python beginner guide.","md",{},"\u002Ferrors\u002Fsyntaxerror-missing-colon-fix",{"title":5,"description":1160},"errors\u002Fsyntaxerror-missing-colon-fix","FktQYjN4s---3FEgbkV9J4bPkrTmNuBWH2NGZdG7Apw",1777585498427]