[{"data":1,"prerenderedAt":2365},["ShallowReactive",2],{"doc-\u002Flearn\u002Fpython-variables-explained-for-beginners":3},{"id":4,"title":5,"body":6,"description":2358,"extension":2359,"meta":2360,"navigation":90,"path":2361,"seo":2362,"stem":2363,"__hash__":2364},"content\u002Flearn\u002Fpython-variables-explained-for-beginners.md","Python Variables Explained for Beginners",{"type":7,"value":8,"toc":2316},"minimark",[9,13,17,20,36,41,122,128,132,135,138,151,154,168,173,212,215,242,250,254,257,271,274,287,296,299,318,321,324,379,382,397,404,408,411,414,431,436,466,468,477,488,492,555,557,581,585,634,636,651,654,658,711,713,722,726,729,733,736,751,754,795,799,804,807,817,820,834,838,840,849,851,870,874,883,931,933,948,952,967,970,979,983,986,989,1004,1007,1023,1026,1029,1080,1083,1086,1138,1140,1149,1152,1156,1159,1162,1206,1208,1220,1223,1226,1240,1244,1247,1250,1282,1284,1342,1349,1410,1412,1450,1461,1465,1468,1472,1502,1504,1518,1522,1575,1577,1585,1591,1661,1663,1687,1691,1734,1745,1753,1757,1760,1764,1766,1775,1778,1796,1800,1802,1811,1814,1828,1838,1850,1853,1866,1869,1888,1890,1899,1903,1906,1921,1930,1933,1956,1963,1967,1969,1978,1981,1995,1999,2002,2005,2027,2031,2035,2038,2042,2045,2105,2107,2140,2149,2154,2159,2187,2189,2197,2201,2204,2220,2223,2272,2276,2312],[10,11,5],"h1",{"id":12},"python-variables-explained-for-beginners",[14,15,16],"p",{},"Variables are one of the first things you learn in Python.",[14,18,19],{},"A variable is a name that points to a value. You use variables to store data, reuse it later, and make your programs easier to read.",[14,21,22,23,27,28,31,32,35],{},"In Python, you create a variable by assigning a value with the ",[24,25,26],"code",{},"="," sign. You do not need a special keyword like ",[24,29,30],{},"var"," or ",[24,33,34],{},"let",".",[37,38,40],"h2",{"id":39},"quick-example","Quick example",[42,43,48],"pre",{"className":44,"code":45,"language":46,"meta":47,"style":47},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","name = \"Alice\"\nage = 25\n\nprint(name)\nprint(age)\n","python","",[24,49,50,73,85,92,110],{"__ignoreMap":47},[51,52,55,59,62,66,70],"span",{"class":53,"line":54},"line",1,[51,56,58],{"class":57},"su5hD","name ",[51,60,26],{"class":61},"smGrS",[51,63,65],{"class":64},"sjJ54"," \"",[51,67,69],{"class":68},"s_sjI","Alice",[51,71,72],{"class":64},"\"\n",[51,74,76,79,81],{"class":53,"line":75},2,[51,77,78],{"class":57},"age ",[51,80,26],{"class":61},[51,82,84],{"class":83},"srdBf"," 25\n",[51,86,88],{"class":53,"line":87},3,[51,89,91],{"emptyLinePlaceholder":90},true,"\n",[51,93,95,99,103,107],{"class":53,"line":94},4,[51,96,98],{"class":97},"sptTA","print",[51,100,102],{"class":101},"sP7_E","(",[51,104,106],{"class":105},"slqww","name",[51,108,109],{"class":101},")\n",[51,111,113,115,117,120],{"class":53,"line":112},5,[51,114,98],{"class":97},[51,116,102],{"class":101},[51,118,119],{"class":105},"age",[51,121,109],{"class":101},[14,123,124,125,127],{},"Use the ",[24,126,26],{}," sign to assign a value to a variable. Then use the variable name later in your code.",[37,129,131],{"id":130},"what-a-variable-is","What a variable is",[14,133,134],{},"A variable is a name that refers to a value.",[14,136,137],{},"This lets you:",[139,140,141,145,148],"ul",{},[142,143,144],"li",{},"store data",[142,146,147],{},"use it later",[142,149,150],{},"update it when needed",[14,152,153],{},"For example, a variable might store:",[139,155,156,159,162,165],{},[142,157,158],{},"a person's name",[142,160,161],{},"a number",[142,163,164],{},"a price",[142,166,167],{},"a value entered by the user",[14,169,170,171,35],{},"In Python, a variable is created when you assign a value to it with ",[24,172,26],{},[42,174,176],{"className":44,"code":175,"language":46,"meta":47,"style":47},"message = \"Hello\"\nscore = 10\nprice = 4.99\n",[24,177,178,192,202],{"__ignoreMap":47},[51,179,180,183,185,187,190],{"class":53,"line":54},[51,181,182],{"class":57},"message ",[51,184,26],{"class":61},[51,186,65],{"class":64},[51,188,189],{"class":68},"Hello",[51,191,72],{"class":64},[51,193,194,197,199],{"class":53,"line":75},[51,195,196],{"class":57},"score ",[51,198,26],{"class":61},[51,200,201],{"class":83}," 10\n",[51,203,204,207,209],{"class":53,"line":87},[51,205,206],{"class":57},"price ",[51,208,26],{"class":61},[51,210,211],{"class":83}," 4.99\n",[14,213,214],{},"Here:",[139,216,217,226,234],{},[142,218,219,222,223],{},[24,220,221],{},"message"," refers to ",[24,224,225],{},"\"Hello\"",[142,227,228,222,231],{},[24,229,230],{},"score",[24,232,233],{},"10",[142,235,236,222,239],{},[24,237,238],{},"price",[24,240,241],{},"4.99",[14,243,244,245,35],{},"If you want a shorter definition, see ",[246,247,249],"a",{"href":248},"\u002Fglossary\u002Fwhat-is-a-variable-in-python\u002F","what is a variable in Python",[37,251,253],{"id":252},"how-to-create-a-variable-in-python","How to create a variable in Python",[14,255,256],{},"To create a variable:",[139,258,259,262,268],{},[142,260,261],{},"put the variable name on the left",[142,263,264,265,267],{},"put ",[24,266,26],{}," in the middle",[142,269,270],{},"put the value on the right",[14,272,273],{},"Example:",[42,275,277],{"className":44,"code":276,"language":46,"meta":47,"style":47},"score = 10\n",[24,278,279],{"__ignoreMap":47},[51,280,281,283,285],{"class":53,"line":54},[51,282,196],{"class":57},[51,284,26],{"class":61},[51,286,201],{"class":83},[14,288,289,290,292,293,295],{},"This means: “store the value ",[24,291,233],{}," in the variable named ",[24,294,230],{},".”",[14,297,298],{},"Python does not require a declaration first. This is valid:",[42,300,302],{"className":44,"code":301,"language":46,"meta":47,"style":47},"city = \"Paris\"\n",[24,303,304],{"__ignoreMap":47},[51,305,306,309,311,313,316],{"class":53,"line":54},[51,307,308],{"class":57},"city ",[51,310,26],{"class":61},[51,312,65],{"class":64},[51,314,315],{"class":68},"Paris",[51,317,72],{"class":64},[14,319,320],{},"You do not need to write anything before it.",[14,322,323],{},"Here is another simple example:",[42,325,327],{"className":44,"code":326,"language":46,"meta":47,"style":47},"user_name = \"Maya\"\nitem_count = 3\n\nprint(user_name)\nprint(item_count)\n",[24,328,329,343,353,357,368],{"__ignoreMap":47},[51,330,331,334,336,338,341],{"class":53,"line":54},[51,332,333],{"class":57},"user_name ",[51,335,26],{"class":61},[51,337,65],{"class":64},[51,339,340],{"class":68},"Maya",[51,342,72],{"class":64},[51,344,345,348,350],{"class":53,"line":75},[51,346,347],{"class":57},"item_count ",[51,349,26],{"class":61},[51,351,352],{"class":83}," 3\n",[51,354,355],{"class":53,"line":87},[51,356,91],{"emptyLinePlaceholder":90},[51,358,359,361,363,366],{"class":53,"line":94},[51,360,98],{"class":97},[51,362,102],{"class":101},[51,364,365],{"class":105},"user_name",[51,367,109],{"class":101},[51,369,370,372,374,377],{"class":53,"line":112},[51,371,98],{"class":97},[51,373,102],{"class":101},[51,375,376],{"class":105},"item_count",[51,378,109],{"class":101},[14,380,381],{},"Expected output:",[42,383,385],{"className":44,"code":384,"language":46,"meta":47,"style":47},"Maya\n3\n",[24,386,387,392],{"__ignoreMap":47},[51,388,389],{"class":53,"line":54},[51,390,391],{"class":57},"Maya\n",[51,393,394],{"class":53,"line":75},[51,395,396],{"class":83},"3\n",[14,398,399,400,35],{},"If you are also learning the basic rules of writing Python code, see ",[246,401,403],{"href":402},"\u002Flearn\u002Fpython-syntax-basics-explained\u002F","Python syntax basics explained",[37,405,407],{"id":406},"how-variables-are-used","How variables are used",[14,409,410],{},"Variables are useful because they let you reuse values.",[14,412,413],{},"You can use them to:",[139,415,416,419,422,425,428],{},[142,417,418],{},"print stored values",[142,420,421],{},"use the same value in multiple places",[142,423,424],{},"update values",[142,426,427],{},"do calculations",[142,429,430],{},"check conditions",[432,433,435],"h3",{"id":434},"print-stored-values","Print stored values",[42,437,439],{"className":44,"code":438,"language":46,"meta":47,"style":47},"language = \"Python\"\nprint(language)\n",[24,440,441,455],{"__ignoreMap":47},[51,442,443,446,448,450,453],{"class":53,"line":54},[51,444,445],{"class":57},"language ",[51,447,26],{"class":61},[51,449,65],{"class":64},[51,451,452],{"class":68},"Python",[51,454,72],{"class":64},[51,456,457,459,461,464],{"class":53,"line":75},[51,458,98],{"class":97},[51,460,102],{"class":101},[51,462,463],{"class":105},"language",[51,465,109],{"class":101},[14,467,381],{},[42,469,471],{"className":44,"code":470,"language":46,"meta":47,"style":47},"Python\n",[24,472,473],{"__ignoreMap":47},[51,474,475],{"class":53,"line":54},[51,476,470],{"class":57},[14,478,479,480,35],{},"You can learn more about this on the ",[246,481,483,484,487],{"href":482},"\u002Freference\u002Fpython-print-function-explained\u002F","Python ",[24,485,486],{},"print()"," function explained",[432,489,491],{"id":490},"reuse-a-value","Reuse a value",[42,493,495],{"className":44,"code":494,"language":46,"meta":47,"style":47},"name = \"Ava\"\n\nprint(\"Hello,\", name)\nprint(\"Your name is\", name)\n",[24,496,497,510,514,536],{"__ignoreMap":47},[51,498,499,501,503,505,508],{"class":53,"line":54},[51,500,58],{"class":57},[51,502,26],{"class":61},[51,504,65],{"class":64},[51,506,507],{"class":68},"Ava",[51,509,72],{"class":64},[51,511,512],{"class":53,"line":75},[51,513,91],{"emptyLinePlaceholder":90},[51,515,516,518,520,523,526,528,531,534],{"class":53,"line":87},[51,517,98],{"class":97},[51,519,102],{"class":101},[51,521,522],{"class":64},"\"",[51,524,525],{"class":68},"Hello,",[51,527,522],{"class":64},[51,529,530],{"class":101},",",[51,532,533],{"class":105}," name",[51,535,109],{"class":101},[51,537,538,540,542,544,547,549,551,553],{"class":53,"line":94},[51,539,98],{"class":97},[51,541,102],{"class":101},[51,543,522],{"class":64},[51,545,546],{"class":68},"Your name is",[51,548,522],{"class":64},[51,550,530],{"class":101},[51,552,533],{"class":105},[51,554,109],{"class":101},[14,556,381],{},[42,558,560],{"className":44,"code":559,"language":46,"meta":47,"style":47},"Hello, Ava\nYour name is Ava\n",[24,561,562,571],{"__ignoreMap":47},[51,563,564,566,568],{"class":53,"line":54},[51,565,189],{"class":57},[51,567,530],{"class":101},[51,569,570],{"class":57}," Ava\n",[51,572,573,576,579],{"class":53,"line":75},[51,574,575],{"class":57},"Your name ",[51,577,578],{"class":61},"is",[51,580,570],{"class":57},[432,582,584],{"id":583},"update-a-variable","Update a variable",[42,586,588],{"className":44,"code":587,"language":46,"meta":47,"style":47},"count = 1\nprint(count)\n\ncount = 2\nprint(count)\n",[24,589,590,600,611,615,624],{"__ignoreMap":47},[51,591,592,595,597],{"class":53,"line":54},[51,593,594],{"class":57},"count ",[51,596,26],{"class":61},[51,598,599],{"class":83}," 1\n",[51,601,602,604,606,609],{"class":53,"line":75},[51,603,98],{"class":97},[51,605,102],{"class":101},[51,607,608],{"class":105},"count",[51,610,109],{"class":101},[51,612,613],{"class":53,"line":87},[51,614,91],{"emptyLinePlaceholder":90},[51,616,617,619,621],{"class":53,"line":94},[51,618,594],{"class":57},[51,620,26],{"class":61},[51,622,623],{"class":83}," 2\n",[51,625,626,628,630,632],{"class":53,"line":112},[51,627,98],{"class":97},[51,629,102],{"class":101},[51,631,608],{"class":105},[51,633,109],{"class":101},[14,635,381],{},[42,637,639],{"className":44,"code":638,"language":46,"meta":47,"style":47},"1\n2\n",[24,640,641,646],{"__ignoreMap":47},[51,642,643],{"class":53,"line":54},[51,644,645],{"class":83},"1\n",[51,647,648],{"class":53,"line":75},[51,649,650],{"class":83},"2\n",[14,652,653],{},"The second assignment replaces the first value.",[432,655,657],{"id":656},"use-variables-in-calculations","Use variables in calculations",[42,659,661],{"className":44,"code":660,"language":46,"meta":47,"style":47},"price = 10\ntax = 2\ntotal = price + tax\n\nprint(total)\n",[24,662,663,671,680,696,700],{"__ignoreMap":47},[51,664,665,667,669],{"class":53,"line":54},[51,666,206],{"class":57},[51,668,26],{"class":61},[51,670,201],{"class":83},[51,672,673,676,678],{"class":53,"line":75},[51,674,675],{"class":57},"tax ",[51,677,26],{"class":61},[51,679,623],{"class":83},[51,681,682,685,687,690,693],{"class":53,"line":87},[51,683,684],{"class":57},"total ",[51,686,26],{"class":61},[51,688,689],{"class":57}," price ",[51,691,692],{"class":61},"+",[51,694,695],{"class":57}," tax\n",[51,697,698],{"class":53,"line":94},[51,699,91],{"emptyLinePlaceholder":90},[51,701,702,704,706,709],{"class":53,"line":112},[51,703,98],{"class":97},[51,705,102],{"class":101},[51,707,708],{"class":105},"total",[51,710,109],{"class":101},[14,712,381],{},[42,714,716],{"className":44,"code":715,"language":46,"meta":47,"style":47},"12\n",[24,717,718],{"__ignoreMap":47},[51,719,720],{"class":53,"line":54},[51,721,715],{"class":83},[37,723,725],{"id":724},"variable-naming-rules","Variable naming rules",[14,727,728],{},"Python has a few rules for variable names.",[432,730,732],{"id":731},"allowed","Allowed",[14,734,735],{},"Variable names can contain:",[139,737,738,741,744],{},[142,739,740],{},"letters",[142,742,743],{},"numbers",[142,745,746,747,750],{},"underscores (",[24,748,749],{},"_",")",[14,752,753],{},"Examples:",[42,755,757],{"className":44,"code":756,"language":46,"meta":47,"style":47},"name = \"Sam\"\nscore1 = 99\nuser_name = \"sam123\"\n",[24,758,759,772,782],{"__ignoreMap":47},[51,760,761,763,765,767,770],{"class":53,"line":54},[51,762,58],{"class":57},[51,764,26],{"class":61},[51,766,65],{"class":64},[51,768,769],{"class":68},"Sam",[51,771,72],{"class":64},[51,773,774,777,779],{"class":53,"line":75},[51,775,776],{"class":57},"score1 ",[51,778,26],{"class":61},[51,780,781],{"class":83}," 99\n",[51,783,784,786,788,790,793],{"class":53,"line":87},[51,785,333],{"class":57},[51,787,26],{"class":61},[51,789,65],{"class":64},[51,791,792],{"class":68},"sam123",[51,794,72],{"class":64},[432,796,798],{"id":797},"not-allowed","Not allowed",[800,801,803],"h4",{"id":802},"names-cannot-start-with-a-number","Names cannot start with a number",[14,805,806],{},"This is invalid:",[42,808,810],{"className":44,"code":809,"language":46,"meta":47,"style":47},"# 2score = 10\n",[24,811,812],{"__ignoreMap":47},[51,813,814],{"class":53,"line":54},[51,815,809],{"class":816},"sutJx",[14,818,819],{},"A valid version would be:",[42,821,823],{"className":44,"code":822,"language":46,"meta":47,"style":47},"score2 = 10\n",[24,824,825],{"__ignoreMap":47},[51,826,827,830,832],{"class":53,"line":54},[51,828,829],{"class":57},"score2 ",[51,831,26],{"class":61},[51,833,201],{"class":83},[800,835,837],{"id":836},"names-cannot-contain-spaces","Names cannot contain spaces",[14,839,806],{},[42,841,843],{"className":44,"code":842,"language":46,"meta":47,"style":47},"# first name = \"Lena\"\n",[24,844,845],{"__ignoreMap":47},[51,846,847],{"class":53,"line":54},[51,848,842],{"class":816},[14,850,819],{},[42,852,854],{"className":44,"code":853,"language":46,"meta":47,"style":47},"first_name = \"Lena\"\n",[24,855,856],{"__ignoreMap":47},[51,857,858,861,863,865,868],{"class":53,"line":54},[51,859,860],{"class":57},"first_name ",[51,862,26],{"class":61},[51,864,65],{"class":64},[51,866,867],{"class":68},"Lena",[51,869,72],{"class":64},[800,871,873],{"id":872},"names-are-case-sensitive","Names are case-sensitive",[14,875,876,878,879,882],{},[24,877,119],{}," and ",[24,880,881],{},"Age"," are different variables.",[42,884,886],{"className":44,"code":885,"language":46,"meta":47,"style":47},"age = 20\nAge = 30\n\nprint(age)\nprint(Age)\n",[24,887,888,897,907,911,921],{"__ignoreMap":47},[51,889,890,892,894],{"class":53,"line":54},[51,891,78],{"class":57},[51,893,26],{"class":61},[51,895,896],{"class":83}," 20\n",[51,898,899,902,904],{"class":53,"line":75},[51,900,901],{"class":57},"Age ",[51,903,26],{"class":61},[51,905,906],{"class":83}," 30\n",[51,908,909],{"class":53,"line":87},[51,910,91],{"emptyLinePlaceholder":90},[51,912,913,915,917,919],{"class":53,"line":94},[51,914,98],{"class":97},[51,916,102],{"class":101},[51,918,119],{"class":105},[51,920,109],{"class":101},[51,922,923,925,927,929],{"class":53,"line":112},[51,924,98],{"class":97},[51,926,102],{"class":101},[51,928,881],{"class":105},[51,930,109],{"class":101},[14,932,381],{},[42,934,936],{"className":44,"code":935,"language":46,"meta":47,"style":47},"20\n30\n",[24,937,938,943],{"__ignoreMap":47},[51,939,940],{"class":53,"line":54},[51,941,942],{"class":83},"20\n",[51,944,945],{"class":53,"line":75},[51,946,947],{"class":83},"30\n",[800,949,951],{"id":950},"do-not-use-python-keywords","Do not use Python keywords",[14,953,954,955,958,959,962,963,966],{},"Words like ",[24,956,957],{},"if",", ",[24,960,961],{},"for",", and ",[24,964,965],{},"class"," have special meaning in Python, so you cannot use them as variable names.",[14,968,969],{},"Invalid example:",[42,971,973],{"className":44,"code":972,"language":46,"meta":47,"style":47},"# class = \"Math\"\n",[24,974,975],{"__ignoreMap":47},[51,976,977],{"class":53,"line":54},[51,978,972],{"class":816},[37,980,982],{"id":981},"good-variable-names","Good variable names",[14,984,985],{},"Choose names that clearly describe the value.",[14,987,988],{},"Good examples:",[139,990,991,995,1000],{},[142,992,993],{},[24,994,365],{},[142,996,997],{},[24,998,999],{},"total_price",[142,1001,1002],{},[24,1003,376],{},[14,1005,1006],{},"These are easier to understand than unclear names like:",[139,1008,1009,1014,1018],{},[142,1010,1011],{},[24,1012,1013],{},"x",[142,1015,1016],{},[24,1017,246],{},[142,1019,1020],{},[24,1021,1022],{},"data",[14,1024,1025],{},"Short names are not always wrong, but beginners should usually prefer readable names.",[14,1027,1028],{},"Compare these:",[42,1030,1032],{"className":44,"code":1031,"language":46,"meta":47,"style":47},"x = 19.99\ny = 2\nz = x * y\nprint(z)\n",[24,1033,1034,1044,1053,1069],{"__ignoreMap":47},[51,1035,1036,1039,1041],{"class":53,"line":54},[51,1037,1038],{"class":57},"x ",[51,1040,26],{"class":61},[51,1042,1043],{"class":83}," 19.99\n",[51,1045,1046,1049,1051],{"class":53,"line":75},[51,1047,1048],{"class":57},"y ",[51,1050,26],{"class":61},[51,1052,623],{"class":83},[51,1054,1055,1058,1060,1063,1066],{"class":53,"line":87},[51,1056,1057],{"class":57},"z ",[51,1059,26],{"class":61},[51,1061,1062],{"class":57}," x ",[51,1064,1065],{"class":61},"*",[51,1067,1068],{"class":57}," y\n",[51,1070,1071,1073,1075,1078],{"class":53,"line":94},[51,1072,98],{"class":97},[51,1074,102],{"class":101},[51,1076,1077],{"class":105},"z",[51,1079,109],{"class":101},[14,1081,1082],{},"This works, but it is not very clear.",[14,1084,1085],{},"A better version:",[42,1087,1089],{"className":44,"code":1088,"language":46,"meta":47,"style":47},"item_price = 19.99\nquantity = 2\ntotal_price = item_price * quantity\n\nprint(total_price)\n",[24,1090,1091,1100,1109,1124,1128],{"__ignoreMap":47},[51,1092,1093,1096,1098],{"class":53,"line":54},[51,1094,1095],{"class":57},"item_price ",[51,1097,26],{"class":61},[51,1099,1043],{"class":83},[51,1101,1102,1105,1107],{"class":53,"line":75},[51,1103,1104],{"class":57},"quantity ",[51,1106,26],{"class":61},[51,1108,623],{"class":83},[51,1110,1111,1114,1116,1119,1121],{"class":53,"line":87},[51,1112,1113],{"class":57},"total_price ",[51,1115,26],{"class":61},[51,1117,1118],{"class":57}," item_price ",[51,1120,1065],{"class":61},[51,1122,1123],{"class":57}," quantity\n",[51,1125,1126],{"class":53,"line":94},[51,1127,91],{"emptyLinePlaceholder":90},[51,1129,1130,1132,1134,1136],{"class":53,"line":112},[51,1131,98],{"class":97},[51,1133,102],{"class":101},[51,1135,999],{"class":105},[51,1137,109],{"class":101},[14,1139,381],{},[42,1141,1143],{"className":44,"code":1142,"language":46,"meta":47,"style":47},"39.98\n",[24,1144,1145],{"__ignoreMap":47},[51,1146,1147],{"class":53,"line":54},[51,1148,1142],{"class":83},[14,1150,1151],{},"Good names make your code easier to read and easier to debug.",[37,1153,1155],{"id":1154},"variables-can-change","Variables can change",[14,1157,1158],{},"Variables are called “variables” because their values can change.",[14,1160,1161],{},"You can assign a new value to the same variable at any time.",[42,1163,1164],{"className":44,"code":587,"language":46,"meta":47,"style":47},[24,1165,1166,1174,1184,1188,1196],{"__ignoreMap":47},[51,1167,1168,1170,1172],{"class":53,"line":54},[51,1169,594],{"class":57},[51,1171,26],{"class":61},[51,1173,599],{"class":83},[51,1175,1176,1178,1180,1182],{"class":53,"line":75},[51,1177,98],{"class":97},[51,1179,102],{"class":101},[51,1181,608],{"class":105},[51,1183,109],{"class":101},[51,1185,1186],{"class":53,"line":87},[51,1187,91],{"emptyLinePlaceholder":90},[51,1189,1190,1192,1194],{"class":53,"line":94},[51,1191,594],{"class":57},[51,1193,26],{"class":61},[51,1195,623],{"class":83},[51,1197,1198,1200,1202,1204],{"class":53,"line":112},[51,1199,98],{"class":97},[51,1201,102],{"class":101},[51,1203,608],{"class":105},[51,1205,109],{"class":101},[14,1207,381],{},[42,1209,1210],{"className":44,"code":638,"language":46,"meta":47,"style":47},[24,1211,1212,1216],{"__ignoreMap":47},[51,1213,1214],{"class":53,"line":54},[51,1215,645],{"class":83},[51,1217,1218],{"class":53,"line":75},[51,1219,650],{"class":83},[14,1221,1222],{},"The old value is replaced by the new one.",[14,1224,1225],{},"This is useful in programs that track changing data, such as:",[139,1227,1228,1231,1234,1237],{},[142,1229,1230],{},"a score",[142,1232,1233],{},"a total",[142,1235,1236],{},"a user's answer",[142,1238,1239],{},"the current step in a process",[37,1241,1243],{"id":1242},"variables-and-data-types","Variables and data types",[14,1245,1246],{},"A variable can refer to different kinds of data.",[14,1248,1249],{},"Some common Python data types are:",[139,1251,1252,1258,1264,1270],{},[142,1253,1254,1257],{},[24,1255,1256],{},"str"," for text",[142,1259,1260,1263],{},[24,1261,1262],{},"int"," for whole numbers",[142,1265,1266,1269],{},[24,1267,1268],{},"float"," for numbers with decimals",[142,1271,1272,1275,1276,31,1279],{},[24,1273,1274],{},"bool"," for ",[24,1277,1278],{},"True",[24,1280,1281],{},"False",[14,1283,753],{},[42,1285,1287],{"className":44,"code":1286,"language":46,"meta":47,"style":47},"city = \"Paris\"      # str\nage = 20            # int\nprice = 9.99        # float\nis_ready = True     # bool\n",[24,1288,1289,1304,1316,1328],{"__ignoreMap":47},[51,1290,1291,1293,1295,1297,1299,1301],{"class":53,"line":54},[51,1292,308],{"class":57},[51,1294,26],{"class":61},[51,1296,65],{"class":64},[51,1298,315],{"class":68},[51,1300,522],{"class":64},[51,1302,1303],{"class":816},"      # str\n",[51,1305,1306,1308,1310,1313],{"class":53,"line":75},[51,1307,78],{"class":57},[51,1309,26],{"class":61},[51,1311,1312],{"class":83}," 20",[51,1314,1315],{"class":816},"            # int\n",[51,1317,1318,1320,1322,1325],{"class":53,"line":87},[51,1319,206],{"class":57},[51,1321,26],{"class":61},[51,1323,1324],{"class":83}," 9.99",[51,1326,1327],{"class":816},"        # float\n",[51,1329,1330,1333,1335,1339],{"class":53,"line":94},[51,1331,1332],{"class":57},"is_ready ",[51,1334,26],{"class":61},[51,1336,1338],{"class":1337},"s39Yj"," True",[51,1340,1341],{"class":816},"     # bool\n",[14,1343,1344,1345,1348],{},"You can check the type of a value with ",[24,1346,1347],{},"type()",":",[42,1350,1352],{"className":44,"code":1351,"language":46,"meta":47,"style":47},"city = \"Paris\"\nage = 20\n\nprint(type(city))\nprint(type(age))\n",[24,1353,1354,1366,1374,1378,1396],{"__ignoreMap":47},[51,1355,1356,1358,1360,1362,1364],{"class":53,"line":54},[51,1357,308],{"class":57},[51,1359,26],{"class":61},[51,1361,65],{"class":64},[51,1363,315],{"class":68},[51,1365,72],{"class":64},[51,1367,1368,1370,1372],{"class":53,"line":75},[51,1369,78],{"class":57},[51,1371,26],{"class":61},[51,1373,896],{"class":83},[51,1375,1376],{"class":53,"line":87},[51,1377,91],{"emptyLinePlaceholder":90},[51,1379,1380,1382,1384,1388,1390,1393],{"class":53,"line":94},[51,1381,98],{"class":97},[51,1383,102],{"class":101},[51,1385,1387],{"class":1386},"sZMiF","type",[51,1389,102],{"class":101},[51,1391,1392],{"class":105},"city",[51,1394,1395],{"class":101},"))\n",[51,1397,1398,1400,1402,1404,1406,1408],{"class":53,"line":112},[51,1399,98],{"class":97},[51,1401,102],{"class":101},[51,1403,1387],{"class":1386},[51,1405,102],{"class":101},[51,1407,119],{"class":105},[51,1409,1395],{"class":101},[14,1411,381],{},[42,1413,1415],{"className":44,"code":1414,"language":46,"meta":47,"style":47},"\u003Cclass 'str'>\n\u003Cclass 'int'>\n",[24,1416,1417,1436],{"__ignoreMap":47},[51,1418,1419,1422,1425,1428,1430,1433],{"class":53,"line":54},[51,1420,1421],{"class":61},"\u003C",[51,1423,965],{"class":1424},"sbsja",[51,1426,1427],{"class":64}," '",[51,1429,1256],{"class":68},[51,1431,1432],{"class":64},"'",[51,1434,1435],{"class":61},">\n",[51,1437,1438,1440,1442,1444,1446,1448],{"class":53,"line":75},[51,1439,1421],{"class":61},[51,1441,965],{"class":1424},[51,1443,1427],{"class":64},[51,1445,1262],{"class":68},[51,1447,1432],{"class":64},[51,1449,1435],{"class":61},[14,1451,1452,1453,878,1457,35],{},"If you want to learn these in more detail, see ",[246,1454,1456],{"href":1455},"\u002Flearn\u002Fpython-data-types-overview\u002F","Python data types overview",[246,1458,1460],{"href":1459},"\u002Flearn\u002Ftype-conversion-in-python-casting-between-types\u002F","type conversion in Python",[37,1462,1464],{"id":1463},"simple-beginner-examples","Simple beginner examples",[14,1466,1467],{},"Here are a few short examples that show common ways to use variables.",[432,1469,1471],{"id":1470},"store-text-in-a-variable","Store text in a variable",[42,1473,1475],{"className":44,"code":1474,"language":46,"meta":47,"style":47},"greeting = \"Hello, world!\"\nprint(greeting)\n",[24,1476,1477,1491],{"__ignoreMap":47},[51,1478,1479,1482,1484,1486,1489],{"class":53,"line":54},[51,1480,1481],{"class":57},"greeting ",[51,1483,26],{"class":61},[51,1485,65],{"class":64},[51,1487,1488],{"class":68},"Hello, world!",[51,1490,72],{"class":64},[51,1492,1493,1495,1497,1500],{"class":53,"line":75},[51,1494,98],{"class":97},[51,1496,102],{"class":101},[51,1498,1499],{"class":105},"greeting",[51,1501,109],{"class":101},[14,1503,381],{},[42,1505,1507],{"className":44,"code":1506,"language":46,"meta":47,"style":47},"Hello, world!\n",[24,1508,1509],{"__ignoreMap":47},[51,1510,1511,1513,1515],{"class":53,"line":54},[51,1512,189],{"class":57},[51,1514,530],{"class":101},[51,1516,1517],{"class":57}," world!\n",[432,1519,1521],{"id":1520},"store-numbers-and-add-them","Store numbers and add them",[42,1523,1525],{"className":44,"code":1524,"language":46,"meta":47,"style":47},"a = 5\nb = 7\ntotal = a + b\n\nprint(total)\n",[24,1526,1527,1537,1547,1561,1565],{"__ignoreMap":47},[51,1528,1529,1532,1534],{"class":53,"line":54},[51,1530,1531],{"class":57},"a ",[51,1533,26],{"class":61},[51,1535,1536],{"class":83}," 5\n",[51,1538,1539,1542,1544],{"class":53,"line":75},[51,1540,1541],{"class":57},"b ",[51,1543,26],{"class":61},[51,1545,1546],{"class":83}," 7\n",[51,1548,1549,1551,1553,1556,1558],{"class":53,"line":87},[51,1550,684],{"class":57},[51,1552,26],{"class":61},[51,1554,1555],{"class":57}," a ",[51,1557,692],{"class":61},[51,1559,1560],{"class":57}," b\n",[51,1562,1563],{"class":53,"line":94},[51,1564,91],{"emptyLinePlaceholder":90},[51,1566,1567,1569,1571,1573],{"class":53,"line":112},[51,1568,98],{"class":97},[51,1570,102],{"class":101},[51,1572,708],{"class":105},[51,1574,109],{"class":101},[14,1576,381],{},[42,1578,1579],{"className":44,"code":715,"language":46,"meta":47,"style":47},[24,1580,1581],{"__ignoreMap":47},[51,1582,1583],{"class":53,"line":54},[51,1584,715],{"class":83},[432,1586,1588,1589],{"id":1587},"use-variables-with-print","Use variables with ",[24,1590,486],{},[42,1592,1594],{"className":44,"code":1593,"language":46,"meta":47,"style":47},"name = \"Noah\"\nscore = 95\n\nprint(\"Student:\", name)\nprint(\"Score:\", score)\n",[24,1595,1596,1609,1618,1622,1641],{"__ignoreMap":47},[51,1597,1598,1600,1602,1604,1607],{"class":53,"line":54},[51,1599,58],{"class":57},[51,1601,26],{"class":61},[51,1603,65],{"class":64},[51,1605,1606],{"class":68},"Noah",[51,1608,72],{"class":64},[51,1610,1611,1613,1615],{"class":53,"line":75},[51,1612,196],{"class":57},[51,1614,26],{"class":61},[51,1616,1617],{"class":83}," 95\n",[51,1619,1620],{"class":53,"line":87},[51,1621,91],{"emptyLinePlaceholder":90},[51,1623,1624,1626,1628,1630,1633,1635,1637,1639],{"class":53,"line":94},[51,1625,98],{"class":97},[51,1627,102],{"class":101},[51,1629,522],{"class":64},[51,1631,1632],{"class":68},"Student:",[51,1634,522],{"class":64},[51,1636,530],{"class":101},[51,1638,533],{"class":105},[51,1640,109],{"class":101},[51,1642,1643,1645,1647,1649,1652,1654,1656,1659],{"class":53,"line":112},[51,1644,98],{"class":97},[51,1646,102],{"class":101},[51,1648,522],{"class":64},[51,1650,1651],{"class":68},"Score:",[51,1653,522],{"class":64},[51,1655,530],{"class":101},[51,1657,1658],{"class":105}," score",[51,1660,109],{"class":101},[14,1662,381],{},[42,1664,1666],{"className":44,"code":1665,"language":46,"meta":47,"style":47},"Student: Noah\nScore: 95\n",[24,1667,1668,1678],{"__ignoreMap":47},[51,1669,1670,1673,1675],{"class":53,"line":54},[51,1671,1672],{"class":57},"Student",[51,1674,1348],{"class":101},[51,1676,1677],{"class":57}," Noah\n",[51,1679,1680,1683,1685],{"class":53,"line":75},[51,1681,1682],{"class":57},"Score",[51,1684,1348],{"class":101},[51,1686,1617],{"class":83},[432,1688,1690],{"id":1689},"store-user-input-in-a-variable","Store user input in a variable",[42,1692,1694],{"className":44,"code":1693,"language":46,"meta":47,"style":47},"name = input(\"Enter your name: \")\nprint(\"Hello,\", name)\n",[24,1695,1696,1716],{"__ignoreMap":47},[51,1697,1698,1700,1702,1705,1707,1709,1712,1714],{"class":53,"line":54},[51,1699,58],{"class":57},[51,1701,26],{"class":61},[51,1703,1704],{"class":97}," input",[51,1706,102],{"class":101},[51,1708,522],{"class":64},[51,1710,1711],{"class":68},"Enter your name: ",[51,1713,522],{"class":64},[51,1715,109],{"class":101},[51,1717,1718,1720,1722,1724,1726,1728,1730,1732],{"class":53,"line":75},[51,1719,98],{"class":97},[51,1721,102],{"class":101},[51,1723,522],{"class":64},[51,1725,525],{"class":68},[51,1727,522],{"class":64},[51,1729,530],{"class":101},[51,1731,533],{"class":105},[51,1733,109],{"class":101},[14,1735,1736,1737,1740,1741,1744],{},"The ",[24,1738,1739],{},"input()"," function returns text. That means if a user types ",[24,1742,1743],{},"25",", Python stores it as a string unless you convert it.",[14,1746,1747,1748,35],{},"You can learn more on the ",[246,1749,483,1751,487],{"href":1750},"\u002Freference\u002Fpython-input-function-explained\u002F",[24,1752,1739],{},[37,1754,1756],{"id":1755},"common-beginner-mistakes","Common beginner mistakes",[14,1758,1759],{},"These are some of the most common variable mistakes in Python.",[432,1761,1763],{"id":1762},"using-spaces-in-variable-names","Using spaces in variable names",[14,1765,806],{},[42,1767,1769],{"className":44,"code":1768,"language":46,"meta":47,"style":47},"# first name = \"Ali\"\n",[24,1770,1771],{"__ignoreMap":47},[51,1772,1773],{"class":53,"line":54},[51,1774,1768],{"class":816},[14,1776,1777],{},"Use an underscore instead:",[42,1779,1781],{"className":44,"code":1780,"language":46,"meta":47,"style":47},"first_name = \"Ali\"\n",[24,1782,1783],{"__ignoreMap":47},[51,1784,1785,1787,1789,1791,1794],{"class":53,"line":54},[51,1786,860],{"class":57},[51,1788,26],{"class":61},[51,1790,65],{"class":64},[51,1792,1793],{"class":68},"Ali",[51,1795,72],{"class":64},[432,1797,1799],{"id":1798},"starting-a-variable-name-with-a-number","Starting a variable name with a number",[14,1801,806],{},[42,1803,1805],{"className":44,"code":1804,"language":46,"meta":47,"style":47},"# 2score = 50\n",[24,1806,1807],{"__ignoreMap":47},[51,1808,1809],{"class":53,"line":54},[51,1810,1804],{"class":816},[14,1812,1813],{},"Use this instead:",[42,1815,1817],{"className":44,"code":1816,"language":46,"meta":47,"style":47},"score2 = 50\n",[24,1818,1819],{"__ignoreMap":47},[51,1820,1821,1823,1825],{"class":53,"line":54},[51,1822,829],{"class":57},[51,1824,26],{"class":61},[51,1826,1827],{"class":83}," 50\n",[432,1829,1831,1832,1834,1835],{"id":1830},"confusing-with","Confusing ",[24,1833,26],{}," with ",[24,1836,1837],{},"==",[139,1839,1840,1845],{},[142,1841,1842,1844],{},[24,1843,26],{}," assigns a value",[142,1846,1847,1849],{},[24,1848,1837],{}," compares two values",[14,1851,1852],{},"Assignment:",[42,1854,1856],{"className":44,"code":1855,"language":46,"meta":47,"style":47},"age = 20\n",[24,1857,1858],{"__ignoreMap":47},[51,1859,1860,1862,1864],{"class":53,"line":54},[51,1861,78],{"class":57},[51,1863,26],{"class":61},[51,1865,896],{"class":83},[14,1867,1868],{},"Comparison:",[42,1870,1872],{"className":44,"code":1871,"language":46,"meta":47,"style":47},"print(age == 20)\n",[24,1873,1874],{"__ignoreMap":47},[51,1875,1876,1878,1880,1882,1884,1886],{"class":53,"line":54},[51,1877,98],{"class":97},[51,1879,102],{"class":101},[51,1881,78],{"class":105},[51,1883,1837],{"class":61},[51,1885,1312],{"class":83},[51,1887,109],{"class":101},[14,1889,381],{},[42,1891,1893],{"className":44,"code":1892,"language":46,"meta":47,"style":47},"True\n",[24,1894,1895],{"__ignoreMap":47},[51,1896,1897],{"class":53,"line":54},[51,1898,1892],{"class":1337},[432,1900,1902],{"id":1901},"using-a-variable-before-assigning-a-value","Using a variable before assigning a value",[14,1904,1905],{},"This causes an error:",[42,1907,1909],{"className":44,"code":1908,"language":46,"meta":47,"style":47},"print(score)\n",[24,1910,1911],{"__ignoreMap":47},[51,1912,1913,1915,1917,1919],{"class":53,"line":54},[51,1914,98],{"class":97},[51,1916,102],{"class":101},[51,1918,230],{"class":105},[51,1920,109],{"class":101},[14,1922,1923,1924,1926,1927,35],{},"If ",[24,1925,230],{}," was never created, Python will raise a ",[24,1928,1929],{},"NameError",[14,1931,1932],{},"Fix it by assigning a value first:",[42,1934,1936],{"className":44,"code":1935,"language":46,"meta":47,"style":47},"score = 10\nprint(score)\n",[24,1937,1938,1946],{"__ignoreMap":47},[51,1939,1940,1942,1944],{"class":53,"line":54},[51,1941,196],{"class":57},[51,1943,26],{"class":61},[51,1945,201],{"class":83},[51,1947,1948,1950,1952,1954],{"class":53,"line":75},[51,1949,98],{"class":97},[51,1951,102],{"class":101},[51,1953,230],{"class":105},[51,1955,109],{"class":101},[14,1957,1958,1959,35],{},"If you see this error often, read ",[246,1960,1962],{"href":1961},"\u002Ferrors\u002Fnameerror-name-is-not-defined-fix\u002F","NameError: name is not defined fix",[432,1964,1966],{"id":1965},"writing-a-keyword-as-a-variable-name","Writing a keyword as a variable name",[14,1968,806],{},[42,1970,1972],{"className":44,"code":1971,"language":46,"meta":47,"style":47},"# if = 5\n",[24,1973,1974],{"__ignoreMap":47},[51,1975,1976],{"class":53,"line":54},[51,1977,1971],{"class":816},[14,1979,1980],{},"Choose another name:",[42,1982,1984],{"className":44,"code":1983,"language":46,"meta":47,"style":47},"if_count = 5\n",[24,1985,1986],{"__ignoreMap":47},[51,1987,1988,1991,1993],{"class":53,"line":54},[51,1989,1990],{"class":57},"if_count ",[51,1992,26],{"class":61},[51,1994,1536],{"class":83},[37,1996,1998],{"id":1997},"what-to-learn-next","What to learn next",[14,2000,2001],{},"Once you understand variables, the next step is learning what kinds of values they can store and how those values behave.",[14,2003,2004],{},"Good next topics are:",[139,2006,2007,2011,2017,2023],{},[142,2008,2009],{},[246,2010,1456],{"href":1455},[142,2012,2013],{},[246,2014,483,2015,487],{"href":482},[24,2016,486],{},[142,2018,2019],{},[246,2020,483,2021,487],{"href":1750},[24,2022,1739],{},[142,2024,2025],{},[246,2026,1460],{"href":1459},[37,2028,2030],{"id":2029},"faq","FAQ",[432,2032,2034],{"id":2033},"do-i-need-to-declare-variables-in-python-first","Do I need to declare variables in Python first?",[14,2036,2037],{},"No. In Python, a variable is created when you assign a value to it.",[432,2039,2041],{"id":2040},"can-a-variable-change-to-a-different-type","Can a variable change to a different type?",[14,2043,2044],{},"Yes. Python lets you assign a new value of a different type to the same variable.",[42,2046,2048],{"className":44,"code":2047,"language":46,"meta":47,"style":47},"value = 10\nprint(type(value))\n\nvalue = \"ten\"\nprint(type(value))\n",[24,2049,2050,2059,2074,2078,2091],{"__ignoreMap":47},[51,2051,2052,2055,2057],{"class":53,"line":54},[51,2053,2054],{"class":57},"value ",[51,2056,26],{"class":61},[51,2058,201],{"class":83},[51,2060,2061,2063,2065,2067,2069,2072],{"class":53,"line":75},[51,2062,98],{"class":97},[51,2064,102],{"class":101},[51,2066,1387],{"class":1386},[51,2068,102],{"class":101},[51,2070,2071],{"class":105},"value",[51,2073,1395],{"class":101},[51,2075,2076],{"class":53,"line":87},[51,2077,91],{"emptyLinePlaceholder":90},[51,2079,2080,2082,2084,2086,2089],{"class":53,"line":94},[51,2081,2054],{"class":57},[51,2083,26],{"class":61},[51,2085,65],{"class":64},[51,2087,2088],{"class":68},"ten",[51,2090,72],{"class":64},[51,2092,2093,2095,2097,2099,2101,2103],{"class":53,"line":112},[51,2094,98],{"class":97},[51,2096,102],{"class":101},[51,2098,1387],{"class":1386},[51,2100,102],{"class":101},[51,2102,2071],{"class":105},[51,2104,1395],{"class":101},[14,2106,381],{},[42,2108,2110],{"className":44,"code":2109,"language":46,"meta":47,"style":47},"\u003Cclass 'int'>\n\u003Cclass 'str'>\n",[24,2111,2112,2126],{"__ignoreMap":47},[51,2113,2114,2116,2118,2120,2122,2124],{"class":53,"line":54},[51,2115,1421],{"class":61},[51,2117,965],{"class":1424},[51,2119,1427],{"class":64},[51,2121,1262],{"class":68},[51,2123,1432],{"class":64},[51,2125,1435],{"class":61},[51,2127,2128,2130,2132,2134,2136,2138],{"class":53,"line":75},[51,2129,1421],{"class":61},[51,2131,965],{"class":1424},[51,2133,1427],{"class":64},[51,2135,1256],{"class":68},[51,2137,1432],{"class":64},[51,2139,1435],{"class":61},[432,2141,2143,2144,878,2146,2148],{"id":2142},"what-is-the-difference-between-and-in-python","What is the difference between ",[24,2145,26],{},[24,2147,1837],{}," in Python?",[14,2150,2151,2153],{},[24,2152,26],{}," assigns a value to a variable.",[14,2155,2156,2158],{},[24,2157,1837],{}," compares two values to check if they are equal.",[42,2160,2162],{"className":44,"code":2161,"language":46,"meta":47,"style":47},"x = 5\nprint(x == 5)\n",[24,2163,2164,2172],{"__ignoreMap":47},[51,2165,2166,2168,2170],{"class":53,"line":54},[51,2167,1038],{"class":57},[51,2169,26],{"class":61},[51,2171,1536],{"class":83},[51,2173,2174,2176,2178,2180,2182,2185],{"class":53,"line":75},[51,2175,98],{"class":97},[51,2177,102],{"class":101},[51,2179,1038],{"class":105},[51,2181,1837],{"class":61},[51,2183,2184],{"class":83}," 5",[51,2186,109],{"class":101},[14,2188,381],{},[42,2190,2191],{"className":44,"code":1892,"language":46,"meta":47,"style":47},[24,2192,2193],{"__ignoreMap":47},[51,2194,2195],{"class":53,"line":54},[51,2196,1892],{"class":1337},[432,2198,2200],{"id":2199},"why-does-python-say-a-name-is-not-defined","Why does Python say a name is not defined?",[14,2202,2203],{},"Usually because:",[139,2205,2206,2209,2212],{},[142,2207,2208],{},"the variable was used before it was assigned",[142,2210,2211],{},"the name was misspelled",[142,2213,2214,2215,2217,2218],{},"the capitalization was different, such as ",[24,2216,119],{}," vs ",[24,2219,881],{},[14,2221,2222],{},"Useful debugging checks:",[42,2224,2226],{"className":44,"code":2225,"language":46,"meta":47,"style":47},"print(my_variable)\nprint(type(my_variable))\ndir()\nhelp(type)\n",[24,2227,2228,2239,2253,2261],{"__ignoreMap":47},[51,2229,2230,2232,2234,2237],{"class":53,"line":54},[51,2231,98],{"class":97},[51,2233,102],{"class":101},[51,2235,2236],{"class":105},"my_variable",[51,2238,109],{"class":101},[51,2240,2241,2243,2245,2247,2249,2251],{"class":53,"line":75},[51,2242,98],{"class":97},[51,2244,102],{"class":101},[51,2246,1387],{"class":1386},[51,2248,102],{"class":101},[51,2250,2236],{"class":105},[51,2252,1395],{"class":101},[51,2254,2255,2258],{"class":53,"line":87},[51,2256,2257],{"class":97},"dir",[51,2259,2260],{"class":101},"()\n",[51,2262,2263,2266,2268,2270],{"class":53,"line":94},[51,2264,2265],{"class":97},"help",[51,2267,102],{"class":101},[51,2269,1387],{"class":1386},[51,2271,109],{"class":101},[37,2273,2275],{"id":2274},"see-also","See also",[139,2277,2278,2283,2287,2291,2297,2303,2307],{},[142,2279,2280],{},[246,2281,2282],{"href":248},"What is a variable in Python",[142,2284,2285],{},[246,2286,1456],{"href":1455},[142,2288,2289],{},[246,2290,403],{"href":402},[142,2292,2293],{},[246,2294,483,2295,487],{"href":482},[24,2296,486],{},[142,2298,2299],{},[246,2300,483,2301,487],{"href":1750},[24,2302,1739],{},[142,2304,2305],{},[246,2306,1962],{"href":1961},[142,2308,2309],{},[246,2310,2311],{"href":1459},"Type conversion in Python",[2313,2314,2315],"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 .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 .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 .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}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 .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 .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 .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":47,"searchDepth":75,"depth":75,"links":2317},[2318,2319,2320,2321,2327,2331,2332,2333,2334,2341,2349,2350,2357],{"id":39,"depth":75,"text":40},{"id":130,"depth":75,"text":131},{"id":252,"depth":75,"text":253},{"id":406,"depth":75,"text":407,"children":2322},[2323,2324,2325,2326],{"id":434,"depth":87,"text":435},{"id":490,"depth":87,"text":491},{"id":583,"depth":87,"text":584},{"id":656,"depth":87,"text":657},{"id":724,"depth":75,"text":725,"children":2328},[2329,2330],{"id":731,"depth":87,"text":732},{"id":797,"depth":87,"text":798},{"id":981,"depth":75,"text":982},{"id":1154,"depth":75,"text":1155},{"id":1242,"depth":75,"text":1243},{"id":1463,"depth":75,"text":1464,"children":2335},[2336,2337,2338,2340],{"id":1470,"depth":87,"text":1471},{"id":1520,"depth":87,"text":1521},{"id":1587,"depth":87,"text":2339},"Use variables with print()",{"id":1689,"depth":87,"text":1690},{"id":1755,"depth":75,"text":1756,"children":2342},[2343,2344,2345,2347,2348],{"id":1762,"depth":87,"text":1763},{"id":1798,"depth":87,"text":1799},{"id":1830,"depth":87,"text":2346},"Confusing = with ==",{"id":1901,"depth":87,"text":1902},{"id":1965,"depth":87,"text":1966},{"id":1997,"depth":75,"text":1998},{"id":2029,"depth":75,"text":2030,"children":2351},[2352,2353,2354,2356],{"id":2033,"depth":87,"text":2034},{"id":2040,"depth":87,"text":2041},{"id":2142,"depth":87,"text":2355},"What is the difference between = and == in Python?",{"id":2199,"depth":87,"text":2200},{"id":2274,"depth":75,"text":2275},"Master python variables explained for beginners in our comprehensive Python beginner guide.","md",{},"\u002Flearn\u002Fpython-variables-explained-for-beginners",{"title":5,"description":2358},"learn\u002Fpython-variables-explained-for-beginners","Lz2fOLWaUrpHlI_zsKZkiqimqfJyOgxWTlqVh4N6xUQ",1777585501082]