[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572241-105":53,"doc-detail-572241-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","python-basics-cheat-sheet-read-online-free","Python Basics Cheat Sheet - read online free","","Python Basics Cheat Sheet provides a compact reference for core Python fundamentals, including function usage and detailed print formatting with syntax, alignment, width, precision, numeric types, and separators. It summarizes control flow using if statements plus while and for loops, including range-based iteration and break/else behaviors. It also covers common calculation operators and boolean expressions, then extends into turtle graphics commands for movement, coordinates, and drawing-related color and fill functions.",{"@graph":63,"@context":123},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/python-basics-cheat-sheet-read-online-free/572241/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/python-basics-cheat-sheet-read-online-free/572241.png","ImageObject",442,249,{"name":88,"@type":89},"Anna Hans","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-22","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",6,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115,119],{"name":106,"@type":107,"acceptedAnswer":108},"What does the cheat sheet cover besides basic syntax?","Question",{"text":109,"@type":110},"It covers print formatting (including f-strings and format specifiers), control flow (if, while, for with break/else), calculation operators, boolean expressions, and turtle graphics commands.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How are while loops and for loops represented?",{"text":114,"@type":110},"The sheet shows a basic while loop with a comparison and update, and a for loop that iterates over ranges (x, y, z) as well as loop variables.",{"name":116,"@type":107,"acceptedAnswer":117},"What are key print formatting options included?",{"text":118,"@type":110},"It includes separators via sep, controlling newline behavior via end, and f-string format specifiers for precision, scientific notation, comma separators, percentage conversion, and alignment/width.",{"name":120,"@type":107,"acceptedAnswer":121},"Which turtle graphics capabilities are listed?",{"text":122,"@type":110},"It lists commands for setting heading/turning, moving to coordinates, reading current position, and drawing support such as color and fill functions.","https://schema.org",{"og:url":78,"og:type":125,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":127,"canonical":78},"index,follow",{"doc_id":129,"site_id":56},572241,1792359784,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":88,"user_avatar":134,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":47,"language":140,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":61,"update_tm":144,"read_time":73},5909892332657,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","Python Basics Cheat Sheet  \nby River L. (Tamaranth)[via](via cheatography.com/42882/cs/46556/)[ cheatography.com/42882/cs/46556/](via cheatography.com/42882/cs/46556/)  \nFlowchart Symbols  \n\"Predefined Process\" = Function  \nprint Function & Formatting  \n| Syntax | Explanation |\n| --- | --- |\n| print ( 'Hello Johnny . ' ) | Print string as output |\n| print ( 'Hello\\nJohnny . ' ) | Print \"Johnny.\" on a newline |\n| print ( 'Mon\\tTues ' ) | Prints \"Tues\" at the next horizontal tab position (there's normally a tab position after every 8th character) |\n| print ( 'One ' , 'Two ' , sep= '~~ ') | Uses \"~\" (or other specified) as the item separator instead of a space\u003Cbr>Output: One~~Two |\n| print ( 'One ' , end= ' ' ) print ( 'Two ' ) | Prints a space instead of anewline character at the end of first output Output: One Two |\n| print ( f 'Hello {name} . ' ) | [F-string] Allows inserting variables & expressions. |\n\n---Format Specifiers---  \nprint Function & Formatting (cont)  \n| print ( f ' { payment : .2f} ' ) | [Precision designator] Value rounded to 2 decimal place output & displayed as floati point number. |\n| --- | --- |\n| print ( f ' { number: .2e} ' ) | Value is rounded to 2 decim places in output & displayed scientific notation. |\n| print ( f ' { number: , } ' ) | [Comma separator] Display commas in large numbers (\" 10 ,000\") . |\n| print ( f ' { dis count : .0%} ' ) | Converts decimal to percen output. |\n| print ( f ' { number:10 } ' ) | Sets minimum field width of |\n| print ( f ' { number:^ } ' ) | \u003C = left align\u003Cbr>> = right align ^ = center align |\n| num = 12345 .6789\u003Cbr>print ( f 'Num is {num:> 10, .2f}' ) | Example with all specifiers. Output: Num is 12, 345 |\n\n\n| Order of format specifiers:\u003Cbr>variable: [ alignment][ width][,][ .precision][type] |\n| --- |\n|  |\n| if Statements |\n| if condition |\n| Loops |\n\n\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#  \n\\# while: for condit ion -co ntr olled loops,  \n\\# & count- con trolled loops (w/ added steps)  \n\\# Basic while loop: while n \u003C 5 :  \nprint ( 'Value is less than 5 ' )  \nn += 1  \n\\# Count- con trolled while loop:  \nBy River L. (Tamaranth)  \n[cheatography.com/tamaranth/](cheatography.com/tamaranth/)  \nNot published yet.  \nLast updated 3rd July , 2025. Page 1 of 5.  \nSponsored by ApolloPad.com Everyone has a novel in them. Finish Yours!  \n[https://apollopad.com](https://apollopad.com)  \nPython Basics Cheat Sheet  \nby River L. (Tamaranth)[via](via cheatography.com/42882/cs/46556/)[ cheatography.com/42882/cs/46556/](via cheatography.com/42882/cs/46556/)  \nLoops (cont)  \n> n = 0 \\#Initialization  \nwhile n \u003C 5: \\#Comparison print('Value is less than 5')  \nn += 1 \\#Update \\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#‐\\#\\#\\#\\#\\#\\#  \n\\# for: for count-controlled loops & sequences of data  \n\\# (with or without \"range\") for variable in [value1, value2, etc]:  \nStatements  \nfor variable in range( x, y, z):  \nStatements \\#Range: x =start, y =end, z =step value \\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#\\#‐\\#\\#\\#\\#\\#\\#  \n\\# else clause: (optional) for loops that  \n\\# contain a break statement  \n\\# Else clause never executes because break does execute:  \nfor n in range( 10): if n == 5:  \nprint('Breaking out of loop')  \nbreak  \nprint( n)  \nelse:  \nprint(f'After the loop , n is { n} .')  \n\\# Else clause does execute because break never does:  \nfor n in range(3): if n == 5:  \nprint('Breaking out of loop')  \nbreak  \nprint( n)  \nelse:  \nprint(f'After the loop , n is { n} .')  \nCalculation Operators  \n| x [+, - , *] | y | Addition , Subtraction , Multiplication |\n| --- | --- | --- |\n| x / y |  | Floating-Point Division |\n| x // y |  | Integer Division\u003Cbr>(positive results truncated; negative results rounded away from zero) |\n| x % y |  | Remainder\u003Cbr>(returns remainder of x ÷ y) |\n| x ** y |  | Exponent\u003Cbr>(return","cbCaivSrWN5vp5vI","https://ap.wps.com/l/cbCaivSrWN5vp5vI","pdf",222853,"English","# Flowchart Symbols\n## print Function & Formatting\n# Format Specifiers\n## Precision and Numeric Display\n## Alignment and Width\n# if Statements\n# Loops\n## while\n## for\n## break and else clause\n# Calculation Operators\n# Boolean Expressions\n# Turtle Art","[{\"question\":\"What does the cheat sheet cover besides basic syntax?\",\"answer\":\"It covers print formatting (including f-strings and format specifiers), control flow (if, while, for with break/else), calculation operators, boolean expressions, and turtle graphics commands.\"},{\"question\":\"How are while loops and for loops represented?\",\"answer\":\"The sheet shows a basic while loop with a comparison and update, and a for loop that iterates over ranges (x, y, z) as well as loop variables.\"},{\"question\":\"What are key print formatting options included?\",\"answer\":\"It includes separators via sep, controlling newline behavior via end, and f-string format specifiers for precision, scientific notation, comma separators, percentage conversion, and alignment/width.\"},{\"question\":\"Which turtle graphics capabilities are listed?\",\"answer\":\"It lists commands for setting heading/turning, moving to coordinates, reading current position, and drawing support such as color and fill functions.\"}]","Python Basics Cheat Sheet - read online free | PDF",1791926333]