[{"data":1,"prerenderedAt":1355},["ShallowReactive",2],{"doc-\u002Freference\u002Fpython-help-function-explained":3},{"id":4,"title":5,"body":6,"description":1348,"extension":1349,"meta":1350,"navigation":693,"path":1351,"seo":1352,"stem":1353,"__hash__":1354},"content\u002Freference\u002Fpython-help-function-explained.md","Python help() Function Explained",{"type":7,"value":8,"toc":1314},"minimark",[9,13,22,25,30,90,106,110,115,118,137,140,151,166,169,173,176,192,195,198,218,224,236,239,243,248,268,304,308,322,357,360,363,372,408,427,429,441,467,479,483,488,491,505,508,527,530,544,547,551,556,570,573,591,594,609,613,618,632,638,640,707,710,748,751,768,772,779,783,788,791,802,807,812,827,838,844,863,866,878,882,887,898,901,930,935,944,948,953,956,960,966,969,999,1002,1010,1015,1020,1024,1027,1036,1039,1119,1122,1145,1149,1153,1156,1160,1166,1241,1245,1253,1257,1260,1264,1290,1310],[10,11,5],"h1",{"id":12},"python-help-function-explained",[14,15,16,17,21],"p",{},"Python’s ",[18,19,20],"code",{},"help()"," function shows built-in documentation inside Python.",[14,23,24],{},"It is useful when you want to quickly inspect a function, class, method, or module without leaving the Python shell. For beginners, it is a simple way to check what something does, what arguments it accepts, and how it is meant to be used.",[26,27,29],"h2",{"id":28},"quick-example","Quick example",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","help(len)\nhelp(str)\nhelp('modules')\n","python","",[18,38,39,58,71],{"__ignoreMap":36},[40,41,44,48,52,55],"span",{"class":42,"line":43},"line",1,[40,45,47],{"class":46},"sptTA","help",[40,49,51],{"class":50},"sP7_E","(",[40,53,54],{"class":46},"len",[40,56,57],{"class":50},")\n",[40,59,61,63,65,69],{"class":42,"line":60},2,[40,62,47],{"class":46},[40,64,51],{"class":50},[40,66,68],{"class":67},"sZMiF","str",[40,70,57],{"class":50},[40,72,74,76,78,82,86,88],{"class":42,"line":73},3,[40,75,47],{"class":46},[40,77,51],{"class":50},[40,79,81],{"class":80},"sjJ54","'",[40,83,85],{"class":84},"s_sjI","modules",[40,87,81],{"class":80},[40,89,57],{"class":50},[14,91,92,93,95,96,98,99,101,102,105],{},"Use ",[18,94,20],{}," to view built-in documentation in the Python shell. Pass an object like ",[18,97,54],{}," or ",[18,100,68],{},", or use a string such as ",[18,103,104],{},"'modules'"," for special interactive help topics.",[26,107,109],{"id":108},"what-help-does","What help() does",[14,111,112,114],{},[18,113,20],{}," displays Python’s built-in documentation.",[14,116,117],{},"You can use it to inspect:",[119,120,121,125,128,131,134],"ul",{},[122,123,124],"li",{},"Functions",[122,126,127],{},"Classes",[122,129,130],{},"Methods",[122,132,133],{},"Modules",[122,135,136],{},"Some Python keywords and help topics",[14,138,139],{},"It is most useful in the Python shell, IDLE, or another interactive environment.",[14,141,142,143,150],{},"For example, if you forget how ",[144,145,147],"a",{"href":146},"\u002Freference\u002Fpython-len-function-explained\u002F",[18,148,149],{},"len()"," works, you can ask Python directly:",[31,152,154],{"className":33,"code":153,"language":35,"meta":36,"style":36},"help(len)\n",[18,155,156],{"__ignoreMap":36},[40,157,158,160,162,164],{"class":42,"line":43},[40,159,47],{"class":46},[40,161,51],{"class":50},[40,163,54],{"class":46},[40,165,57],{"class":50},[14,167,168],{},"This is helpful when you are learning because you can explore Python while you code.",[26,170,172],{"id":171},"basic-syntax","Basic syntax",[14,174,175],{},"The main form is:",[31,177,179],{"className":33,"code":178,"language":35,"meta":36,"style":36},"help(object)\n",[18,180,181],{"__ignoreMap":36},[40,182,183,185,187,190],{"class":42,"line":43},[40,184,47],{"class":46},[40,186,51],{"class":50},[40,188,189],{"class":67},"object",[40,191,57],{"class":50},[14,193,194],{},"You pass in the thing you want to learn about.",[14,196,197],{},"Common examples include:",[119,199,200,204,209,213],{},[122,201,202],{},[18,203,54],{},[122,205,206],{},[18,207,208],{},"list.append",[122,210,211],{},[18,212,68],{},[122,214,215],{},[18,216,217],{},"open",[14,219,220,221,223],{},"You can also call ",[18,222,20],{}," with no argument:",[31,225,227],{"className":33,"code":226,"language":35,"meta":36,"style":36},"help()\n",[18,228,229],{"__ignoreMap":36},[40,230,231,233],{"class":42,"line":43},[40,232,47],{"class":46},[40,234,235],{"class":50},"()\n",[14,237,238],{},"This opens interactive help mode, where you can type help topics and search for information from inside Python.",[26,240,242],{"id":241},"common-things-you-can-inspect","Common things you can inspect",[244,245,247],"h3",{"id":246},"built-in-functions","Built-in functions",[14,249,250,251,253,254,253,257,260,261,267],{},"You can inspect built-in functions such as ",[18,252,54],{},", ",[18,255,256],{},"print",[18,258,259],{},"input",", and ",[144,262,264],{"href":263},"\u002Freference\u002Fpython-type-function-explained\u002F",[18,265,266],{},"type()",".",[31,269,271],{"className":33,"code":270,"language":35,"meta":36,"style":36},"help(print)\nhelp(input)\nhelp(type)\n",[18,272,273,283,293],{"__ignoreMap":36},[40,274,275,277,279,281],{"class":42,"line":43},[40,276,47],{"class":46},[40,278,51],{"class":50},[40,280,256],{"class":46},[40,282,57],{"class":50},[40,284,285,287,289,291],{"class":42,"line":60},[40,286,47],{"class":46},[40,288,51],{"class":50},[40,290,259],{"class":46},[40,292,57],{"class":50},[40,294,295,297,299,302],{"class":42,"line":73},[40,296,47],{"class":46},[40,298,51],{"class":50},[40,300,301],{"class":67},"type",[40,303,57],{"class":50},[244,305,307],{"id":306},"data-types","Data types",[14,309,310,311,253,313,253,316,260,319,267],{},"You can inspect types such as ",[18,312,68],{},[18,314,315],{},"list",[18,317,318],{},"dict",[18,320,321],{},"set",[31,323,325],{"className":33,"code":324,"language":35,"meta":36,"style":36},"help(str)\nhelp(list)\nhelp(dict)\n",[18,326,327,337,347],{"__ignoreMap":36},[40,328,329,331,333,335],{"class":42,"line":43},[40,330,47],{"class":46},[40,332,51],{"class":50},[40,334,68],{"class":67},[40,336,57],{"class":50},[40,338,339,341,343,345],{"class":42,"line":60},[40,340,47],{"class":46},[40,342,51],{"class":50},[40,344,315],{"class":67},[40,346,57],{"class":50},[40,348,349,351,353,355],{"class":42,"line":73},[40,350,47],{"class":46},[40,352,51],{"class":50},[40,354,318],{"class":67},[40,356,57],{"class":50},[14,358,359],{},"This is useful when you want to see available methods and basic behavior for a type.",[244,361,130],{"id":362},"methods",[14,364,365,366,369,370,267],{},"You can inspect methods such as ",[18,367,368],{},"str.split"," and ",[18,371,208],{},[31,373,375],{"className":33,"code":374,"language":35,"meta":36,"style":36},"help(str.split)\nhelp(list.append)\n",[18,376,377,393],{"__ignoreMap":36},[40,378,379,381,383,385,387,391],{"class":42,"line":43},[40,380,47],{"class":46},[40,382,51],{"class":50},[40,384,68],{"class":67},[40,386,267],{"class":50},[40,388,390],{"class":389},"skxfh","split",[40,392,57],{"class":50},[40,394,395,397,399,401,403,406],{"class":42,"line":60},[40,396,47],{"class":46},[40,398,51],{"class":50},[40,400,315],{"class":67},[40,402,267],{"class":50},[40,404,405],{"class":389},"append",[40,407,57],{"class":50},[14,409,410,411,413,414,420,421,423,424,426],{},"If you are not sure what methods a type has, compare ",[18,412,20],{}," with ",[144,415,417],{"href":416},"\u002Freference\u002Fpython-dir-function-explained\u002F",[18,418,419],{},"dir()",". ",[18,422,419],{}," shows available names, while ",[18,425,20],{}," explains one of them.",[244,428,133],{"id":85},[14,430,431,432,253,435,260,438,267],{},"You can inspect modules such as ",[18,433,434],{},"math",[18,436,437],{},"json",[18,439,440],{},"os",[31,442,444],{"className":33,"code":443,"language":35,"meta":36,"style":36},"import math\nhelp(math)\n",[18,445,446,456],{"__ignoreMap":36},[40,447,448,452],{"class":42,"line":43},[40,449,451],{"class":450},"sVHd0","import",[40,453,455],{"class":454},"su5hD"," math\n",[40,457,458,460,462,465],{"class":42,"line":60},[40,459,47],{"class":46},[40,461,51],{"class":50},[40,463,434],{"class":464},"slqww",[40,466,57],{"class":50},[14,468,469,470,474,475,267],{},"If you are still learning imports, see ",[144,471,473],{"href":472},"\u002Flearn\u002Fhow-import-works-in-python\u002F","how import works in Python",". For a beginner-friendly module example, see the ",[144,476,478],{"href":477},"\u002Fstandard-library\u002Fpython-math-module-overview\u002F","Python math module overview",[26,480,482],{"id":481},"how-to-read-the-output","How to read the output",[14,484,485,487],{},[18,486,20],{}," output can look long at first. Do not try to read everything.",[14,489,490],{},"Focus on these parts first:",[119,492,493,496,499,502],{},[122,494,495],{},"The function signature",[122,497,498],{},"The short description",[122,500,501],{},"Parameter names",[122,503,504],{},"Return value details, when shown",[14,506,507],{},"For example:",[31,509,511],{"className":33,"code":510,"language":35,"meta":36,"style":36},"help(str.split)\n",[18,512,513],{"__ignoreMap":36},[40,514,515,517,519,521,523,525],{"class":42,"line":43},[40,516,47],{"class":46},[40,518,51],{"class":50},[40,520,68],{"class":67},[40,522,267],{"class":50},[40,524,390],{"class":389},[40,526,57],{"class":50},[14,528,529],{},"When you read the output, look for:",[119,531,532,535,538,541],{},[122,533,534],{},"What object this is",[122,536,537],{},"What arguments it accepts",[122,539,540],{},"What it returns",[122,542,543],{},"Short notes about how it behaves",[14,545,546],{},"A good beginner habit is to read the first few useful lines, then test the function yourself with a small example.",[26,548,550],{"id":549},"when-help-is-useful","When help() is useful",[14,552,553,555],{},[18,554,20],{}," is useful when:",[119,557,558,561,564,567],{},[122,559,560],{},"You forget how a built-in function works",[122,562,563],{},"You want to check method names on a type",[122,565,566],{},"You are exploring a new module",[122,568,569],{},"You want quick documentation while coding",[14,571,572],{},"For example, if you remember that strings have a method for splitting text but forget the exact details, you can run:",[31,574,575],{"className":33,"code":510,"language":35,"meta":36,"style":36},[18,576,577],{"__ignoreMap":36},[40,578,579,581,583,585,587,589],{"class":42,"line":43},[40,580,47],{"class":46},[40,582,51],{"class":50},[40,584,68],{"class":67},[40,586,267],{"class":50},[40,588,390],{"class":389},[40,590,57],{"class":50},[14,592,593],{},"If you want to inspect file handling, you can also check:",[31,595,597],{"className":33,"code":596,"language":35,"meta":36,"style":36},"help(open)\n",[18,598,599],{"__ignoreMap":36},[40,600,601,603,605,607],{"class":42,"line":43},[40,602,47],{"class":46},[40,604,51],{"class":50},[40,606,217],{"class":46},[40,608,57],{"class":50},[26,610,612],{"id":611},"limits-of-help","Limits of help()",[14,614,615,617],{},[18,616,20],{}," is useful, but it has limits.",[119,619,620,623,626,629],{},[122,621,622],{},"The output can feel dense for beginners",[122,624,625],{},"Some third-party libraries may have unclear or incomplete help text",[122,627,628],{},"It does not replace simple examples",[122,630,631],{},"It works best when combined with small practice programs",[14,633,634,635,637],{},"So, ",[18,636,20],{}," is great for quick checking, but you will usually learn faster if you also test what you read in short code examples.",[14,639,507],{},[31,641,643],{"className":33,"code":642,"language":35,"meta":36,"style":36},"text = \"a,b,c\"\nparts = text.split(\",\")\n\nprint(parts)\n",[18,644,645,663,689,695],{"__ignoreMap":36},[40,646,647,650,654,657,660],{"class":42,"line":43},[40,648,649],{"class":454},"text ",[40,651,653],{"class":652},"smGrS","=",[40,655,656],{"class":80}," \"",[40,658,659],{"class":84},"a,b,c",[40,661,662],{"class":80},"\"\n",[40,664,665,668,670,673,675,677,679,682,685,687],{"class":42,"line":60},[40,666,667],{"class":454},"parts ",[40,669,653],{"class":652},[40,671,672],{"class":454}," text",[40,674,267],{"class":50},[40,676,390],{"class":464},[40,678,51],{"class":50},[40,680,681],{"class":80},"\"",[40,683,684],{"class":84},",",[40,686,681],{"class":80},[40,688,57],{"class":50},[40,690,691],{"class":42,"line":73},[40,692,694],{"emptyLinePlaceholder":693},true,"\n",[40,696,698,700,702,705],{"class":42,"line":697},4,[40,699,256],{"class":46},[40,701,51],{"class":50},[40,703,704],{"class":464},"parts",[40,706,57],{"class":50},[14,708,709],{},"Expected output:",[31,711,713],{"className":33,"code":712,"language":35,"meta":36,"style":36},"['a', 'b', 'c']\n",[18,714,715],{"__ignoreMap":36},[40,716,717,720,722,724,726,728,731,734,736,738,740,743,745],{"class":42,"line":43},[40,718,719],{"class":50},"[",[40,721,81],{"class":80},[40,723,144],{"class":84},[40,725,81],{"class":80},[40,727,684],{"class":50},[40,729,730],{"class":80}," '",[40,732,733],{"class":84},"b",[40,735,81],{"class":80},[40,737,684],{"class":50},[40,739,730],{"class":80},[40,741,742],{"class":84},"c",[40,744,81],{"class":80},[40,746,747],{"class":50},"]\n",[14,749,750],{},"A good workflow is:",[752,753,754,759,762,765],"ol",{},[122,755,92,756,758],{},[18,757,20],{}," to inspect something",[122,760,761],{},"Write a tiny example",[122,763,764],{},"Check the result",[122,766,767],{},"Repeat",[26,769,771],{"id":770},"difference-between-help-and-dir","Difference between help() and dir()",[14,773,774,369,776,778],{},[18,775,20],{},[18,777,419],{}," are often used together, but they do different jobs.",[244,780,781],{"id":47},[18,782,20],{},[14,784,92,785,787],{},[18,786,20],{}," when you want an explanation.",[14,789,790],{},"It tells you:",[119,792,793,796,799],{},[122,794,795],{},"What something is",[122,797,798],{},"How to use it",[122,800,801],{},"What parameters it accepts",[244,803,805],{"id":804},"dir",[18,806,419],{},[14,808,92,809,811],{},[18,810,419],{}," when you want a list of available names or attributes.",[31,813,815],{"className":33,"code":814,"language":35,"meta":36,"style":36},"dir(str)\n",[18,816,817],{"__ignoreMap":36},[40,818,819,821,823,825],{"class":42,"line":43},[40,820,804],{"class":46},[40,822,51],{"class":50},[40,824,68],{"class":67},[40,826,57],{"class":50},[14,828,829,830,253,832,260,835,267],{},"This shows many string methods, such as ",[18,831,390],{},[18,833,834],{},"strip",[18,836,837],{},"lower",[14,839,840,841,843],{},"Then you can inspect one of them with ",[18,842,20],{},":",[31,845,847],{"className":33,"code":846,"language":35,"meta":36,"style":36},"help(str.lower)\n",[18,848,849],{"__ignoreMap":36},[40,850,851,853,855,857,859,861],{"class":42,"line":43},[40,852,47],{"class":46},[40,854,51],{"class":50},[40,856,68],{"class":67},[40,858,267],{"class":50},[40,860,837],{"class":389},[40,862,57],{"class":50},[14,864,865],{},"A simple way to remember the difference:",[119,867,868,873],{},[122,869,92,870,872],{},[18,871,419],{}," to discover options",[122,874,92,875,877],{},[18,876,20],{}," to understand one option",[26,879,881],{"id":880},"common-mistakes","Common mistakes",[14,883,884,885,267],{},"Beginners often run into these small problems when using ",[18,886,20],{},[244,888,890,891,894,895],{"id":889},"using-helplen-when-you-meant-helplen","Using ",[18,892,893],{},"help('len')"," when you meant ",[18,896,897],{},"help(len)",[14,899,900],{},"These are not always the same.",[31,902,904],{"className":33,"code":903,"language":35,"meta":36,"style":36},"help(len)\nhelp('len')\n",[18,905,906,916],{"__ignoreMap":36},[40,907,908,910,912,914],{"class":42,"line":43},[40,909,47],{"class":46},[40,911,51],{"class":50},[40,913,54],{"class":46},[40,915,57],{"class":50},[40,917,918,920,922,924,926,928],{"class":42,"line":60},[40,919,47],{"class":46},[40,921,51],{"class":50},[40,923,81],{"class":80},[40,925,54],{"class":84},[40,927,81],{"class":80},[40,929,57],{"class":50},[14,931,932,934],{},[18,933,897],{}," asks for help on the actual function object.",[14,936,937,939,940,943],{},[18,938,893],{}," treats ",[18,941,942],{},"'len'"," as a help topic string. That can work differently, so when you want to inspect a real function, use the function name without quotes.",[244,945,947],{"id":946},"expecting-short-example-based-output","Expecting short, example-based output",[14,949,950,952],{},[18,951,20],{}," is documentation, not a tutorial.",[14,954,955],{},"The text may be longer and more technical than you expect. Start with the first lines, then test the function yourself.",[244,957,959],{"id":958},"running-help-in-a-script-and-not-noticing-where-output-goes","Running help() in a script and not noticing where output goes",[14,961,962,963,965],{},"If you call ",[18,964,20],{}," in a normal Python script, the documentation text is printed to the terminal or console.",[14,967,968],{},"Example:",[31,970,972],{"className":33,"code":971,"language":35,"meta":36,"style":36},"help(len)\nprint(\"Done\")\n",[18,973,974,984],{"__ignoreMap":36},[40,975,976,978,980,982],{"class":42,"line":43},[40,977,47],{"class":46},[40,979,51],{"class":50},[40,981,54],{"class":46},[40,983,57],{"class":50},[40,985,986,988,990,992,995,997],{"class":42,"line":60},[40,987,256],{"class":46},[40,989,51],{"class":50},[40,991,681],{"class":80},[40,993,994],{"class":84},"Done",[40,996,681],{"class":80},[40,998,57],{"class":50},[14,1000,1001],{},"You may not see a neat interactive display like you do in the Python shell.",[244,1003,1005,1006,413,1008],{"id":1004},"confusing-help-with-dir","Confusing ",[18,1007,20],{},[18,1009,419],{},[14,1011,1012,1013,267],{},"If you want a list of methods, use ",[18,1014,419],{},[14,1016,1017,1018,267],{},"If you want an explanation of one method, use ",[18,1019,20],{},[26,1021,1023],{"id":1022},"useful-commands-to-try","Useful commands to try",[14,1025,1026],{},"Open Python:",[31,1028,1030],{"className":33,"code":1029,"language":35,"meta":36,"style":36},"python\n",[18,1031,1032],{"__ignoreMap":36},[40,1033,1034],{"class":42,"line":43},[40,1035,1029],{"class":454},[14,1037,1038],{},"Then test these commands:",[31,1040,1042],{"className":33,"code":1041,"language":35,"meta":36,"style":36},"help(len)\nhelp(str.split)\nhelp(list.append)\nhelp(open)\nhelp('keywords')\ndir(str)\n",[18,1043,1044,1054,1068,1082,1092,1108],{"__ignoreMap":36},[40,1045,1046,1048,1050,1052],{"class":42,"line":43},[40,1047,47],{"class":46},[40,1049,51],{"class":50},[40,1051,54],{"class":46},[40,1053,57],{"class":50},[40,1055,1056,1058,1060,1062,1064,1066],{"class":42,"line":60},[40,1057,47],{"class":46},[40,1059,51],{"class":50},[40,1061,68],{"class":67},[40,1063,267],{"class":50},[40,1065,390],{"class":389},[40,1067,57],{"class":50},[40,1069,1070,1072,1074,1076,1078,1080],{"class":42,"line":73},[40,1071,47],{"class":46},[40,1073,51],{"class":50},[40,1075,315],{"class":67},[40,1077,267],{"class":50},[40,1079,405],{"class":389},[40,1081,57],{"class":50},[40,1083,1084,1086,1088,1090],{"class":42,"line":697},[40,1085,47],{"class":46},[40,1087,51],{"class":50},[40,1089,217],{"class":46},[40,1091,57],{"class":50},[40,1093,1095,1097,1099,1101,1104,1106],{"class":42,"line":1094},5,[40,1096,47],{"class":46},[40,1098,51],{"class":50},[40,1100,81],{"class":80},[40,1102,1103],{"class":84},"keywords",[40,1105,81],{"class":80},[40,1107,57],{"class":50},[40,1109,1111,1113,1115,1117],{"class":42,"line":1110},6,[40,1112,804],{"class":46},[40,1114,51],{"class":50},[40,1116,68],{"class":67},[40,1118,57],{"class":50},[14,1120,1121],{},"These are good starting points because they show different kinds of objects:",[119,1123,1124,1127,1130,1133,1136,1139],{},[122,1125,1126],{},"A built-in function",[122,1128,1129],{},"A string method",[122,1131,1132],{},"A list method",[122,1134,1135],{},"A built-in file function",[122,1137,1138],{},"A special help topic",[122,1140,1141,1142,1144],{},"A ",[18,1143,419],{}," example for comparison",[26,1146,1148],{"id":1147},"faq","FAQ",[244,1150,1152],{"id":1151},"what-does-help-return-in-python","What does help() return in Python?",[14,1154,1155],{},"It mainly prints documentation text to the screen. It is used for inspection, not for producing a useful return value in normal beginner code.",[244,1157,1159],{"id":1158},"can-i-use-help-on-my-own-functions","Can I use help() on my own functions?",[14,1161,1162,1163,1165],{},"Yes. You can pass your own function to ",[18,1164,20],{}," to see its name, parameters, and docstring if it has one.",[31,1167,1169],{"className":33,"code":1168,"language":35,"meta":36,"style":36},"def greet(name):\n    \"\"\"Return a friendly greeting.\"\"\"\n    return f\"Hello, {name}!\"\n\nhelp(greet)\n",[18,1170,1171,1190,1203,1226,1230],{"__ignoreMap":36},[40,1172,1173,1177,1181,1183,1187],{"class":42,"line":43},[40,1174,1176],{"class":1175},"sbsja","def",[40,1178,1180],{"class":1179},"sGLFI"," greet",[40,1182,51],{"class":50},[40,1184,1186],{"class":1185},"sFwrP","name",[40,1188,1189],{"class":50},"):\n",[40,1191,1192,1196,1200],{"class":42,"line":60},[40,1193,1195],{"class":1194},"s2W-s","    \"\"\"",[40,1197,1199],{"class":1198},"sithA","Return a friendly greeting.",[40,1201,1202],{"class":1194},"\"\"\"\n",[40,1204,1205,1208,1211,1214,1218,1220,1223],{"class":42,"line":73},[40,1206,1207],{"class":450},"    return",[40,1209,1210],{"class":1175}," f",[40,1212,1213],{"class":84},"\"Hello, ",[40,1215,1217],{"class":1216},"srdBf","{",[40,1219,1186],{"class":454},[40,1221,1222],{"class":1216},"}",[40,1224,1225],{"class":84},"!\"\n",[40,1227,1228],{"class":42,"line":697},[40,1229,694],{"emptyLinePlaceholder":693},[40,1231,1232,1234,1236,1239],{"class":42,"line":1094},[40,1233,47],{"class":46},[40,1235,51],{"class":50},[40,1237,1238],{"class":464},"greet",[40,1240,57],{"class":50},[244,1242,1244],{"id":1243},"what-is-the-difference-between-helplen-and-helplen","What is the difference between help(len) and help('len')?",[14,1246,1247,1249,1250,1252],{},[18,1248,897],{}," asks for documentation for the actual function object. ",[18,1251,893],{}," treats the value as a help topic string, which is a different lookup style.",[244,1254,1256],{"id":1255},"why-is-help-useful-for-beginners","Why is help() useful for beginners?",[14,1258,1259],{},"It gives quick built-in documentation inside Python, so you can check how something works without searching elsewhere first.",[26,1261,1263],{"id":1262},"see-also","See also",[119,1265,1266,1271,1276,1281,1286],{},[122,1267,1268],{},[144,1269,1270],{"href":416},"Python dir() function explained",[122,1272,1273],{},[144,1274,1275],{"href":263},"Python type() function explained",[122,1277,1278],{},[144,1279,1280],{"href":146},"Python len() function explained",[122,1282,1283],{},[144,1284,1285],{"href":472},"How import works in Python",[122,1287,1288],{},[144,1289,478],{"href":477},[14,1291,1292,1293,1295,1296,253,1298,260,1300,1302,1303,98,1306,1309],{},"Try ",[18,1294,20],{}," on three built-in functions you already know, such as ",[18,1297,54],{},[18,1299,256],{},[18,1301,259],{},". Then compare what you learn with ",[18,1304,1305],{},"dir(str)",[18,1307,1308],{},"dir(list)"," to build confidence exploring Python on your own.",[1311,1312,1313],"style",{},"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 .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--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 .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 .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}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 .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--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 .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 .s2W-s, html code.shiki .s2W-s{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#032F62;--shiki-default-font-style:inherit;--shiki-dark:#9ECBFF;--shiki-dark-font-style:inherit}html pre.shiki code .sithA, html code.shiki .sithA{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#032F62;--shiki-default-font-style:inherit;--shiki-dark:#9ECBFF;--shiki-dark-font-style:inherit}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":36,"searchDepth":60,"depth":60,"links":1315},[1316,1317,1318,1319,1325,1326,1327,1328,1332,1340,1341,1347],{"id":28,"depth":60,"text":29},{"id":108,"depth":60,"text":109},{"id":171,"depth":60,"text":172},{"id":241,"depth":60,"text":242,"children":1320},[1321,1322,1323,1324],{"id":246,"depth":73,"text":247},{"id":306,"depth":73,"text":307},{"id":362,"depth":73,"text":130},{"id":85,"depth":73,"text":133},{"id":481,"depth":60,"text":482},{"id":549,"depth":60,"text":550},{"id":611,"depth":60,"text":612},{"id":770,"depth":60,"text":771,"children":1329},[1330,1331],{"id":47,"depth":73,"text":20},{"id":804,"depth":73,"text":419},{"id":880,"depth":60,"text":881,"children":1333},[1334,1336,1337,1338],{"id":889,"depth":73,"text":1335},"Using help('len') when you meant help(len)",{"id":946,"depth":73,"text":947},{"id":958,"depth":73,"text":959},{"id":1004,"depth":73,"text":1339},"Confusing help() with dir()",{"id":1022,"depth":60,"text":1023},{"id":1147,"depth":60,"text":1148,"children":1342},[1343,1344,1345,1346],{"id":1151,"depth":73,"text":1152},{"id":1158,"depth":73,"text":1159},{"id":1243,"depth":73,"text":1244},{"id":1255,"depth":73,"text":1256},{"id":1262,"depth":60,"text":1263},"Master python help function explained in our comprehensive Python beginner guide.","md",{},"\u002Freference\u002Fpython-help-function-explained",{"title":5,"description":1348},"reference\u002Fpython-help-function-explained","Vhkt5jzLBPMaA5aqAyYPSa-k-XAlASN-1vUAx7Hvu5k",1777585511194]