[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-671801-105":59,"doc-detail-671801-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","programming-with-python","Programming with Python","","Programming with Python by Thomas Weise teaches practical Python programming for high school, undergraduate, and graduate learners. It is designed for readers with no prior knowledge, using examples to introduce core concepts comprehensively. The book focuses on programming as part of a software development process, emphasizing clean code, comments, documentation, and tools to detect potential issues. Example code is provided via an associated GitHub repository.",{"@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/programming-with-python/671801/",{"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/programming-with-python/671801.png","ImageObject",300,407,{"name":92,"@type":93},"Bulrr","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-03","2026-11-02",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Who is this book intended for and is prior programming knowledge required?","Question",{"text":112,"@type":113},"The book targets high school, undergraduate, and graduate students. It is designed so that readers without prior knowledge can follow the text from the beginning using examples.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does the book connect Python learning to the software development process?",{"text":117,"@type":113},"It emphasizes writing clean code with comments and documentation and using tools to help find potential issues from the very beginning.",{"name":119,"@type":110,"acceptedAnswer":120},"Where can readers get the examples used in the book?",{"text":121,"@type":113},"All examples are available online in the GitHub repository associated with the book, so readers can run and experiment with them.","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},671801,1793580665,{"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":19,"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},5909892115043,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Programming with Python  \nThomas Weise (汤卫思)  \nOctober 29, 2026  \nAbstract  \nThe goal of this book is to teach practical programming with the Python language to highschool, undergraduate, and graduate students alike . Hopefully, readers without prior knowledge can follow the text. Therefore, all concepts are introduced using examples and discussed comprehensively. All examples are available online in the GitHub repository associated with this book, so that readers can play with them easily. Actually, the goal of the book is not just to teach programming, but to teach programming as a part of the software development process . This means that from the very beginning, we will attempt to push the reader towards writing clean code with comments and documentation as well as to use various tools for finding potential issues. While this book is a work in progress, we hope that it will eventually teach all the elements of Python software creation. We hope that it can enable readers without prior programming experience to develop beautiful and maintainable software .  \nContents  \nContents i  \n1 Introduction 1  \n1.1 Why Programming and Software Engineering Tools? .................. 1  \n1.2 Why Python? ....................................... 3  \n1.3 Further Reading ...................................... 4  \nI Basics 7  \n2 Getting Started 9  \n2.1 Installing Python ...................................... 9  \n2.2 Installing PyCharm .................................... 11  \n2.3 Our First Program ..................................... 16  \n2.4 Python in the Terminal .................................. 20  \n2.5 Getting the Examples from this Book ........................... 25  \n2.6 Summary .......................................... 29  \n3 Simple Datatypes and Operations 30  \n3.1 Introduction ........................................ 30  \n3.2 Integers .......................................... 30  \n3.3 Floating Point Numbers .................................. 37  \n3.4 Interlude: The Python Documentation and other Information Resources ........ 51  \n3.5 Boolean Values ...................................... 63  \n3.6 Text Strings ........................................ 68  \n3.7 None ............................................ 81  \n3.8 Summary .......................................... 83  \n4 Variables 84  \n4.1 Defining and Assigning Variables ............................. 84  \n4.2 Interlude: Finding Errors in your Code with the IDE and Exceptions .......... 93  \n4.3 Multiple Assignments and Value Swapping ........................ 99  \n4.4 Variable Types and Type Hints .............................. 100  \n4.5 Object Equality and Identity ............................... 108  \n4.6 Summary .......................................... 111  \n5 Collections 112  \n5.1 Lists ............................................ 112  \n5.2 Interlude: The Linter Ruff ................................. 117  \n5.3 Tuples ........................................... 120  \n5.4 Sets ............................................ 124  \n5.5 Dictionaries ........................................ 128  \n5.6 Summary .......................................... 129  \nII Control Flow Statements 131  \n6 Conditional Statements 133  \nCONTENTS ii  \n6.1 The if Statement ..................................... 133  \n6.2 The if... else Statement ................................ 134  \n6.3 The if... elif... else Statement ............................ 137  \n6.4 The Inline Ternary if... else Statement ......................... 140  \n6.5 Summary .......................................... 142  \n7 Loops 143  \n7.1 The for Loop Statement ................................. 143  \n7.2 The continue and break Statements .......................... 146  \n7.3 Nesting Loops ....................................... 147  \n7.4 Loops over Sequences ................................... 148  \n7.5 enumerate and Interlude: Pylint ............................. 151  \n7.6 The while Loop ...................................... 155  \n7","cbCaifFIWmICbF2K","https://ap.wps.com/l/cbCaifFIWmICbF2K","pdf",13512775,450,"English","# Introduction\n## Why Programming and Software Engineering Tools?\n## Why Python?\n## Further Reading\n# Getting Started\n## Installing Python\n## Installing PyCharm\n## Our First Program\n## Python in the Terminal\n## Getting the Examples from this Book\n## Summary\n# Simple Datatypes and Operations\n## Introduction\n## Integers\n## Floating Point Numbers\n## Interlude: The Python Documentation and other Information Resources\n## Boolean Values\n## Text Strings\n## None\n## Summary\n# Variables\n## Defining and Assigning Variables\n## Interlude: Finding Errors in your Code with the IDE and Exceptions\n## Multiple Assignments and Value Swapping\n## Variable Types and Type Hints\n## Object Equality and Identity\n## Summary\n# Collections\n## Lists\n## Interlude: The Linter Ruff\n## Tuples\n## Sets\n## Dictionaries\n## Summary\n# Conditional Statements\n## The if Statement\n## The if... else Statement\n## The if... elif... else Statement\n## The Inline Ternary if... else Statement\n## Summary\n# Loops\n## The for Loop Statement\n## The continue and break Statements\n## Nesting Loops\n## Loops over Sequences\n## enumerate and Interlude: Pylint\n## The while Loop\n## The else Statement at the Bottom of Loops\n## Summary\n# Functions\n## Defining and Calling Functions\n## Functions in Modules\n## Interlude: Unit Testing\n## Function Arguments: Default Values, Passing them by Name, and Constructing them\n## Functions as Parameters, Callables, and lambdas\n## Summary\n# Exceptions\n## Introduction\n## Raising Exceptions\n## Built-in Exceptions\n## Handling Exceptions\n## Interlude: Testing for Exceptions\n## Summary\n# Iteration, Comprehension, and Generators\n## Iterables and Iterators\n## List Comprehension\n## Interlude: doctests\n## Set Comprehension\n## Dictionary Comprehension\n## Generator Expressions\n## Generator Functions\n## Operations on Iterators\n## Summary\n# Basics of Classes\n## Design Principle: Immutable Classes\n## Design Principle: Encapsulation\n## Summary\n# Inheritance\n## A Hierarchy of Geometric Objects","[{\"question\":\"Who is this book intended for and is prior programming knowledge required?\",\"answer\":\"The book targets high school, undergraduate, and graduate students. It is designed so that readers without prior knowledge can follow the text from the beginning using examples.\"},{\"question\":\"How does the book connect Python learning to the software development process?\",\"answer\":\"It emphasizes writing clean code with comments and documentation and using tools to help find potential issues from the very beginning.\"},{\"question\":\"Where can readers get the examples used in the book?\",\"answer\":\"All examples are available online in the GitHub repository associated with the book, so readers can run and experiment with them.\"}]","Programming with Python | PDF",1134]