[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-671794-105":59,"doc-detail-671794-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","python-tutorial-release-370","Python Tutorial - Release 3.7.0","","Python Tutorial provides a structured, introductory path from running the interpreter to building core programming capability. It covers informal Python basics, control flow with conditions and loops, key data structures (lists, tuples, sets, dictionaries), functions and coding style. It then expands into modules, packages, input/output operations, and practical error handling including syntax errors and exceptions. A comprehensive walkthrough of classes and a tour of the standard library follow.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/python-tutorial-release-370/671794/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/python-tutorial-release-370/671794.png","ImageObject",300,407,{"name":92,"@type":93},"Elsa","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-04","2026-11-02",true,{"@type":102,"interactionType":103,"userInteractionCount":39},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does the tutorial cover when starting with Python?","Question",{"text":112,"@type":113},"It begins with using the Python interpreter and includes an informal introduction using Python as a calculator and for early programming steps.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which topics are included in control flow and decision-making?",{"text":117,"@type":113},"It explains if statements, for statements, the range() function, loop controls like break and continue, and pass statements, along with loop else clauses.",{"name":119,"@type":110,"acceptedAnswer":120},"How does the tutorial handle errors and exceptions?",{"text":121,"@type":113},"It covers syntax errors, general exceptions, handling exceptions, raising exceptions, user-defined exceptions, and defining cleanup actions.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},671794,1793580648,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":39,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144},137455077381,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","Python Tutorial  \nRelease 3.7.0  \nGuido van Rossum and the Python development team  \nSeptember 02, 2018  \nPython Software Foundation  \nEmail: [docs@python.org](docs@python.org)  \nCONTENTS  \n1 Whetting Your Appetite 3  \n2 Using the Python Interpreter 5  \n2.1 Invoking the Interpreter ....................................... 5  \n2.2 The Interpreter and Its Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n3 An Informal Introduction to Python 9  \n3.1 Using Python as a Calculator .................................... 9  \n3.2 First Steps Towards Programming ................................. 16  \n4 More Control Flow Tools 19  \n4.1 if Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  \n4.2 for Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  \n4.3 The range() Function ....................................... 20  \n4.4 break and continue Statements, and else Clauses on Loops .................. 21  \n4.5 pass Statements ........................................... 22  \n4.6 Deﬁning Functions .......................................... 22  \n4.7 More on Deﬁning Functions ..................................... 24  \n4.8 Intermezzo: Coding Style ...................................... 29  \n5 Data Structures 31  \n5. 1 More on Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31  \n5.2 The del statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  \n5.3 Tuples and Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36  \n5.4 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  \n5.5 Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38  \n5.6 Looping Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39  \n5.7 More on Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  \n5.8 Comparing Sequences and Other Types .............................. 40  \n6 Modules 43  \n6. 1 More on Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44  \n6.2 Standard Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46  \n6.3 The dir() Function ......................................... 47  \n6.4 Packages ............................................... 48  \n7 Input and Output 53  \n7.1 Fancier Output Formatting ..................................... 53  \n7.2 Reading and Writing Files ..................................... 57  \n8 Errors and Exceptions 61  \n8.1 Syntax Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61  \n8.2 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61  \n8.3 Handling Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62  \n8.4 Raising Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64  \n8.5 User-deﬁned Exceptions ....................................... 65  \n8.6 Deﬁning Clean-up Actions ..................................... 66  \n8.7 Predeﬁned Clean-up Actions .................................... 66  \n9 Classes 69  \n9.1 A Word About Names and Objects ................................ 69  \n9.2 Python Scopes and Namespaces .................................. 69  \n9.3 A First Look at Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72  \n9.4 Random Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  \n9.5 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77  \n9.6 Private Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . .","cbCaie2nHzTvLozN","https://ap.wps.com/l/cbCaie2nHzTvLozN","pdf",643652,155,"English","# Contents\n## Whetting Your Appetite\n## Using the Python Interpreter\n### Invoking the Interpreter\n### The Interpreter and Its Environment\n## An Informal Introduction to Python\n### Using Python as a Calculator\n### First Steps Towards Programming\n## More Control Flow Tools\n### if Statements\n### for Statements\n### The range() Function\n### break and continue Statements, and else Clauses on Loops\n### pass Statements\n### Defining Functions\n### More on Defining Functions\n### Intermezzo: Coding Style\n## Data Structures\n### More on Lists\n### The del statement\n### Tuples and Sequences\n### Sets\n### Dictionaries\n### Looping Techniques\n### More on Conditions\n### Comparing Sequences and Other Types\n## Modules\n### More on Modules\n### Standard Modules\n### The dir() Function\n### Packages\n## Input and Output\n### Fancier Output Formatting\n### Reading and Writing Files\n## Errors and Exceptions\n### Syntax Errors\n### Exceptions\n### Handling Exceptions\n### Raising Exceptions\n### User-defined Exceptions\n### Defining Clean-up Actions\n### Predefined Clean-up Actions\n## Classes\n### A Word About Names and Objects\n### Python Scopes and Namespaces\n### A First Look at Classes\n### Random Remarks\n### Inheritance\n### Private Variables\n### Odds and Ends\n### Iterators\n### Generators\n### Generator Expressions\n## Brief Tour of the Standard Library\n### Operating System Interface\n### File Wildcards\n### Command Line Arguments\n### Error Output Redirection and Program Termination\n### String Pattern Matching\n### Mathematics\n### Internet Access\n### Dates and Times\n### Data Compression\n### Performance Measurement\n### Quality Control\n### Batteries Included","[{\"question\":\"What does the tutorial cover when starting with Python?\",\"answer\":\"It begins with using the Python interpreter and includes an informal introduction using Python as a calculator and for early programming steps.\"},{\"question\":\"Which topics are included in control flow and decision-making?\",\"answer\":\"It explains if statements, for statements, the range() function, loop controls like break and continue, and pass statements, along with loop else clauses.\"},{\"question\":\"How does the tutorial handle errors and exceptions?\",\"answer\":\"It covers syntax errors, general exceptions, handling exceptions, raising exceptions, user-defined exceptions, and defining cleanup actions.\"}]","Python Tutorial - Release 3.7.0 | PDF",391]