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