[{"data":1,"prerenderedAt":5279},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/pattern-matching":988},[4,22,31,40,49,58,67,76,86,95,104,113,122,131,141,150,159,168,177,186,196,205,214,223,233,242,251,260,269,279,288,297,306,315,324,333,342,351,360,369,379,388,397,406,415,424,433,442,452,461,470,479,488,497,506,515,525,534,543,552,561,570,579,588,597,606,616,625,634,643,652,661,670,680,689,698,707,716,725,734,744,753,762,771,780,789,798,807,817,826,835,844,853,863,872,881,890,900,909,918,927,936,945,953,961,970,979],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python/getting-started","python",false,"","Getting Started","Begin your Python programming journey. Learn what Python is, how to set it up, and write your first programs. Perfect for complete beginners starting their coding adventure.","getting-started",1,true,"pi pi-folder","markdown","content:python:1.getting-started.md","content","python/1.getting-started.md","python/1.getting-started","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python/what-is-python","What is Python","Discover Python's fascinating history, design philosophy, and key features. Learn why Python has become one of the world's most popular programming languages and perfect for beginners.","what-is-python",2,"content:python:2.what-is-python.md","python/2.what-is-python.md","python/2.what-is-python",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python/setup-python","Setup Python","Learn how to install Python on your computer and set up your development environment. Step-by-step guide for Windows, macOS, and Linux with beginner-friendly instructions.","setup-python",3,"content:python:3.setup-python.md","python/3.setup-python.md","python/3.setup-python",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python/your-first-program","Your First Program","Write and run your first Python program! Learn the basics of Python programming with simple examples and step-by-step instructions for beginners.","your-first-program",4,"content:python:4.your-first-program.md","python/4.your-first-program.md","python/4.your-first-program",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python/python-code-structure","Python Code Structure","Learn how Python code is organized and structured. Understand indentation, line breaks, and the basic rules that make Python programs work correctly.","python-code-structure",5,"content:python:5.python-code-structure.md","python/5.python-code-structure.md","python/5.python-code-structure",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python/writing-comments","Writing Comments","Learn how to write effective comments in Python. Discover when and how to document your code to make it clear, maintainable, and easy to understand.","writing-comments",6,"content:python:6.writing-comments.md","python/6.writing-comments.md","python/6.writing-comments",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python/working-with-variables","Working with Variables","Learn how to create, use, and manage variables in Python. Understand how to store data, change values, and follow naming conventions for clean, readable code.","working-with-variables",7,"content:python:7.working-with-variables.md","python/7.working-with-variables.md","python/7.working-with-variables",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python/basic-data-types","Basic Data Types","Learn about Python's fundamental data types including numbers, text, and boolean values","basic-data-types",8,"content:python:8.basic-data-types.md","python/8.basic-data-types.md","python/8.basic-data-types",[86,95,104,113,122],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":91,"_type":15,"_id":92,"_source":17,"_file":93,"_stem":94,"_extension":20},"/python/understanding-data-types","Understanding Data Types","Learn how Python identifies different data types and why they're important for programming","understanding-data-types",9,"content:python:9.understanding-data-types.md","python/9.understanding-data-types.md","python/9.understanding-data-types",{"_path":96,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":97,"description":98,"slug":99,"parentId":77,"order":100,"_type":15,"_id":101,"_source":17,"_file":102,"_stem":103,"_extension":20},"/python/working-with-numbers","Working with Numbers","Learn about Python's numeric data types including integers and floats, and how to perform calculations","working-with-numbers",10,"content:python:10.working-with-numbers.md","python/10.working-with-numbers.md","python/10.working-with-numbers",{"_path":105,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":106,"description":107,"slug":108,"parentId":77,"order":109,"_type":15,"_id":110,"_source":17,"_file":111,"_stem":112,"_extension":20},"/python/text-and-strings","Text and Strings","Learn how to work with text data in Python using strings, including creation, manipulation, and formatting","text-and-strings",11,"content:python:11.text-and-strings.md","python/11.text-and-strings.md","python/11.text-and-strings",{"_path":114,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":115,"description":116,"slug":117,"parentId":77,"order":118,"_type":15,"_id":119,"_source":17,"_file":120,"_stem":121,"_extension":20},"/python/true-false-values","True/False Values","Learn about boolean values in Python, including True/False logic, comparison operations, and how to use booleans for decision-making in your programs","true-false-values",12,"content:python:12.true-false-values.md","python/12.true-false-values.md","python/12.true-false-values",{"_path":123,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":124,"description":125,"slug":126,"parentId":77,"order":127,"_type":15,"_id":128,"_source":17,"_file":129,"_stem":130,"_extension":20},"/python/converting-types","Converting Types","Learn how to convert between different Python data types including strings, numbers, and booleans","converting-types",13,"content:python:13.converting-types.md","python/13.converting-types.md","python/13.converting-types",{"_path":132,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":133,"description":134,"slug":135,"order":136,"isParent":13,"icon":14,"_type":15,"_id":137,"_source":17,"_file":138,"_stem":139,"_extension":20,"children":140,"expanded":13},"/python/python-operators","Python Operators","Learn about Python operators - the symbols and keywords that perform operations on data. Discover arithmetic, comparison, logical, and assignment operators with simple examples.","python-operators",14,"content:python:14.python-operators.md","python/14.python-operators.md","python/14.python-operators",[141,150,159,168,177],{"_path":142,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":143,"description":144,"slug":145,"parentId":132,"order":146,"_type":15,"_id":147,"_source":17,"_file":148,"_stem":149,"_extension":20},"/python/math-operations","Math Operations","Learn Python's arithmetic operators for mathematical calculations. Master addition, subtraction, multiplication, division, and more with practical examples.","math-operations",15,"content:python:15.math-operations.md","python/15.math-operations.md","python/15.math-operations",{"_path":151,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":152,"description":153,"slug":154,"parentId":132,"order":155,"_type":15,"_id":156,"_source":17,"_file":157,"_stem":158,"_extension":20},"/python/comparing-values","Comparing Values","Learn Python's comparison operators to compare values and make decisions. Master equality, inequality, and relational operators with practical examples.","comparing-values",16,"content:python:16.comparing-values.md","python/16.comparing-values.md","python/16.comparing-values",{"_path":160,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":161,"description":162,"slug":163,"parentId":132,"order":164,"_type":15,"_id":165,"_source":17,"_file":166,"_stem":167,"_extension":20},"/python/logic-operations","Logic Operations","Learn about Python's logical operators for combining conditions and creating complex boolean expressions","logic-operations",17,"content:python:17.logic-operations.md","python/17.logic-operations.md","python/17.logic-operations",{"_path":169,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":170,"description":171,"slug":172,"parentId":132,"order":173,"_type":15,"_id":174,"_source":17,"_file":175,"_stem":176,"_extension":20},"/python/value-assignment","Value Assignment","Learn about Python's assignment operators for efficiently updating variables and performing calculations","value-assignment",18,"content:python:18.value-assignment.md","python/18.value-assignment.md","python/18.value-assignment",{"_path":178,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":179,"description":180,"slug":181,"parentId":132,"order":182,"_type":15,"_id":183,"_source":17,"_file":184,"_stem":185,"_extension":20},"/python/operator-precedence","Operator Precedence","Learn how Python evaluates expressions with multiple operators and how to control evaluation order","operator-precedence",19,"content:python:19.operator-precedence.md","python/19.operator-precedence.md","python/19.operator-precedence",{"_path":187,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":188,"description":189,"slug":190,"order":191,"isParent":13,"icon":14,"_type":15,"_id":192,"_source":17,"_file":193,"_stem":194,"_extension":20,"children":195,"expanded":13},"/python/decision-making","Decision Making","Learn how to make decisions in your Python programs using conditional statements and control flow","decision-making",20,"content:python:20.decision-making.md","python/20.decision-making.md","python/20.decision-making",[196,205,214],{"_path":197,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":198,"description":199,"slug":200,"parentId":187,"order":201,"_type":15,"_id":202,"_source":17,"_file":203,"_stem":204,"_extension":20},"/python/if-statements","If Statements","Learn how to use if statements to make decisions and control program flow in Python","if-statements",21,"content:python:21.if-statements.md","python/21.if-statements.md","python/21.if-statements",{"_path":206,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":207,"description":208,"slug":209,"parentId":187,"order":210,"_type":15,"_id":211,"_source":17,"_file":212,"_stem":213,"_extension":20},"/python/multiple-conditions","Multiple Conditions","Learn how to handle multiple conditions using elif statements and complex conditional logic in Python","multiple-conditions",22,"content:python:22.multiple-conditions.md","python/22.multiple-conditions.md","python/22.multiple-conditions",{"_path":215,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":216,"description":217,"slug":218,"parentId":187,"order":219,"_type":15,"_id":220,"_source":17,"_file":221,"_stem":222,"_extension":20},"/python/pattern-matching","Pattern Matching","Learn how to use Python's match-case statements for powerful pattern matching and complex decision making","pattern-matching",23,"content:python:23.pattern-matching.md","python/23.pattern-matching.md","python/23.pattern-matching",{"_path":224,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":225,"description":226,"slug":227,"order":228,"isParent":13,"icon":14,"_type":15,"_id":229,"_source":17,"_file":230,"_stem":231,"_extension":20,"children":232},"/python/repetition-and-loops","Python Loops","Learn how to use loops to repeat code efficiently and handle repetitive tasks in Python","repetition-and-loops",24,"content:python:24.repetition-and-loops.md","python/24.repetition-and-loops.md","python/24.repetition-and-loops",[233,242,251,260],{"_path":234,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":235,"description":236,"slug":237,"parentId":224,"order":238,"_type":15,"_id":239,"_source":17,"_file":240,"_stem":241,"_extension":20},"/python/while-loops","While Loops","Learn how to use while loops for condition-based repetition and create loops that run until specific conditions are met","while-loops",25,"content:python:25.while-loops.md","python/25.while-loops.md","python/25.while-loops",{"_path":243,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":244,"description":245,"slug":246,"parentId":224,"order":247,"_type":15,"_id":248,"_source":17,"_file":249,"_stem":250,"_extension":20},"/python/for-loops","For Loops","Learn how to use for loops to iterate through sequences, collections, and ranges efficiently in Python","for-loops",26,"content:python:26.for-loops.md","python/26.for-loops.md","python/26.for-loops",{"_path":252,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":253,"description":254,"slug":255,"parentId":224,"order":256,"_type":15,"_id":257,"_source":17,"_file":258,"_stem":259,"_extension":20},"/python/loop-control","Loop Control","Master advanced loop control techniques including break, continue, and else clauses for sophisticated iteration patterns","loop-control",27,"content:python:27.loop-control.md","python/27.loop-control.md","python/27.loop-control",{"_path":261,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":262,"description":263,"slug":264,"parentId":224,"order":265,"_type":15,"_id":266,"_source":17,"_file":267,"_stem":268,"_extension":20},"/python/nested-loops","Nested Loops","Learn how to use nested loops to process multi-dimensional data, create patterns, and handle complex iteration scenarios","nested-loops",28,"content:python:28.nested-loops.md","python/28.nested-loops.md","python/28.nested-loops",{"_path":270,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":271,"description":272,"slug":273,"order":274,"isParent":13,"icon":14,"_type":15,"_id":275,"_source":17,"_file":276,"_stem":277,"_extension":20,"children":278},"/python/python-lists","Python Lists","Learn about Python lists, one of the most important and versatile data structures for storing and organizing collections of data","python-lists",29,"content:python:29.python-lists.md","python/29.python-lists.md","python/29.python-lists",[279,288,297,306,315,324,333,342,351,360],{"_path":280,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":281,"description":282,"slug":283,"parentId":270,"order":284,"_type":15,"_id":285,"_source":17,"_file":286,"_stem":287,"_extension":20},"/python/creating-lists","Creating Lists","Learn different methods to create and initialize Python lists, from simple literals to advanced techniques","creating-lists",30,"content:python:30.creating-lists.md","python/30.creating-lists.md","python/30.creating-lists",{"_path":289,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":290,"description":291,"slug":292,"parentId":270,"order":293,"_type":15,"_id":294,"_source":17,"_file":295,"_stem":296,"_extension":20},"/python/reading-list-data","Reading List Data","Master techniques for accessing and retrieving data from Python lists using indexing, slicing, and built-in methods","reading-list-data",31,"content:python:31.reading-list-data.md","python/31.reading-list-data.md","python/31.reading-list-data",{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":270,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python/modifying-lists","Modifying Lists","Learn how to change, update, and modify existing elements in Python lists using indexing and various methods","modifying-lists",32,"content:python:32.modifying-lists.md","python/32.modifying-lists.md","python/32.modifying-lists",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":270,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python/adding-to-lists","Adding to Lists","Learn various methods to add elements to Python lists including append, insert, extend, and concatenation techniques","adding-to-lists",33,"content:python:33.adding-to-lists.md","python/33.adding-to-lists.md","python/33.adding-to-lists",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":270,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python/removing-from-lists","Removing from Lists","Learn different methods to remove and delete elements from Python lists including remove, pop, del, and clear","removing-from-lists",34,"content:python:34.removing-from-lists.md","python/34.removing-from-lists.md","python/34.removing-from-lists",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":270,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python/looping-through-lists","Looping Through Lists","Learn different ways to iterate through Python lists using for loops, while loops, enumerate, and other iteration techniques","looping-through-lists",35,"content:python:35.looping-through-lists.md","python/35.looping-through-lists.md","python/35.looping-through-lists",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":270,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python/list-shortcuts","List Shortcuts","Learn powerful Python list shortcuts including list comprehensions, slicing tricks, and built-in functions for efficient list operations","list-shortcuts",36,"content:python:36.list-shortcuts.md","python/36.list-shortcuts.md","python/36.list-shortcuts",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":270,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python/organizing-lists","Organizing Lists","Learn how to sort, reverse, and organize Python lists using built-in methods and custom sorting techniques","organizing-lists",37,"content:python:37.organizing-lists.md","python/37.organizing-lists.md","python/37.organizing-lists",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":270,"order":356,"_type":15,"_id":357,"_source":17,"_file":358,"_stem":359,"_extension":20},"/python/combining-lists","Combining Lists","Learn various techniques to combine, merge, and join Python lists including concatenation, zipping, and advanced merging strategies","combining-lists",38,"content:python:38.combining-lists.md","python/38.combining-lists.md","python/38.combining-lists",{"_path":361,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":362,"description":363,"slug":364,"parentId":270,"order":365,"_type":15,"_id":366,"_source":17,"_file":367,"_stem":368,"_extension":20},"/python/essential-list-tools","Essential List Tools","Master powerful built-in functions and advanced techniques for efficient Python list manipulation and data processing","essential-list-tools",39,"content:python:39.essential-list-tools.md","python/39.essential-list-tools.md","python/39.essential-list-tools",{"_path":370,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":371,"description":372,"slug":373,"order":374,"isParent":13,"icon":14,"_type":15,"_id":375,"_source":17,"_file":376,"_stem":377,"_extension":20,"children":378},"/python/python-tuples","Python Tuples","Master Python tuples - immutable sequences perfect for storing related data that shouldn't change. Learn creation, access, and manipulation techniques.","python-tuples",40,"content:python:40.python-tuples.md","python/40.python-tuples.md","python/40.python-tuples",[379,388,397,406,415,424,433],{"_path":380,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":381,"description":382,"slug":383,"parentId":370,"order":384,"_type":15,"_id":385,"_source":17,"_file":386,"_stem":387,"_extension":20},"/python/creating-tuples","Creating Tuples","Learn different ways to create Python tuples, from basic syntax to advanced techniques. Master tuple initialization and understand when to use tuples.","creating-tuples",41,"content:python:41.creating-tuples.md","python/41.creating-tuples.md","python/41.creating-tuples",{"_path":389,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":390,"description":391,"slug":392,"parentId":370,"order":393,"_type":15,"_id":394,"_source":17,"_file":395,"_stem":396,"_extension":20},"/python/reading-tuple-data","Reading Tuple Data","Master accessing tuple elements through indexing, slicing, and searching. Learn efficient patterns for reading and working with tuple data.","reading-tuple-data",42,"content:python:42.reading-tuple-data.md","python/42.reading-tuple-data.md","python/42.reading-tuple-data",{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},"/python/changing-tuples","Changing Tuples","Understand tuple immutability and learn techniques for working with unchangeable data. Master creating modified tuple versions and handling immutable constraints.","changing-tuples",43,"content:python:43.changing-tuples.md","python/43.changing-tuples.md","python/43.changing-tuples",{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},"/python/tuple-unpacking","Tuple Unpacking","Master tuple unpacking for elegant variable assignment, function returns, and data extraction. Learn Python's powerful unpacking syntax and patterns.","tuple-unpacking",44,"content:python:44.tuple-unpacking.md","python/44.tuple-unpacking.md","python/44.tuple-unpacking",{"_path":416,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":417,"description":418,"slug":419,"parentId":370,"order":420,"_type":15,"_id":421,"_source":17,"_file":422,"_stem":423,"_extension":20},"/python/iterating-tuples","Iterating Tuples","Master tuple iteration techniques for processing sequence data. Learn basic loops, enumerate, nested iteration, and advanced patterns for efficient data processing.","iterating-tuples",45,"content:python:45.iterating-tuples.md","python/45.iterating-tuples.md","python/45.iterating-tuples",{"_path":425,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":426,"description":427,"slug":428,"parentId":370,"order":429,"_type":15,"_id":430,"_source":17,"_file":431,"_stem":432,"_extension":20},"/python/merging-tuples","Merging Tuples","Learn techniques for combining and merging tuples to create larger data structures. Master concatenation, joining multiple tuples, and advanced merging patterns.","merging-tuples",46,"content:python:46.merging-tuples.md","python/46.merging-tuples.md","python/46.merging-tuples",{"_path":434,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":436,"slug":437,"parentId":370,"order":438,"_type":15,"_id":439,"_source":17,"_file":440,"_stem":441,"_extension":20},"/python/tuple-operations","Tuple Operations","Master comprehensive tuple operations including built-in functions, mathematical operations, comparisons, and advanced techniques for efficient tuple manipulation.","tuple-operations",47,"content:python:47.tuple-operations.md","python/47.tuple-operations.md","python/47.tuple-operations",{"_path":443,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":444,"description":445,"slug":446,"order":447,"isParent":13,"icon":14,"_type":15,"_id":448,"_source":17,"_file":449,"_stem":450,"_extension":20,"children":451},"/python/python-sets","Python Sets","Discover Python sets - unique collections that automatically eliminate duplicates and provide powerful mathematical operations for data filtering and analysis.","python-sets",48,"content:python:48.python-sets.md","python/48.python-sets.md","python/48.python-sets",[452,461,470,479,488,497,506],{"_path":453,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":454,"description":455,"slug":456,"parentId":443,"order":457,"_type":15,"_id":458,"_source":17,"_file":459,"_stem":460,"_extension":20},"/python/creating-sets","Creating Sets","Learn multiple ways to create sets in Python including literal syntax, set() function, and set comprehensions. Master set creation from different data sources.","creating-sets",49,"content:python:49.creating-sets.md","python/49.creating-sets.md","python/49.creating-sets",{"_path":462,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":463,"description":464,"slug":465,"parentId":443,"order":466,"_type":15,"_id":467,"_source":17,"_file":468,"_stem":469,"_extension":20},"/python/reading-set-data","Reading Set Data","Learn how to access and examine set data in Python including membership testing, iteration, size checking, and converting sets to other data types.","reading-set-data",50,"content:python:50.reading-set-data.md","python/50.reading-set-data.md","python/50.reading-set-data",{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},"/python/adding-to-sets","Adding to Sets","Learn how to add elements to sets in Python using add(), update(), and union operations. Master growing sets dynamically with single items and multiple elements.","adding-to-sets",51,"content:python:51.adding-to-sets.md","python/51.adding-to-sets.md","python/51.adding-to-sets",{"_path":480,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":481,"description":482,"slug":483,"parentId":443,"order":484,"_type":15,"_id":485,"_source":17,"_file":486,"_stem":487,"_extension":20},"/python/removing-from-sets","Removing from Sets","Learn how to remove elements from Python sets using different methods like remove(), discard(), pop(), and clear()","removing-from-sets",52,"content:python:52.removing-from-sets.md","python/52.removing-from-sets.md","python/52.removing-from-sets",{"_path":489,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":490,"description":491,"slug":492,"parentId":443,"order":493,"_type":15,"_id":494,"_source":17,"_file":495,"_stem":496,"_extension":20},"/python/iterating-sets","Iterating Sets","Learn different ways to iterate through Python sets using for loops, comprehensions, and built-in functions","iterating-sets",53,"content:python:53.iterating-sets.md","python/53.iterating-sets.md","python/53.iterating-sets",{"_path":498,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":499,"description":500,"slug":501,"parentId":443,"order":502,"_type":15,"_id":503,"_source":17,"_file":504,"_stem":505,"_extension":20},"/python/combining-sets","Combining Sets","Learn how to combine Python sets using union, intersection, difference, and other set operations","combining-sets",54,"content:python:54.combining-sets.md","python/54.combining-sets.md","python/54.combining-sets",{"_path":507,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":509,"slug":510,"parentId":443,"order":511,"_type":15,"_id":512,"_source":17,"_file":513,"_stem":514,"_extension":20},"/python/set-operations","Set Operations","Learn advanced Python set operations including comparisons, subsets, supersets, and mathematical set relationships","set-operations",55,"content:python:55.set-operations.md","python/55.set-operations.md","python/55.set-operations",{"_path":516,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":517,"description":518,"slug":519,"order":520,"isParent":13,"icon":14,"_type":15,"_id":521,"_source":17,"_file":522,"_stem":523,"_extension":20,"children":524},"/python/python-dictionaries","Python Dictionaries","Learn about Python dictionaries - key-value data structures for storing and organizing related information","python-dictionaries",56,"content:python:56.python-dictionaries.md","python/56.python-dictionaries.md","python/56.python-dictionaries",[525,534,543,552,561,570,579,588,597],{"_path":526,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":527,"description":528,"slug":529,"parentId":516,"order":530,"_type":15,"_id":531,"_source":17,"_file":532,"_stem":533,"_extension":20},"/python/creating-dictionaries","Creating Dictionaries","Learn different methods to create Python dictionaries using literals, constructors, and comprehensions","creating-dictionaries",57,"content:python:57.creating-dictionaries.md","python/57.creating-dictionaries.md","python/57.creating-dictionaries",{"_path":535,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":536,"description":537,"slug":538,"parentId":516,"order":539,"_type":15,"_id":540,"_source":17,"_file":541,"_stem":542,"_extension":20},"/python/getting-dictionary-values","Getting Dictionary Values","Learn safe and efficient methods to retrieve data from Python dictionaries using various access techniques","getting-dictionary-values",58,"content:python:58.getting-dictionary-values.md","python/58.getting-dictionary-values.md","python/58.getting-dictionary-values",{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},"/python/updating-dictionaries","Updating Dictionaries","Learn how to modify and maintain Python dictionary data using various update methods and techniques","updating-dictionaries",59,"content:python:59.updating-dictionaries.md","python/59.updating-dictionaries.md","python/59.updating-dictionaries",{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},"/python/adding-dictionary-items","Adding Dictionary Items","Learn effective techniques for adding new items to Python dictionaries with various methods and best practices","adding-dictionary-items",60,"content:python:60.adding-dictionary-items.md","python/60.adding-dictionary-items.md","python/60.adding-dictionary-items",{"_path":562,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":563,"description":564,"slug":565,"parentId":516,"order":566,"_type":15,"_id":567,"_source":17,"_file":568,"_stem":569,"_extension":20},"/python/deleting-dictionary-items","Deleting Dictionary Items","Master safe and efficient techniques for removing items from Python dictionaries with various methods and error handling","deleting-dictionary-items",61,"content:python:61.deleting-dictionary-items.md","python/61.deleting-dictionary-items.md","python/61.deleting-dictionary-items",{"_path":571,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":572,"description":573,"slug":574,"parentId":516,"order":575,"_type":15,"_id":576,"_source":17,"_file":577,"_stem":578,"_extension":20},"/python/looping-dictionaries","Looping Dictionaries","Learn efficient techniques for iterating through Python dictionaries using keys, values, and items","looping-dictionaries",62,"content:python:62.looping-dictionaries.md","python/62.looping-dictionaries.md","python/62.looping-dictionaries",{"_path":580,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":581,"description":582,"slug":583,"parentId":516,"order":584,"_type":15,"_id":585,"_source":17,"_file":586,"_stem":587,"_extension":20},"/python/dictionary-copies","Dictionary Copies","Learn safe techniques for duplicating Python dictionaries using shallow and deep copy methods","dictionary-copies",63,"content:python:63.dictionary-copies.md","python/63.dictionary-copies.md","python/63.dictionary-copies",{"_path":589,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":590,"description":591,"slug":592,"parentId":516,"order":593,"_type":15,"_id":594,"_source":17,"_file":595,"_stem":596,"_extension":20},"/python/multi-level-dictionaries","Multi-level Dictionaries","Master working with nested Python dictionaries for complex data structures and hierarchical information","multi-level-dictionaries",64,"content:python:64.multi-level-dictionaries.md","python/64.multi-level-dictionaries.md","python/64.multi-level-dictionaries",{"_path":598,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":599,"description":600,"slug":601,"parentId":516,"order":602,"_type":15,"_id":603,"_source":17,"_file":604,"_stem":605,"_extension":20},"/python/dictionary-tools","Dictionary Tools","Explore powerful built-in functions and advanced techniques for efficient Python dictionary manipulation and analysis","dictionary-tools",65,"content:python:65.dictionary-tools.md","python/65.dictionary-tools.md","python/65.dictionary-tools",{"_path":607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":608,"description":609,"slug":610,"order":611,"isParent":13,"icon":14,"_type":15,"_id":612,"_source":17,"_file":613,"_stem":614,"_extension":20,"children":615},"/python/python-functions","Python Functions","Learn how to create and use Python functions to organize code into reusable, modular components that make programs more efficient and maintainable","python-functions",66,"content:python:66.python-functions.md","python/66.python-functions.md","python/66.python-functions",[616,625,634,643,652,661],{"_path":617,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":618,"description":619,"slug":620,"parentId":607,"order":621,"_type":15,"_id":622,"_source":17,"_file":623,"_stem":624,"_extension":20},"/python/function-basics","Function Basics","Learn the fundamentals of creating and using Python functions to organize code into reusable, modular components","function-basics",67,"content:python:67.function-basics.md","python/67.function-basics.md","python/67.function-basics",{"_path":626,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":627,"description":628,"slug":629,"parentId":607,"order":630,"_type":15,"_id":631,"_source":17,"_file":632,"_stem":633,"_extension":20},"/python/function-parameters","Function Parameters","Master different types of Python function parameters including positional, keyword, default, and variable-length arguments","function-parameters",68,"content:python:68.function-parameters.md","python/68.function-parameters.md","python/68.function-parameters",{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},"/python/returning-values","Returning Values","Learn different ways Python functions return data including single values, multiple values, and conditional returns","returning-values",69,"content:python:69.returning-values.md","python/69.returning-values.md","python/69.returning-values",{"_path":644,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":645,"description":646,"slug":647,"parentId":607,"order":648,"_type":15,"_id":649,"_source":17,"_file":650,"_stem":651,"_extension":20},"/python/variable-scope","Variable Scope","Understand Python variable scope including local, global, and nonlocal variables and how they affect function behavior","variable-scope",70,"content:python:70.variable-scope.md","python/70.variable-scope.md","python/70.variable-scope",{"_path":653,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":654,"description":655,"slug":656,"parentId":607,"order":657,"_type":15,"_id":658,"_source":17,"_file":659,"_stem":660,"_extension":20},"/python/anonymous-functions","Anonymous Functions","Learn to create and use Python lambda functions for concise, inline function definitions and functional programming patterns","anonymous-functions",71,"content:python:71.anonymous-functions.md","python/71.anonymous-functions.md","python/71.anonymous-functions",{"_path":662,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":663,"description":664,"slug":665,"parentId":607,"order":666,"_type":15,"_id":667,"_source":17,"_file":668,"_stem":669,"_extension":20},"/python/function-recursion","Function Recursion","Master recursive functions in Python by learning how functions can call themselves to solve complex problems with elegant, mathematical solutions","function-recursion",72,"content:python:72.function-recursion.md","python/72.function-recursion.md","python/72.function-recursion",{"_path":671,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":672,"description":673,"slug":674,"order":675,"isParent":13,"icon":14,"_type":15,"_id":676,"_source":17,"_file":677,"_stem":678,"_extension":20,"children":679},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/python/file-operations","File Operations","Master Python file handling with reading, writing, and managing files for data persistence and real-world applications","file-operations",89,"content:python:89.file-operations.md","python/89.file-operations.md","python/89.file-operations",[817,826,835,844],{"_path":818,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":819,"description":820,"slug":821,"parentId":808,"order":822,"_type":15,"_id":823,"_source":17,"_file":824,"_stem":825,"_extension":20},"/python/file-basics","File Basics","Learn fundamental Python file operations including opening files, understanding file modes, using context managers, and basic file handling concepts","file-basics",90,"content:python:90.file-basics.md","python/90.file-basics.md","python/90.file-basics",{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},"/python/reading-files","Reading Files","Master Python file reading techniques including reading entire files, line-by-line processing, and handling different file formats for efficient data processing","reading-files",91,"content:python:91.reading-files.md","python/91.reading-files.md","python/91.reading-files",{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},"/python/writing-files","Writing Files","Learn Python file writing techniques including creating new files, appending content, updating existing files, and saving different data formats safely","writing-files",92,"content:python:92.writing-files.md","python/92.writing-files.md","python/92.writing-files",{"_path":845,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":846,"description":847,"slug":848,"parentId":808,"order":849,"_type":15,"_id":850,"_source":17,"_file":851,"_stem":852,"_extension":20},"/python/file-management","File Management","Learn Python file management techniques including checking file properties, organizing files, directory operations, and implementing file system maintenance tasks","file-management",93,"content:python:93.file-management.md","python/93.file-management.md","python/93.file-management",{"_path":854,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":855,"description":856,"slug":857,"order":858,"isParent":13,"icon":14,"_type":15,"_id":859,"_source":17,"_file":860,"_stem":861,"_extension":20,"children":862},"/python/code-organization","Code Organization","Master Python code organization with modules, built-in libraries, and path management for creating maintainable and reusable applications","code-organization",94,"content:python:94.code-organization.md","python/94.code-organization.md","python/94.code-organization",[863,872,881],{"_path":864,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":865,"description":866,"slug":867,"parentId":854,"order":868,"_type":15,"_id":869,"_source":17,"_file":870,"_stem":871,"_extension":20},"/python/creating-modules","Creating Modules","Learn how to create custom Python modules, organize functions and classes, write reusable code components, and design effective module structures","creating-modules",95,"content:python:95.creating-modules.md","python/95.creating-modules.md","python/95.creating-modules",{"_path":873,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":874,"description":875,"slug":876,"parentId":854,"order":877,"_type":15,"_id":878,"_source":17,"_file":879,"_stem":880,"_extension":20},"/python/using-built-in-modules","Using Built-in Modules","Discover Python's extensive standard library and learn to effectively use built-in modules for common programming tasks, data processing, and system operations","using-built-in-modules",96,"content:python:96.using-built-in-modules.md","python/96.using-built-in-modules.md","python/96.using-built-in-modules",{"_path":882,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":883,"description":884,"slug":885,"parentId":854,"order":886,"_type":15,"_id":887,"_source":17,"_file":888,"_stem":889,"_extension":20},"/python/module-paths","Module Paths","Understand Python's module search system, manage import paths, work with packages, and organize larger projects with proper module path management","module-paths",97,"content:python:97.module-paths.md","python/97.module-paths.md","python/97.module-paths",{"_path":891,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":892,"description":893,"slug":894,"order":895,"isParent":13,"icon":14,"_type":15,"_id":896,"_source":17,"_file":897,"_stem":898,"_extension":20,"children":899,"expanded":13},"/python/reference-materials","Reference Materials","Comprehensive Python reference materials including reserved words, built-in functions, and operation guides for quick lookup and development support","reference-materials",98,"content:python:98.reference-materials.md","python/98.reference-materials.md","python/98.reference-materials",[900,909,918,927,936,945,953,961,970],{"_path":901,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":903,"slug":904,"parentId":891,"order":905,"_type":15,"_id":906,"_source":17,"_file":907,"_stem":908,"_extension":20},"/python/reserved-words","Reserved Words","Complete reference of Python keywords and reserved words with descriptions, usage examples, and syntax guidelines","reserved-words",99,"content:python:99.reserved-words.md","python/99.reserved-words.md","python/99.reserved-words",{"_path":910,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":911,"description":912,"slug":913,"parentId":891,"order":914,"_type":15,"_id":915,"_source":17,"_file":916,"_stem":917,"_extension":20},"/python/built-in-functions","Built-in Functions","Comprehensive reference of Python's built-in functions with parameters, return values, and practical usage examples","built-in-functions",100,"content:python:100.built-in-functions.md","python/100.built-in-functions.md","python/100.built-in-functions",{"_path":919,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":920,"description":921,"slug":922,"parentId":891,"order":923,"_type":15,"_id":924,"_source":17,"_file":925,"_stem":926,"_extension":20},"/python/string-operations","String Operations","Complete reference of Python string methods, operations, and formatting techniques with examples and use cases","string-operations",101,"content:python:101.string-operations.md","python/101.string-operations.md","python/101.string-operations",{"_path":928,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":929,"description":930,"slug":931,"parentId":891,"order":932,"_type":15,"_id":933,"_source":17,"_file":934,"_stem":935,"_extension":20},"/python/list-operations","List Operations","Complete reference of Python list methods, operations, and manipulation techniques with examples and performance notes","list-operations",102,"content:python:102.list-operations.md","python/102.list-operations.md","python/102.list-operations",{"_path":937,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":938,"description":939,"slug":940,"parentId":891,"order":941,"_type":15,"_id":942,"_source":17,"_file":943,"_stem":944,"_extension":20},"/python/dictionary-operations","Dictionary Operations","Complete reference of Python dictionary methods, operations, and manipulation techniques with examples and use cases","dictionary-operations",103,"content:python:103.dictionary-operations.md","python/103.dictionary-operations.md","python/103.dictionary-operations",{"_path":946,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":947,"slug":948,"parentId":891,"order":949,"_type":15,"_id":950,"_source":17,"_file":951,"_stem":952,"_extension":20},"/python/tuple-methods","Complete reference of Python tuple operations, methods, and techniques with examples and use cases","tuple-methods",104,"content:python:104.tuple-methods.md","python/104.tuple-methods.md","python/104.tuple-methods",{"_path":954,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":955,"slug":956,"parentId":891,"order":957,"_type":15,"_id":958,"_source":17,"_file":959,"_stem":960,"_extension":20},"/python/set-methods","Complete reference of Python set operations, methods, and mathematical set operations with examples and use cases","set-methods",105,"content:python:105.set-methods.md","python/105.set-methods.md","python/105.set-methods",{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},"/python/file-operations-reference","File Operations Reference","Complete reference of Python file operations, modes, methods, and file handling techniques with examples","file-operations-reference",106,"content:python:106.file-operations-reference.md","python/106.file-operations-reference.md","python/106.file-operations-reference",{"_path":971,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":972,"description":973,"slug":974,"parentId":891,"order":975,"_type":15,"_id":976,"_source":17,"_file":977,"_stem":978,"_extension":20},"/python/error-types","Error Types","Complete reference of Python exception types, error handling patterns, and debugging techniques with examples","error-types",107,"content:python:107.error-types.md","python/107.error-types.md","python/107.error-types",{"_path":980,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":981,"description":10,"slug":982,"order":983,"icon":14,"_type":15,"_id":984,"_source":17,"_file":985,"_stem":986,"_extension":20},"/python","Introduction","python-tutorial",0,"content:python:index.md","python/index.md","python/index",[214],{"_path":215,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":216,"description":217,"slug":218,"parentId":187,"order":219,"body":989,"_type":15,"_id":220,"_source":17,"_file":221,"_stem":222,"_extension":20},{"type":990,"children":991,"toc":5265},"root",[992,1000,1014,1019,1258,1265,1270,1442,1456,1713,1719,1734,1871,1876,2423,2428,2434,2439,2550,2557,2833,2839,2844,2966,2971,3468,3474,3488,3662,4084,4090,4095,4244,4734,4740,4745,4926,4932,5147,5153,5158,5165,5171,5176,5201,5235,5259],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":218},[997],{"type":998,"value":999},"text","🎯 Pattern Matching",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004,1006,1012],{"type":998,"value":1005},"Pattern matching is Python's modern approach to handling complex decision scenarios. Introduced in ",{"type":993,"tag":1007,"props":1008,"children":1009},"strong",{},[1010],{"type":998,"value":1011},"Python 3.10",{"type":998,"value":1013},", the match-case statement provides a powerful and elegant way to compare values against patterns, making complex conditional logic more readable and maintainable.",{"type":993,"tag":1001,"props":1015,"children":1016},{},[1017],{"type":998,"value":1018},"Think of pattern matching as a sophisticated switch statement that can match not just simple values, but also complex data structures, types, and conditions. It's particularly useful when you need to handle many different cases based on the structure or content of your data.",{"type":993,"tag":1020,"props":1021,"children":1022},"code-try",{},[1023],{"type":993,"tag":1024,"props":1025,"children":1028},"pre",{"className":1026,"code":1027,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic pattern matching example\ndef describe_animal(animal):\n    match animal:\n        case \"dog\":\n            return \"Loyal companion\"\n        case \"cat\":\n            return \"Independent hunter\"\n        case \"bird\":\n            return \"Flying friend\"\n        case _:  # Default case\n            return \"Unknown animal\"\n\nprint(describe_animal(\"dog\"))      # Output: Loyal companion\nprint(describe_animal(\"fish\"))     # Output: Unknown animal\n",[1029],{"type":993,"tag":1030,"props":1031,"children":1032},"code",{"__ignoreMap":8},[1033,1044,1065,1078,1097,1110,1126,1138,1154,1166,1183,1195,1203,1232],{"type":993,"tag":1034,"props":1035,"children":1037},"span",{"class":1036,"line":12},"line",[1038],{"type":993,"tag":1034,"props":1039,"children":1041},{"style":1040},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1042],{"type":998,"value":1043},"# Basic pattern matching example\n",{"type":993,"tag":1034,"props":1045,"children":1046},{"class":1036,"line":27},[1047,1053,1059],{"type":993,"tag":1034,"props":1048,"children":1050},{"style":1049},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1051],{"type":998,"value":1052},"def",{"type":993,"tag":1034,"props":1054,"children":1056},{"style":1055},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1057],{"type":998,"value":1058}," describe_animal",{"type":993,"tag":1034,"props":1060,"children":1062},{"style":1061},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1063],{"type":998,"value":1064},"(animal):\n",{"type":993,"tag":1034,"props":1066,"children":1067},{"class":1036,"line":36},[1068,1073],{"type":993,"tag":1034,"props":1069,"children":1070},{"style":1049},[1071],{"type":998,"value":1072},"    match",{"type":993,"tag":1034,"props":1074,"children":1075},{"style":1061},[1076],{"type":998,"value":1077}," animal:\n",{"type":993,"tag":1034,"props":1079,"children":1080},{"class":1036,"line":45},[1081,1086,1092],{"type":993,"tag":1034,"props":1082,"children":1083},{"style":1049},[1084],{"type":998,"value":1085},"        case",{"type":993,"tag":1034,"props":1087,"children":1089},{"style":1088},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1090],{"type":998,"value":1091}," \"dog\"",{"type":993,"tag":1034,"props":1093,"children":1094},{"style":1061},[1095],{"type":998,"value":1096},":\n",{"type":993,"tag":1034,"props":1098,"children":1099},{"class":1036,"line":54},[1100,1105],{"type":993,"tag":1034,"props":1101,"children":1102},{"style":1049},[1103],{"type":998,"value":1104},"            return",{"type":993,"tag":1034,"props":1106,"children":1107},{"style":1088},[1108],{"type":998,"value":1109}," \"Loyal companion\"\n",{"type":993,"tag":1034,"props":1111,"children":1112},{"class":1036,"line":63},[1113,1117,1122],{"type":993,"tag":1034,"props":1114,"children":1115},{"style":1049},[1116],{"type":998,"value":1085},{"type":993,"tag":1034,"props":1118,"children":1119},{"style":1088},[1120],{"type":998,"value":1121}," \"cat\"",{"type":993,"tag":1034,"props":1123,"children":1124},{"style":1061},[1125],{"type":998,"value":1096},{"type":993,"tag":1034,"props":1127,"children":1128},{"class":1036,"line":72},[1129,1133],{"type":993,"tag":1034,"props":1130,"children":1131},{"style":1049},[1132],{"type":998,"value":1104},{"type":993,"tag":1034,"props":1134,"children":1135},{"style":1088},[1136],{"type":998,"value":1137}," \"Independent hunter\"\n",{"type":993,"tag":1034,"props":1139,"children":1140},{"class":1036,"line":81},[1141,1145,1150],{"type":993,"tag":1034,"props":1142,"children":1143},{"style":1049},[1144],{"type":998,"value":1085},{"type":993,"tag":1034,"props":1146,"children":1147},{"style":1088},[1148],{"type":998,"value":1149}," \"bird\"",{"type":993,"tag":1034,"props":1151,"children":1152},{"style":1061},[1153],{"type":998,"value":1096},{"type":993,"tag":1034,"props":1155,"children":1156},{"class":1036,"line":91},[1157,1161],{"type":993,"tag":1034,"props":1158,"children":1159},{"style":1049},[1160],{"type":998,"value":1104},{"type":993,"tag":1034,"props":1162,"children":1163},{"style":1088},[1164],{"type":998,"value":1165}," \"Flying friend\"\n",{"type":993,"tag":1034,"props":1167,"children":1168},{"class":1036,"line":100},[1169,1173,1178],{"type":993,"tag":1034,"props":1170,"children":1171},{"style":1049},[1172],{"type":998,"value":1085},{"type":993,"tag":1034,"props":1174,"children":1175},{"style":1061},[1176],{"type":998,"value":1177}," _:  ",{"type":993,"tag":1034,"props":1179,"children":1180},{"style":1040},[1181],{"type":998,"value":1182},"# Default case\n",{"type":993,"tag":1034,"props":1184,"children":1185},{"class":1036,"line":109},[1186,1190],{"type":993,"tag":1034,"props":1187,"children":1188},{"style":1049},[1189],{"type":998,"value":1104},{"type":993,"tag":1034,"props":1191,"children":1192},{"style":1088},[1193],{"type":998,"value":1194}," \"Unknown animal\"\n",{"type":993,"tag":1034,"props":1196,"children":1197},{"class":1036,"line":118},[1198],{"type":993,"tag":1034,"props":1199,"children":1200},{"emptyLinePlaceholder":13},[1201],{"type":998,"value":1202},"\n",{"type":993,"tag":1034,"props":1204,"children":1205},{"class":1036,"line":127},[1206,1212,1217,1222,1227],{"type":993,"tag":1034,"props":1207,"children":1209},{"style":1208},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1210],{"type":998,"value":1211},"print",{"type":993,"tag":1034,"props":1213,"children":1214},{"style":1061},[1215],{"type":998,"value":1216},"(describe_animal(",{"type":993,"tag":1034,"props":1218,"children":1219},{"style":1088},[1220],{"type":998,"value":1221},"\"dog\"",{"type":993,"tag":1034,"props":1223,"children":1224},{"style":1061},[1225],{"type":998,"value":1226},"))      ",{"type":993,"tag":1034,"props":1228,"children":1229},{"style":1040},[1230],{"type":998,"value":1231},"# Output: Loyal companion\n",{"type":993,"tag":1034,"props":1233,"children":1234},{"class":1036,"line":136},[1235,1239,1243,1248,1253],{"type":993,"tag":1034,"props":1236,"children":1237},{"style":1208},[1238],{"type":998,"value":1211},{"type":993,"tag":1034,"props":1240,"children":1241},{"style":1061},[1242],{"type":998,"value":1216},{"type":993,"tag":1034,"props":1244,"children":1245},{"style":1088},[1246],{"type":998,"value":1247},"\"fish\"",{"type":993,"tag":1034,"props":1249,"children":1250},{"style":1061},[1251],{"type":998,"value":1252},"))     ",{"type":993,"tag":1034,"props":1254,"children":1255},{"style":1040},[1256],{"type":998,"value":1257},"# Output: Unknown animal\n",{"type":993,"tag":1259,"props":1260,"children":1262},"h2",{"id":1261},"basic-match-case-syntax",[1263],{"type":998,"value":1264},"📝 Basic Match-Case Syntax",{"type":993,"tag":1001,"props":1266,"children":1267},{},[1268],{"type":998,"value":1269},"The match statement evaluates an expression and compares it against a series of case patterns. When a pattern matches, Python executes the corresponding code block. The underscore (_) serves as a wildcard that matches anything.",{"type":993,"tag":1271,"props":1272,"children":1276},"info-box",{"emoji":1273,"title":1274,"type":1275},"📝","Match-Case Statement Fundamentals","info",[1277,1285,1348,1356,1405,1421],{"type":993,"tag":1001,"props":1278,"children":1279},{},[1280],{"type":993,"tag":1007,"props":1281,"children":1282},{},[1283],{"type":998,"value":1284},"Core Components:",{"type":993,"tag":1286,"props":1287,"children":1288},"ul",{},[1289,1306,1322,1338],{"type":993,"tag":1290,"props":1291,"children":1292},"li",{},[1293,1304],{"type":993,"tag":1007,"props":1294,"children":1295},{},[1296,1302],{"type":993,"tag":1030,"props":1297,"children":1299},{"className":1298},[],[1300],{"type":998,"value":1301},"match",{"type":998,"value":1303}," keyword",{"type":998,"value":1305}," followed by expression to evaluate",{"type":993,"tag":1290,"props":1307,"children":1308},{},[1309,1320],{"type":993,"tag":1007,"props":1310,"children":1311},{},[1312,1318],{"type":993,"tag":1030,"props":1313,"children":1315},{"className":1314},[],[1316],{"type":998,"value":1317},"case",{"type":998,"value":1319}," patterns",{"type":998,"value":1321}," with corresponding code blocks",{"type":993,"tag":1290,"props":1323,"children":1324},{},[1325,1336],{"type":993,"tag":1007,"props":1326,"children":1327},{},[1328,1330],{"type":998,"value":1329},"Wildcard ",{"type":993,"tag":1030,"props":1331,"children":1333},{"className":1332},[],[1334],{"type":998,"value":1335},"_",{"type":998,"value":1337}," for default/catch-all cases",{"type":993,"tag":1290,"props":1339,"children":1340},{},[1341,1346],{"type":993,"tag":1007,"props":1342,"children":1343},{},[1344],{"type":998,"value":1345},"Sequential pattern evaluation",{"type":998,"value":1347}," (top to bottom)",{"type":993,"tag":1001,"props":1349,"children":1350},{},[1351],{"type":993,"tag":1007,"props":1352,"children":1353},{},[1354],{"type":998,"value":1355},"Execution Flow:",{"type":993,"tag":1286,"props":1357,"children":1358},{},[1359,1369,1381,1393],{"type":993,"tag":1290,"props":1360,"children":1361},{},[1362,1364],{"type":998,"value":1363},"Evaluates match expression ",{"type":993,"tag":1007,"props":1365,"children":1366},{},[1367],{"type":998,"value":1368},"once",{"type":993,"tag":1290,"props":1370,"children":1371},{},[1372,1374,1379],{"type":998,"value":1373},"Tests patterns ",{"type":993,"tag":1007,"props":1375,"children":1376},{},[1377],{"type":998,"value":1378},"in order",{"type":998,"value":1380}," until match found",{"type":993,"tag":1290,"props":1382,"children":1383},{},[1384,1386,1391],{"type":998,"value":1385},"Executes ",{"type":993,"tag":1007,"props":1387,"children":1388},{},[1389],{"type":998,"value":1390},"first matching case",{"type":998,"value":1392}," block",{"type":993,"tag":1290,"props":1394,"children":1395},{},[1396,1398,1403],{"type":998,"value":1397},"Skips ",{"type":993,"tag":1007,"props":1399,"children":1400},{},[1401],{"type":998,"value":1402},"remaining cases",{"type":998,"value":1404}," after match",{"type":993,"tag":1001,"props":1406,"children":1407},{},[1408,1413,1415,1419],{"type":993,"tag":1007,"props":1409,"children":1410},{},[1411],{"type":998,"value":1412},"Python Version:",{"type":998,"value":1414}," Requires ",{"type":993,"tag":1007,"props":1416,"children":1417},{},[1418],{"type":998,"value":1011},{"type":998,"value":1420}," or later",{"type":993,"tag":1001,"props":1422,"children":1423},{},[1424,1429,1431,1440],{"type":993,"tag":1007,"props":1425,"children":1426},{},[1427],{"type":998,"value":1428},"Advantage:",{"type":998,"value":1430}," More readable than complex ",{"type":993,"tag":1007,"props":1432,"children":1433},{},[1434],{"type":993,"tag":1435,"props":1436,"children":1437},"a",{"href":206},[1438],{"type":998,"value":1439},"if-elif chains",{"type":998,"value":1441}," for pattern-based logic",{"type":993,"tag":1001,"props":1443,"children":1444},{},[1445,1447,1454],{"type":998,"value":1446},"Unlike ",{"type":993,"tag":1007,"props":1448,"children":1449},{},[1450],{"type":993,"tag":1435,"props":1451,"children":1452},{"href":206},[1453],{"type":998,"value":1439},{"type":998,"value":1455},", match statements are designed specifically for pattern comparison and offer more sophisticated matching capabilities than simple equality checks.",{"type":993,"tag":1020,"props":1457,"children":1458},{},[1459],{"type":993,"tag":1024,"props":1460,"children":1462},{"className":1026,"code":1461,"language":6,"meta":8,"style":8},"# Basic match-case patterns with OR operator\ndef get_day_type(day):\n    match day:\n        case \"Monday\" | \"Tuesday\" | \"Wednesday\" | \"Thursday\" | \"Friday\":\n            return \"Weekday\"\n        case \"Saturday\" | \"Sunday\":\n            return \"Weekend\"\n        case _:\n            return \"Invalid day\"\n\nprint(get_day_type(\"Monday\"))      # Output: Weekday\nprint(get_day_type(\"Saturday\"))    # Output: Weekend\nprint(get_day_type(\"Holiday\"))     # Output: Invalid day\n",[1463],{"type":993,"tag":1030,"props":1464,"children":1465},{"__ignoreMap":8},[1466,1474,1491,1503,1556,1568,1593,1605,1617,1629,1636,1662,1688],{"type":993,"tag":1034,"props":1467,"children":1468},{"class":1036,"line":12},[1469],{"type":993,"tag":1034,"props":1470,"children":1471},{"style":1040},[1472],{"type":998,"value":1473},"# Basic match-case patterns with OR operator\n",{"type":993,"tag":1034,"props":1475,"children":1476},{"class":1036,"line":27},[1477,1481,1486],{"type":993,"tag":1034,"props":1478,"children":1479},{"style":1049},[1480],{"type":998,"value":1052},{"type":993,"tag":1034,"props":1482,"children":1483},{"style":1055},[1484],{"type":998,"value":1485}," get_day_type",{"type":993,"tag":1034,"props":1487,"children":1488},{"style":1061},[1489],{"type":998,"value":1490},"(day):\n",{"type":993,"tag":1034,"props":1492,"children":1493},{"class":1036,"line":36},[1494,1498],{"type":993,"tag":1034,"props":1495,"children":1496},{"style":1049},[1497],{"type":998,"value":1072},{"type":993,"tag":1034,"props":1499,"children":1500},{"style":1061},[1501],{"type":998,"value":1502}," day:\n",{"type":993,"tag":1034,"props":1504,"children":1505},{"class":1036,"line":45},[1506,1510,1515,1520,1525,1529,1534,1538,1543,1547,1552],{"type":993,"tag":1034,"props":1507,"children":1508},{"style":1049},[1509],{"type":998,"value":1085},{"type":993,"tag":1034,"props":1511,"children":1512},{"style":1088},[1513],{"type":998,"value":1514}," \"Monday\"",{"type":993,"tag":1034,"props":1516,"children":1517},{"style":1049},[1518],{"type":998,"value":1519}," |",{"type":993,"tag":1034,"props":1521,"children":1522},{"style":1088},[1523],{"type":998,"value":1524}," \"Tuesday\"",{"type":993,"tag":1034,"props":1526,"children":1527},{"style":1049},[1528],{"type":998,"value":1519},{"type":993,"tag":1034,"props":1530,"children":1531},{"style":1088},[1532],{"type":998,"value":1533}," \"Wednesday\"",{"type":993,"tag":1034,"props":1535,"children":1536},{"style":1049},[1537],{"type":998,"value":1519},{"type":993,"tag":1034,"props":1539,"children":1540},{"style":1088},[1541],{"type":998,"value":1542}," \"Thursday\"",{"type":993,"tag":1034,"props":1544,"children":1545},{"style":1049},[1546],{"type":998,"value":1519},{"type":993,"tag":1034,"props":1548,"children":1549},{"style":1088},[1550],{"type":998,"value":1551}," \"Friday\"",{"type":993,"tag":1034,"props":1553,"children":1554},{"style":1061},[1555],{"type":998,"value":1096},{"type":993,"tag":1034,"props":1557,"children":1558},{"class":1036,"line":54},[1559,1563],{"type":993,"tag":1034,"props":1560,"children":1561},{"style":1049},[1562],{"type":998,"value":1104},{"type":993,"tag":1034,"props":1564,"children":1565},{"style":1088},[1566],{"type":998,"value":1567}," \"Weekday\"\n",{"type":993,"tag":1034,"props":1569,"children":1570},{"class":1036,"line":63},[1571,1575,1580,1584,1589],{"type":993,"tag":1034,"props":1572,"children":1573},{"style":1049},[1574],{"type":998,"value":1085},{"type":993,"tag":1034,"props":1576,"children":1577},{"style":1088},[1578],{"type":998,"value":1579}," \"Saturday\"",{"type":993,"tag":1034,"props":1581,"children":1582},{"style":1049},[1583],{"type":998,"value":1519},{"type":993,"tag":1034,"props":1585,"children":1586},{"style":1088},[1587],{"type":998,"value":1588}," \"Sunday\"",{"type":993,"tag":1034,"props":1590,"children":1591},{"style":1061},[1592],{"type":998,"value":1096},{"type":993,"tag":1034,"props":1594,"children":1595},{"class":1036,"line":72},[1596,1600],{"type":993,"tag":1034,"props":1597,"children":1598},{"style":1049},[1599],{"type":998,"value":1104},{"type":993,"tag":1034,"props":1601,"children":1602},{"style":1088},[1603],{"type":998,"value":1604}," \"Weekend\"\n",{"type":993,"tag":1034,"props":1606,"children":1607},{"class":1036,"line":81},[1608,1612],{"type":993,"tag":1034,"props":1609,"children":1610},{"style":1049},[1611],{"type":998,"value":1085},{"type":993,"tag":1034,"props":1613,"children":1614},{"style":1061},[1615],{"type":998,"value":1616}," _:\n",{"type":993,"tag":1034,"props":1618,"children":1619},{"class":1036,"line":91},[1620,1624],{"type":993,"tag":1034,"props":1621,"children":1622},{"style":1049},[1623],{"type":998,"value":1104},{"type":993,"tag":1034,"props":1625,"children":1626},{"style":1088},[1627],{"type":998,"value":1628}," \"Invalid day\"\n",{"type":993,"tag":1034,"props":1630,"children":1631},{"class":1036,"line":100},[1632],{"type":993,"tag":1034,"props":1633,"children":1634},{"emptyLinePlaceholder":13},[1635],{"type":998,"value":1202},{"type":993,"tag":1034,"props":1637,"children":1638},{"class":1036,"line":109},[1639,1643,1648,1653,1657],{"type":993,"tag":1034,"props":1640,"children":1641},{"style":1208},[1642],{"type":998,"value":1211},{"type":993,"tag":1034,"props":1644,"children":1645},{"style":1061},[1646],{"type":998,"value":1647},"(get_day_type(",{"type":993,"tag":1034,"props":1649,"children":1650},{"style":1088},[1651],{"type":998,"value":1652},"\"Monday\"",{"type":993,"tag":1034,"props":1654,"children":1655},{"style":1061},[1656],{"type":998,"value":1226},{"type":993,"tag":1034,"props":1658,"children":1659},{"style":1040},[1660],{"type":998,"value":1661},"# Output: Weekday\n",{"type":993,"tag":1034,"props":1663,"children":1664},{"class":1036,"line":118},[1665,1669,1673,1678,1683],{"type":993,"tag":1034,"props":1666,"children":1667},{"style":1208},[1668],{"type":998,"value":1211},{"type":993,"tag":1034,"props":1670,"children":1671},{"style":1061},[1672],{"type":998,"value":1647},{"type":993,"tag":1034,"props":1674,"children":1675},{"style":1088},[1676],{"type":998,"value":1677},"\"Saturday\"",{"type":993,"tag":1034,"props":1679,"children":1680},{"style":1061},[1681],{"type":998,"value":1682},"))    ",{"type":993,"tag":1034,"props":1684,"children":1685},{"style":1040},[1686],{"type":998,"value":1687},"# Output: Weekend\n",{"type":993,"tag":1034,"props":1689,"children":1690},{"class":1036,"line":127},[1691,1695,1699,1704,1708],{"type":993,"tag":1034,"props":1692,"children":1693},{"style":1208},[1694],{"type":998,"value":1211},{"type":993,"tag":1034,"props":1696,"children":1697},{"style":1061},[1698],{"type":998,"value":1647},{"type":993,"tag":1034,"props":1700,"children":1701},{"style":1088},[1702],{"type":998,"value":1703},"\"Holiday\"",{"type":993,"tag":1034,"props":1705,"children":1706},{"style":1061},[1707],{"type":998,"value":1252},{"type":993,"tag":1034,"props":1709,"children":1710},{"style":1040},[1711],{"type":998,"value":1712},"# Output: Invalid day\n",{"type":993,"tag":1259,"props":1714,"children":1716},{"id":1715},"matching-values-and-types",[1717],{"type":998,"value":1718},"🔍 Matching Values and Types",{"type":993,"tag":1001,"props":1720,"children":1721},{},[1722,1724,1732],{"type":998,"value":1723},"Pattern matching can match specific values, ranges, and even data types. This flexibility makes it powerful for handling different kinds of input data with appropriate responses using ",{"type":993,"tag":1007,"props":1725,"children":1726},{},[1727],{"type":993,"tag":1435,"props":1728,"children":1729},{"href":123},[1730],{"type":998,"value":1731},"type conversion",{"type":998,"value":1733}," concepts.",{"type":993,"tag":1271,"props":1735,"children":1739},{"emoji":1736,"title":1737,"type":1738},"🔍","Value and Type Matching Capabilities","success",[1740,1748,1820,1828,1851,1861],{"type":993,"tag":1001,"props":1741,"children":1742},{},[1743],{"type":993,"tag":1007,"props":1744,"children":1745},{},[1746],{"type":998,"value":1747},"Matching Options:",{"type":993,"tag":1286,"props":1749,"children":1750},{},[1751,1769,1786,1803],{"type":993,"tag":1290,"props":1752,"children":1753},{},[1754,1759,1761,1767],{"type":993,"tag":1007,"props":1755,"children":1756},{},[1757],{"type":998,"value":1758},"Literal Values",{"type":998,"value":1760},": Exact value matches (",{"type":993,"tag":1030,"props":1762,"children":1764},{"className":1763},[],[1765],{"type":998,"value":1766},"case 42:",{"type":998,"value":1768},")",{"type":993,"tag":1290,"props":1770,"children":1771},{},[1772,1777,1779,1785],{"type":993,"tag":1007,"props":1773,"children":1774},{},[1775],{"type":998,"value":1776},"Type Patterns",{"type":998,"value":1778},": Data type checking (",{"type":993,"tag":1030,"props":1780,"children":1782},{"className":1781},[],[1783],{"type":998,"value":1784},"case int():",{"type":998,"value":1768},{"type":993,"tag":1290,"props":1787,"children":1788},{},[1789,1794,1796,1802],{"type":993,"tag":1007,"props":1790,"children":1791},{},[1792],{"type":998,"value":1793},"OR Patterns",{"type":998,"value":1795},": Multiple alternatives (",{"type":993,"tag":1030,"props":1797,"children":1799},{"className":1798},[],[1800],{"type":998,"value":1801},"case \"a\" | \"b\":",{"type":998,"value":1768},{"type":993,"tag":1290,"props":1804,"children":1805},{},[1806,1811,1813,1819],{"type":993,"tag":1007,"props":1807,"children":1808},{},[1809],{"type":998,"value":1810},"Guards",{"type":998,"value":1812},": Additional conditions (",{"type":993,"tag":1030,"props":1814,"children":1816},{"className":1815},[],[1817],{"type":998,"value":1818},"case x if x > 0:",{"type":998,"value":1768},{"type":993,"tag":1001,"props":1821,"children":1822},{},[1823],{"type":993,"tag":1007,"props":1824,"children":1825},{},[1826],{"type":998,"value":1827},"Type Matching Benefits:",{"type":993,"tag":1286,"props":1829,"children":1830},{},[1831,1836,1841,1846],{"type":993,"tag":1290,"props":1832,"children":1833},{},[1834],{"type":998,"value":1835},"Combines type checking with value extraction",{"type":993,"tag":1290,"props":1837,"children":1838},{},[1839],{"type":998,"value":1840},"Enables robust input validation",{"type":993,"tag":1290,"props":1842,"children":1843},{},[1844],{"type":998,"value":1845},"Supports polymorphic data handling",{"type":993,"tag":1290,"props":1847,"children":1848},{},[1849],{"type":998,"value":1850},"Reduces type-checking boilerplate",{"type":993,"tag":1001,"props":1852,"children":1853},{},[1854,1859],{"type":993,"tag":1007,"props":1855,"children":1856},{},[1857],{"type":998,"value":1858},"Guard Conditions:",{"type":998,"value":1860}," Add extra filtering for precise pattern matching",{"type":993,"tag":1001,"props":1862,"children":1863},{},[1864,1869],{"type":993,"tag":1007,"props":1865,"children":1866},{},[1867],{"type":998,"value":1868},"Flexibility:",{"type":998,"value":1870}," Handle diverse input types with appropriate responses",{"type":993,"tag":1001,"props":1872,"children":1873},{},[1874],{"type":998,"value":1875},"You can combine value matching with type checking to create robust input validation and processing logic.",{"type":993,"tag":1020,"props":1877,"children":1878},{},[1879],{"type":993,"tag":1024,"props":1880,"children":1882},{"className":1026,"code":1881,"language":6,"meta":8,"style":8},"# Matching values and types with guards\ndef process_input(value):\n    match value:\n        case int() if value > 0:\n            return f\"Positive integer: {value}\"\n        case int() if value \u003C 0:\n            return f\"Negative integer: {value}\"\n        case 0:\n            return \"Zero\"\n        case str() if len(value) > 0:\n            return f\"Non-empty string: {value}\"\n        case str():\n            return \"Empty string\"\n        case bool():\n            return f\"Boolean: {value}\"\n        case _:\n            return f\"Other type: {type(value).__name__}\"\n\nprint(process_input(42))        # Output: Positive integer: 42\nprint(process_input(\"hello\"))   # Output: Non-empty string: hello\nprint(process_input(True))      # Output: Boolean: True\nprint(process_input([1, 2, 3])) # Output: Other type: list\n",[1883],{"type":993,"tag":1030,"props":1884,"children":1885},{"__ignoreMap":8},[1886,1894,1911,1923,1964,2001,2037,2069,2084,2096,2138,2170,2186,2198,2214,2246,2257,2292,2299,2326,2352,2377],{"type":993,"tag":1034,"props":1887,"children":1888},{"class":1036,"line":12},[1889],{"type":993,"tag":1034,"props":1890,"children":1891},{"style":1040},[1892],{"type":998,"value":1893},"# Matching values and types with guards\n",{"type":993,"tag":1034,"props":1895,"children":1896},{"class":1036,"line":27},[1897,1901,1906],{"type":993,"tag":1034,"props":1898,"children":1899},{"style":1049},[1900],{"type":998,"value":1052},{"type":993,"tag":1034,"props":1902,"children":1903},{"style":1055},[1904],{"type":998,"value":1905}," process_input",{"type":993,"tag":1034,"props":1907,"children":1908},{"style":1061},[1909],{"type":998,"value":1910},"(value):\n",{"type":993,"tag":1034,"props":1912,"children":1913},{"class":1036,"line":36},[1914,1918],{"type":993,"tag":1034,"props":1915,"children":1916},{"style":1049},[1917],{"type":998,"value":1072},{"type":993,"tag":1034,"props":1919,"children":1920},{"style":1061},[1921],{"type":998,"value":1922}," value:\n",{"type":993,"tag":1034,"props":1924,"children":1925},{"class":1036,"line":45},[1926,1930,1935,1940,1945,1950,1955,1960],{"type":993,"tag":1034,"props":1927,"children":1928},{"style":1049},[1929],{"type":998,"value":1085},{"type":993,"tag":1034,"props":1931,"children":1932},{"style":1208},[1933],{"type":998,"value":1934}," int",{"type":993,"tag":1034,"props":1936,"children":1937},{"style":1061},[1938],{"type":998,"value":1939},"() ",{"type":993,"tag":1034,"props":1941,"children":1942},{"style":1049},[1943],{"type":998,"value":1944},"if",{"type":993,"tag":1034,"props":1946,"children":1947},{"style":1061},[1948],{"type":998,"value":1949}," value ",{"type":993,"tag":1034,"props":1951,"children":1952},{"style":1049},[1953],{"type":998,"value":1954},">",{"type":993,"tag":1034,"props":1956,"children":1957},{"style":1208},[1958],{"type":998,"value":1959}," 0",{"type":993,"tag":1034,"props":1961,"children":1962},{"style":1061},[1963],{"type":998,"value":1096},{"type":993,"tag":1034,"props":1965,"children":1966},{"class":1036,"line":54},[1967,1971,1976,1981,1986,1991,1996],{"type":993,"tag":1034,"props":1968,"children":1969},{"style":1049},[1970],{"type":998,"value":1104},{"type":993,"tag":1034,"props":1972,"children":1973},{"style":1049},[1974],{"type":998,"value":1975}," f",{"type":993,"tag":1034,"props":1977,"children":1978},{"style":1088},[1979],{"type":998,"value":1980},"\"Positive integer: ",{"type":993,"tag":1034,"props":1982,"children":1983},{"style":1208},[1984],{"type":998,"value":1985},"{",{"type":993,"tag":1034,"props":1987,"children":1988},{"style":1061},[1989],{"type":998,"value":1990},"value",{"type":993,"tag":1034,"props":1992,"children":1993},{"style":1208},[1994],{"type":998,"value":1995},"}",{"type":993,"tag":1034,"props":1997,"children":1998},{"style":1088},[1999],{"type":998,"value":2000},"\"\n",{"type":993,"tag":1034,"props":2002,"children":2003},{"class":1036,"line":63},[2004,2008,2012,2016,2020,2024,2029,2033],{"type":993,"tag":1034,"props":2005,"children":2006},{"style":1049},[2007],{"type":998,"value":1085},{"type":993,"tag":1034,"props":2009,"children":2010},{"style":1208},[2011],{"type":998,"value":1934},{"type":993,"tag":1034,"props":2013,"children":2014},{"style":1061},[2015],{"type":998,"value":1939},{"type":993,"tag":1034,"props":2017,"children":2018},{"style":1049},[2019],{"type":998,"value":1944},{"type":993,"tag":1034,"props":2021,"children":2022},{"style":1061},[2023],{"type":998,"value":1949},{"type":993,"tag":1034,"props":2025,"children":2026},{"style":1049},[2027],{"type":998,"value":2028},"\u003C",{"type":993,"tag":1034,"props":2030,"children":2031},{"style":1208},[2032],{"type":998,"value":1959},{"type":993,"tag":1034,"props":2034,"children":2035},{"style":1061},[2036],{"type":998,"value":1096},{"type":993,"tag":1034,"props":2038,"children":2039},{"class":1036,"line":72},[2040,2044,2048,2053,2057,2061,2065],{"type":993,"tag":1034,"props":2041,"children":2042},{"style":1049},[2043],{"type":998,"value":1104},{"type":993,"tag":1034,"props":2045,"children":2046},{"style":1049},[2047],{"type":998,"value":1975},{"type":993,"tag":1034,"props":2049,"children":2050},{"style":1088},[2051],{"type":998,"value":2052},"\"Negative integer: ",{"type":993,"tag":1034,"props":2054,"children":2055},{"style":1208},[2056],{"type":998,"value":1985},{"type":993,"tag":1034,"props":2058,"children":2059},{"style":1061},[2060],{"type":998,"value":1990},{"type":993,"tag":1034,"props":2062,"children":2063},{"style":1208},[2064],{"type":998,"value":1995},{"type":993,"tag":1034,"props":2066,"children":2067},{"style":1088},[2068],{"type":998,"value":2000},{"type":993,"tag":1034,"props":2070,"children":2071},{"class":1036,"line":81},[2072,2076,2080],{"type":993,"tag":1034,"props":2073,"children":2074},{"style":1049},[2075],{"type":998,"value":1085},{"type":993,"tag":1034,"props":2077,"children":2078},{"style":1208},[2079],{"type":998,"value":1959},{"type":993,"tag":1034,"props":2081,"children":2082},{"style":1061},[2083],{"type":998,"value":1096},{"type":993,"tag":1034,"props":2085,"children":2086},{"class":1036,"line":91},[2087,2091],{"type":993,"tag":1034,"props":2088,"children":2089},{"style":1049},[2090],{"type":998,"value":1104},{"type":993,"tag":1034,"props":2092,"children":2093},{"style":1088},[2094],{"type":998,"value":2095}," \"Zero\"\n",{"type":993,"tag":1034,"props":2097,"children":2098},{"class":1036,"line":100},[2099,2103,2108,2112,2116,2121,2126,2130,2134],{"type":993,"tag":1034,"props":2100,"children":2101},{"style":1049},[2102],{"type":998,"value":1085},{"type":993,"tag":1034,"props":2104,"children":2105},{"style":1208},[2106],{"type":998,"value":2107}," str",{"type":993,"tag":1034,"props":2109,"children":2110},{"style":1061},[2111],{"type":998,"value":1939},{"type":993,"tag":1034,"props":2113,"children":2114},{"style":1049},[2115],{"type":998,"value":1944},{"type":993,"tag":1034,"props":2117,"children":2118},{"style":1208},[2119],{"type":998,"value":2120}," len",{"type":993,"tag":1034,"props":2122,"children":2123},{"style":1061},[2124],{"type":998,"value":2125},"(value) ",{"type":993,"tag":1034,"props":2127,"children":2128},{"style":1049},[2129],{"type":998,"value":1954},{"type":993,"tag":1034,"props":2131,"children":2132},{"style":1208},[2133],{"type":998,"value":1959},{"type":993,"tag":1034,"props":2135,"children":2136},{"style":1061},[2137],{"type":998,"value":1096},{"type":993,"tag":1034,"props":2139,"children":2140},{"class":1036,"line":109},[2141,2145,2149,2154,2158,2162,2166],{"type":993,"tag":1034,"props":2142,"children":2143},{"style":1049},[2144],{"type":998,"value":1104},{"type":993,"tag":1034,"props":2146,"children":2147},{"style":1049},[2148],{"type":998,"value":1975},{"type":993,"tag":1034,"props":2150,"children":2151},{"style":1088},[2152],{"type":998,"value":2153},"\"Non-empty string: ",{"type":993,"tag":1034,"props":2155,"children":2156},{"style":1208},[2157],{"type":998,"value":1985},{"type":993,"tag":1034,"props":2159,"children":2160},{"style":1061},[2161],{"type":998,"value":1990},{"type":993,"tag":1034,"props":2163,"children":2164},{"style":1208},[2165],{"type":998,"value":1995},{"type":993,"tag":1034,"props":2167,"children":2168},{"style":1088},[2169],{"type":998,"value":2000},{"type":993,"tag":1034,"props":2171,"children":2172},{"class":1036,"line":118},[2173,2177,2181],{"type":993,"tag":1034,"props":2174,"children":2175},{"style":1049},[2176],{"type":998,"value":1085},{"type":993,"tag":1034,"props":2178,"children":2179},{"style":1208},[2180],{"type":998,"value":2107},{"type":993,"tag":1034,"props":2182,"children":2183},{"style":1061},[2184],{"type":998,"value":2185},"():\n",{"type":993,"tag":1034,"props":2187,"children":2188},{"class":1036,"line":127},[2189,2193],{"type":993,"tag":1034,"props":2190,"children":2191},{"style":1049},[2192],{"type":998,"value":1104},{"type":993,"tag":1034,"props":2194,"children":2195},{"style":1088},[2196],{"type":998,"value":2197}," \"Empty string\"\n",{"type":993,"tag":1034,"props":2199,"children":2200},{"class":1036,"line":136},[2201,2205,2210],{"type":993,"tag":1034,"props":2202,"children":2203},{"style":1049},[2204],{"type":998,"value":1085},{"type":993,"tag":1034,"props":2206,"children":2207},{"style":1208},[2208],{"type":998,"value":2209}," bool",{"type":993,"tag":1034,"props":2211,"children":2212},{"style":1061},[2213],{"type":998,"value":2185},{"type":993,"tag":1034,"props":2215,"children":2216},{"class":1036,"line":146},[2217,2221,2225,2230,2234,2238,2242],{"type":993,"tag":1034,"props":2218,"children":2219},{"style":1049},[2220],{"type":998,"value":1104},{"type":993,"tag":1034,"props":2222,"children":2223},{"style":1049},[2224],{"type":998,"value":1975},{"type":993,"tag":1034,"props":2226,"children":2227},{"style":1088},[2228],{"type":998,"value":2229},"\"Boolean: ",{"type":993,"tag":1034,"props":2231,"children":2232},{"style":1208},[2233],{"type":998,"value":1985},{"type":993,"tag":1034,"props":2235,"children":2236},{"style":1061},[2237],{"type":998,"value":1990},{"type":993,"tag":1034,"props":2239,"children":2240},{"style":1208},[2241],{"type":998,"value":1995},{"type":993,"tag":1034,"props":2243,"children":2244},{"style":1088},[2245],{"type":998,"value":2000},{"type":993,"tag":1034,"props":2247,"children":2248},{"class":1036,"line":155},[2249,2253],{"type":993,"tag":1034,"props":2250,"children":2251},{"style":1049},[2252],{"type":998,"value":1085},{"type":993,"tag":1034,"props":2254,"children":2255},{"style":1061},[2256],{"type":998,"value":1616},{"type":993,"tag":1034,"props":2258,"children":2259},{"class":1036,"line":164},[2260,2264,2268,2273,2278,2283,2288],{"type":993,"tag":1034,"props":2261,"children":2262},{"style":1049},[2263],{"type":998,"value":1104},{"type":993,"tag":1034,"props":2265,"children":2266},{"style":1049},[2267],{"type":998,"value":1975},{"type":993,"tag":1034,"props":2269,"children":2270},{"style":1088},[2271],{"type":998,"value":2272},"\"Other type: ",{"type":993,"tag":1034,"props":2274,"children":2275},{"style":1208},[2276],{"type":998,"value":2277},"{type",{"type":993,"tag":1034,"props":2279,"children":2280},{"style":1061},[2281],{"type":998,"value":2282},"(value).",{"type":993,"tag":1034,"props":2284,"children":2285},{"style":1208},[2286],{"type":998,"value":2287},"__name__}",{"type":993,"tag":1034,"props":2289,"children":2290},{"style":1088},[2291],{"type":998,"value":2000},{"type":993,"tag":1034,"props":2293,"children":2294},{"class":1036,"line":173},[2295],{"type":993,"tag":1034,"props":2296,"children":2297},{"emptyLinePlaceholder":13},[2298],{"type":998,"value":1202},{"type":993,"tag":1034,"props":2300,"children":2301},{"class":1036,"line":182},[2302,2306,2311,2316,2321],{"type":993,"tag":1034,"props":2303,"children":2304},{"style":1208},[2305],{"type":998,"value":1211},{"type":993,"tag":1034,"props":2307,"children":2308},{"style":1061},[2309],{"type":998,"value":2310},"(process_input(",{"type":993,"tag":1034,"props":2312,"children":2313},{"style":1208},[2314],{"type":998,"value":2315},"42",{"type":993,"tag":1034,"props":2317,"children":2318},{"style":1061},[2319],{"type":998,"value":2320},"))        ",{"type":993,"tag":1034,"props":2322,"children":2323},{"style":1040},[2324],{"type":998,"value":2325},"# Output: Positive integer: 42\n",{"type":993,"tag":1034,"props":2327,"children":2328},{"class":1036,"line":191},[2329,2333,2337,2342,2347],{"type":993,"tag":1034,"props":2330,"children":2331},{"style":1208},[2332],{"type":998,"value":1211},{"type":993,"tag":1034,"props":2334,"children":2335},{"style":1061},[2336],{"type":998,"value":2310},{"type":993,"tag":1034,"props":2338,"children":2339},{"style":1088},[2340],{"type":998,"value":2341},"\"hello\"",{"type":993,"tag":1034,"props":2343,"children":2344},{"style":1061},[2345],{"type":998,"value":2346},"))   ",{"type":993,"tag":1034,"props":2348,"children":2349},{"style":1040},[2350],{"type":998,"value":2351},"# Output: Non-empty string: hello\n",{"type":993,"tag":1034,"props":2353,"children":2354},{"class":1036,"line":201},[2355,2359,2363,2368,2372],{"type":993,"tag":1034,"props":2356,"children":2357},{"style":1208},[2358],{"type":998,"value":1211},{"type":993,"tag":1034,"props":2360,"children":2361},{"style":1061},[2362],{"type":998,"value":2310},{"type":993,"tag":1034,"props":2364,"children":2365},{"style":1208},[2366],{"type":998,"value":2367},"True",{"type":993,"tag":1034,"props":2369,"children":2370},{"style":1061},[2371],{"type":998,"value":1226},{"type":993,"tag":1034,"props":2373,"children":2374},{"style":1040},[2375],{"type":998,"value":2376},"# Output: Boolean: True\n",{"type":993,"tag":1034,"props":2378,"children":2379},{"class":1036,"line":210},[2380,2384,2389,2394,2399,2404,2408,2413,2418],{"type":993,"tag":1034,"props":2381,"children":2382},{"style":1208},[2383],{"type":998,"value":1211},{"type":993,"tag":1034,"props":2385,"children":2386},{"style":1061},[2387],{"type":998,"value":2388},"(process_input([",{"type":993,"tag":1034,"props":2390,"children":2391},{"style":1208},[2392],{"type":998,"value":2393},"1",{"type":993,"tag":1034,"props":2395,"children":2396},{"style":1061},[2397],{"type":998,"value":2398},", ",{"type":993,"tag":1034,"props":2400,"children":2401},{"style":1208},[2402],{"type":998,"value":2403},"2",{"type":993,"tag":1034,"props":2405,"children":2406},{"style":1061},[2407],{"type":998,"value":2398},{"type":993,"tag":1034,"props":2409,"children":2410},{"style":1208},[2411],{"type":998,"value":2412},"3",{"type":993,"tag":1034,"props":2414,"children":2415},{"style":1061},[2416],{"type":998,"value":2417},"])) ",{"type":993,"tag":1034,"props":2419,"children":2420},{"style":1040},[2421],{"type":998,"value":2422},"# Output: Other type: list\n",{"type":993,"tag":2424,"props":2425,"children":2427},"content-exercise",{":widget-view":2426,"category":6,"id":218},"true",[],{"type":993,"tag":1259,"props":2429,"children":2431},{"id":2430},"quick-pattern-matching-practice",[2432],{"type":998,"value":2433},"🎯 Quick Pattern Matching Practice",{"type":993,"tag":1001,"props":2435,"children":2436},{},[2437],{"type":998,"value":2438},"Let's practice using Python's match-case statements for pattern matching!",{"type":993,"tag":2440,"props":2441,"children":2444},"exercise",{"hint":2442,"prompt":2443},"Use match value: followed by case patterns. Don't forget the default case with _!","Practice using match-case statements to handle different values and patterns.",[2445],{"type":993,"tag":1024,"props":2446,"children":2448},{"className":1026,"code":2447,"language":6,"meta":8,"style":8},"# Pattern Matching Practice - Number handler!\n\n# Handle different numbers\nnumber = 5\n\n# TODO: Your code here: Use match-case to handle:\n# 0: \"Zero\"\n# 1: \"One\" \n# 2: \"Two\"\n# Any other number: \"Other number\"\n",[2449],{"type":993,"tag":1030,"props":2450,"children":2451},{"__ignoreMap":8},[2452,2460,2467,2475,2493,2500,2518,2526,2534,2542],{"type":993,"tag":1034,"props":2453,"children":2454},{"class":1036,"line":12},[2455],{"type":993,"tag":1034,"props":2456,"children":2457},{"style":1040},[2458],{"type":998,"value":2459},"# Pattern Matching Practice - Number handler!\n",{"type":993,"tag":1034,"props":2461,"children":2462},{"class":1036,"line":27},[2463],{"type":993,"tag":1034,"props":2464,"children":2465},{"emptyLinePlaceholder":13},[2466],{"type":998,"value":1202},{"type":993,"tag":1034,"props":2468,"children":2469},{"class":1036,"line":36},[2470],{"type":993,"tag":1034,"props":2471,"children":2472},{"style":1040},[2473],{"type":998,"value":2474},"# Handle different numbers\n",{"type":993,"tag":1034,"props":2476,"children":2477},{"class":1036,"line":45},[2478,2483,2488],{"type":993,"tag":1034,"props":2479,"children":2480},{"style":1061},[2481],{"type":998,"value":2482},"number ",{"type":993,"tag":1034,"props":2484,"children":2485},{"style":1049},[2486],{"type":998,"value":2487},"=",{"type":993,"tag":1034,"props":2489,"children":2490},{"style":1208},[2491],{"type":998,"value":2492}," 5\n",{"type":993,"tag":1034,"props":2494,"children":2495},{"class":1036,"line":54},[2496],{"type":993,"tag":1034,"props":2497,"children":2498},{"emptyLinePlaceholder":13},[2499],{"type":998,"value":1202},{"type":993,"tag":1034,"props":2501,"children":2502},{"class":1036,"line":63},[2503,2508,2513],{"type":993,"tag":1034,"props":2504,"children":2505},{"style":1040},[2506],{"type":998,"value":2507},"# ",{"type":993,"tag":1034,"props":2509,"children":2510},{"style":1049},[2511],{"type":998,"value":2512},"TODO",{"type":993,"tag":1034,"props":2514,"children":2515},{"style":1040},[2516],{"type":998,"value":2517},": Your code here: Use match-case to handle:\n",{"type":993,"tag":1034,"props":2519,"children":2520},{"class":1036,"line":72},[2521],{"type":993,"tag":1034,"props":2522,"children":2523},{"style":1040},[2524],{"type":998,"value":2525},"# 0: \"Zero\"\n",{"type":993,"tag":1034,"props":2527,"children":2528},{"class":1036,"line":81},[2529],{"type":993,"tag":1034,"props":2530,"children":2531},{"style":1040},[2532],{"type":998,"value":2533},"# 1: \"One\" \n",{"type":993,"tag":1034,"props":2535,"children":2536},{"class":1036,"line":91},[2537],{"type":993,"tag":1034,"props":2538,"children":2539},{"style":1040},[2540],{"type":998,"value":2541},"# 2: \"Two\"\n",{"type":993,"tag":1034,"props":2543,"children":2544},{"class":1036,"line":100},[2545],{"type":993,"tag":1034,"props":2546,"children":2547},{"style":1040},[2548],{"type":998,"value":2549},"# Any other number: \"Other number\"\n",{"type":993,"tag":2551,"props":2552,"children":2554},"h3",{"id":2553},"solution-and-explanation",[2555],{"type":998,"value":2556},"Solution and Explanation 💡",{"type":993,"tag":2558,"props":2559,"children":2560},"details",{},[2561,2569,2777,2785],{"type":993,"tag":2562,"props":2563,"children":2566},"summary",{"className":2564},[2565],"cursor-pointer",[2567],{"type":998,"value":2568},"Click to see the complete solution",{"type":993,"tag":1020,"props":2570,"children":2571},{},[2572],{"type":993,"tag":1024,"props":2573,"children":2575},{"className":1026,"code":2574,"language":6,"meta":8,"style":8},"# Pattern Matching Practice - Simple solution\n\n# Handle different numbers\nnumber = 5\n\nmatch number:\n    case 0:\n        print(\"Zero\")\n    case 1:\n        print(\"One\")\n    case 2:\n        print(\"Two\")\n    case _:\n        print(\"Other number\")\n",[2576],{"type":993,"tag":1030,"props":2577,"children":2578},{"__ignoreMap":8},[2579,2587,2594,2601,2616,2623,2635,2651,2674,2690,2710,2726,2746,2757],{"type":993,"tag":1034,"props":2580,"children":2581},{"class":1036,"line":12},[2582],{"type":993,"tag":1034,"props":2583,"children":2584},{"style":1040},[2585],{"type":998,"value":2586},"# Pattern Matching Practice - Simple solution\n",{"type":993,"tag":1034,"props":2588,"children":2589},{"class":1036,"line":27},[2590],{"type":993,"tag":1034,"props":2591,"children":2592},{"emptyLinePlaceholder":13},[2593],{"type":998,"value":1202},{"type":993,"tag":1034,"props":2595,"children":2596},{"class":1036,"line":36},[2597],{"type":993,"tag":1034,"props":2598,"children":2599},{"style":1040},[2600],{"type":998,"value":2474},{"type":993,"tag":1034,"props":2602,"children":2603},{"class":1036,"line":45},[2604,2608,2612],{"type":993,"tag":1034,"props":2605,"children":2606},{"style":1061},[2607],{"type":998,"value":2482},{"type":993,"tag":1034,"props":2609,"children":2610},{"style":1049},[2611],{"type":998,"value":2487},{"type":993,"tag":1034,"props":2613,"children":2614},{"style":1208},[2615],{"type":998,"value":2492},{"type":993,"tag":1034,"props":2617,"children":2618},{"class":1036,"line":54},[2619],{"type":993,"tag":1034,"props":2620,"children":2621},{"emptyLinePlaceholder":13},[2622],{"type":998,"value":1202},{"type":993,"tag":1034,"props":2624,"children":2625},{"class":1036,"line":63},[2626,2630],{"type":993,"tag":1034,"props":2627,"children":2628},{"style":1049},[2629],{"type":998,"value":1301},{"type":993,"tag":1034,"props":2631,"children":2632},{"style":1061},[2633],{"type":998,"value":2634}," number:\n",{"type":993,"tag":1034,"props":2636,"children":2637},{"class":1036,"line":72},[2638,2643,2647],{"type":993,"tag":1034,"props":2639,"children":2640},{"style":1049},[2641],{"type":998,"value":2642},"    case",{"type":993,"tag":1034,"props":2644,"children":2645},{"style":1208},[2646],{"type":998,"value":1959},{"type":993,"tag":1034,"props":2648,"children":2649},{"style":1061},[2650],{"type":998,"value":1096},{"type":993,"tag":1034,"props":2652,"children":2653},{"class":1036,"line":81},[2654,2659,2664,2669],{"type":993,"tag":1034,"props":2655,"children":2656},{"style":1208},[2657],{"type":998,"value":2658},"        print",{"type":993,"tag":1034,"props":2660,"children":2661},{"style":1061},[2662],{"type":998,"value":2663},"(",{"type":993,"tag":1034,"props":2665,"children":2666},{"style":1088},[2667],{"type":998,"value":2668},"\"Zero\"",{"type":993,"tag":1034,"props":2670,"children":2671},{"style":1061},[2672],{"type":998,"value":2673},")\n",{"type":993,"tag":1034,"props":2675,"children":2676},{"class":1036,"line":91},[2677,2681,2686],{"type":993,"tag":1034,"props":2678,"children":2679},{"style":1049},[2680],{"type":998,"value":2642},{"type":993,"tag":1034,"props":2682,"children":2683},{"style":1208},[2684],{"type":998,"value":2685}," 1",{"type":993,"tag":1034,"props":2687,"children":2688},{"style":1061},[2689],{"type":998,"value":1096},{"type":993,"tag":1034,"props":2691,"children":2692},{"class":1036,"line":100},[2693,2697,2701,2706],{"type":993,"tag":1034,"props":2694,"children":2695},{"style":1208},[2696],{"type":998,"value":2658},{"type":993,"tag":1034,"props":2698,"children":2699},{"style":1061},[2700],{"type":998,"value":2663},{"type":993,"tag":1034,"props":2702,"children":2703},{"style":1088},[2704],{"type":998,"value":2705},"\"One\"",{"type":993,"tag":1034,"props":2707,"children":2708},{"style":1061},[2709],{"type":998,"value":2673},{"type":993,"tag":1034,"props":2711,"children":2712},{"class":1036,"line":109},[2713,2717,2722],{"type":993,"tag":1034,"props":2714,"children":2715},{"style":1049},[2716],{"type":998,"value":2642},{"type":993,"tag":1034,"props":2718,"children":2719},{"style":1208},[2720],{"type":998,"value":2721}," 2",{"type":993,"tag":1034,"props":2723,"children":2724},{"style":1061},[2725],{"type":998,"value":1096},{"type":993,"tag":1034,"props":2727,"children":2728},{"class":1036,"line":118},[2729,2733,2737,2742],{"type":993,"tag":1034,"props":2730,"children":2731},{"style":1208},[2732],{"type":998,"value":2658},{"type":993,"tag":1034,"props":2734,"children":2735},{"style":1061},[2736],{"type":998,"value":2663},{"type":993,"tag":1034,"props":2738,"children":2739},{"style":1088},[2740],{"type":998,"value":2741},"\"Two\"",{"type":993,"tag":1034,"props":2743,"children":2744},{"style":1061},[2745],{"type":998,"value":2673},{"type":993,"tag":1034,"props":2747,"children":2748},{"class":1036,"line":127},[2749,2753],{"type":993,"tag":1034,"props":2750,"children":2751},{"style":1049},[2752],{"type":998,"value":2642},{"type":993,"tag":1034,"props":2754,"children":2755},{"style":1061},[2756],{"type":998,"value":1616},{"type":993,"tag":1034,"props":2758,"children":2759},{"class":1036,"line":136},[2760,2764,2768,2773],{"type":993,"tag":1034,"props":2761,"children":2762},{"style":1208},[2763],{"type":998,"value":2658},{"type":993,"tag":1034,"props":2765,"children":2766},{"style":1061},[2767],{"type":998,"value":2663},{"type":993,"tag":1034,"props":2769,"children":2770},{"style":1088},[2771],{"type":998,"value":2772},"\"Other number\"",{"type":993,"tag":1034,"props":2774,"children":2775},{"style":1061},[2776],{"type":998,"value":2673},{"type":993,"tag":1001,"props":2778,"children":2779},{},[2780],{"type":993,"tag":1007,"props":2781,"children":2782},{},[2783],{"type":998,"value":2784},"Key Learning Points:",{"type":993,"tag":1286,"props":2786,"children":2787},{},[2788,2800,2811,2822],{"type":993,"tag":1290,"props":2789,"children":2790},{},[2791,2793,2798],{"type":998,"value":2792},"📌 ",{"type":993,"tag":1007,"props":2794,"children":2795},{},[2796],{"type":998,"value":2797},"match statement",{"type":998,"value":2799},": Checks a value against multiple patterns",{"type":993,"tag":1290,"props":2801,"children":2802},{},[2803,2804,2809],{"type":998,"value":2792},{"type":993,"tag":1007,"props":2805,"children":2806},{},[2807],{"type":998,"value":2808},"case patterns",{"type":998,"value":2810},": Each case handles a specific pattern",{"type":993,"tag":1290,"props":2812,"children":2813},{},[2814,2815,2820],{"type":998,"value":2792},{"type":993,"tag":1007,"props":2816,"children":2817},{},[2818],{"type":998,"value":2819},"Default case (_)",{"type":998,"value":2821},": Catches any unmatched values",{"type":993,"tag":1290,"props":2823,"children":2824},{},[2825,2826,2831],{"type":998,"value":2792},{"type":993,"tag":1007,"props":2827,"children":2828},{},[2829],{"type":998,"value":2830},"Python 3.10+",{"type":998,"value":2832},": Pattern matching requires newer Python versions",{"type":993,"tag":1259,"props":2834,"children":2836},{"id":2835},"️-matching-data-structures",[2837],{"type":998,"value":2838},"🏗️ Matching Data Structures",{"type":993,"tag":1001,"props":2840,"children":2841},{},[2842],{"type":998,"value":2843},"One of pattern matching's most powerful features is the ability to match and destructure complex data structures like lists, tuples, and dictionaries. This makes it excellent for processing structured data.",{"type":993,"tag":1271,"props":2845,"children":2849},{"emoji":2846,"title":2847,"type":2848},"🏗️","Data Structure Pattern Matching","warning",[2850,2858,2915,2923,2946,2956],{"type":993,"tag":1001,"props":2851,"children":2852},{},[2853],{"type":993,"tag":1007,"props":2854,"children":2855},{},[2856],{"type":998,"value":2857},"Destructuring Capabilities:",{"type":993,"tag":1286,"props":2859,"children":2860},{},[2861,2878,2895,2905],{"type":993,"tag":1290,"props":2862,"children":2863},{},[2864,2869,2871,2877],{"type":993,"tag":1007,"props":2865,"children":2866},{},[2867],{"type":998,"value":2868},"Sequence Patterns",{"type":998,"value":2870},": Lists and tuples (",{"type":993,"tag":1030,"props":2872,"children":2874},{"className":2873},[],[2875],{"type":998,"value":2876},"case [x, y]:",{"type":998,"value":1768},{"type":993,"tag":1290,"props":2879,"children":2880},{},[2881,2886,2888,2894],{"type":993,"tag":1007,"props":2882,"children":2883},{},[2884],{"type":998,"value":2885},"Mapping Patterns",{"type":998,"value":2887},": Dictionaries (",{"type":993,"tag":1030,"props":2889,"children":2891},{"className":2890},[],[2892],{"type":998,"value":2893},"case {\"key\": value}:",{"type":998,"value":1768},{"type":993,"tag":1290,"props":2896,"children":2897},{},[2898,2903],{"type":993,"tag":1007,"props":2899,"children":2900},{},[2901],{"type":998,"value":2902},"Nested Patterns",{"type":998,"value":2904},": Complex nested structures",{"type":993,"tag":1290,"props":2906,"children":2907},{},[2908,2913],{"type":993,"tag":1007,"props":2909,"children":2910},{},[2911],{"type":998,"value":2912},"Variable Capture",{"type":998,"value":2914},": Extract values during matching",{"type":993,"tag":1001,"props":2916,"children":2917},{},[2918],{"type":993,"tag":1007,"props":2919,"children":2920},{},[2921],{"type":998,"value":2922},"Advantages:",{"type":993,"tag":1286,"props":2924,"children":2925},{},[2926,2931,2936,2941],{"type":993,"tag":1290,"props":2927,"children":2928},{},[2929],{"type":998,"value":2930},"Combines validation and data extraction",{"type":993,"tag":1290,"props":2932,"children":2933},{},[2934],{"type":998,"value":2935},"Handles variable-length sequences",{"type":993,"tag":1290,"props":2937,"children":2938},{},[2939],{"type":998,"value":2940},"Supports partial matching of structures",{"type":993,"tag":1290,"props":2942,"children":2943},{},[2944],{"type":998,"value":2945},"Enables elegant data processing pipelines",{"type":993,"tag":1001,"props":2947,"children":2948},{},[2949,2954],{"type":993,"tag":1007,"props":2950,"children":2951},{},[2952],{"type":998,"value":2953},"Use Cases:",{"type":998,"value":2955}," JSON processing, API responses, configuration parsing",{"type":993,"tag":1001,"props":2957,"children":2958},{},[2959,2964],{"type":993,"tag":1007,"props":2960,"children":2961},{},[2962],{"type":998,"value":2963},"Power:",{"type":998,"value":2965}," Single operation for structure validation and value extraction",{"type":993,"tag":1001,"props":2967,"children":2968},{},[2969],{"type":998,"value":2970},"Pattern matching can extract values from data structures while simultaneously checking their structure, combining validation and data extraction in a single operation.",{"type":993,"tag":1020,"props":2972,"children":2973},{},[2974],{"type":993,"tag":1024,"props":2975,"children":2977},{"className":1026,"code":2976,"language":6,"meta":8,"style":8},"# Matching data structures\ndef analyze_coordinates(point):\n    match point:\n        case [0, 0]:\n            return \"Origin point\"\n        case [x, 0]:\n            return f\"On X-axis at {x}\"\n        case [0, y]:\n            return f\"On Y-axis at {y}\"\n        case [x, y] if x == y:\n            return f\"Diagonal point at ({x}, {y})\"\n        case [x, y]:\n            return f\"Point at ({x}, {y})\"\n        case _:\n            return \"Invalid coordinates\"\n\nprint(analyze_coordinates([0, 0]))    # Output: Origin point\nprint(analyze_coordinates([5, 0]))    # Output: On X-axis at 5\nprint(analyze_coordinates([3, 3]))    # Output: Diagonal point at (3, 3)\nprint(analyze_coordinates([2, 7]))    # Output: Point at (2, 7)\n",[2978],{"type":993,"tag":1030,"props":2979,"children":2980},{"__ignoreMap":8},[2981,2989,3006,3018,3048,3060,3080,3113,3133,3166,3197,3246,3258,3306,3317,3329,3336,3370,3403,3435],{"type":993,"tag":1034,"props":2982,"children":2983},{"class":1036,"line":12},[2984],{"type":993,"tag":1034,"props":2985,"children":2986},{"style":1040},[2987],{"type":998,"value":2988},"# Matching data structures\n",{"type":993,"tag":1034,"props":2990,"children":2991},{"class":1036,"line":27},[2992,2996,3001],{"type":993,"tag":1034,"props":2993,"children":2994},{"style":1049},[2995],{"type":998,"value":1052},{"type":993,"tag":1034,"props":2997,"children":2998},{"style":1055},[2999],{"type":998,"value":3000}," analyze_coordinates",{"type":993,"tag":1034,"props":3002,"children":3003},{"style":1061},[3004],{"type":998,"value":3005},"(point):\n",{"type":993,"tag":1034,"props":3007,"children":3008},{"class":1036,"line":36},[3009,3013],{"type":993,"tag":1034,"props":3010,"children":3011},{"style":1049},[3012],{"type":998,"value":1072},{"type":993,"tag":1034,"props":3014,"children":3015},{"style":1061},[3016],{"type":998,"value":3017}," point:\n",{"type":993,"tag":1034,"props":3019,"children":3020},{"class":1036,"line":45},[3021,3025,3030,3035,3039,3043],{"type":993,"tag":1034,"props":3022,"children":3023},{"style":1049},[3024],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3026,"children":3027},{"style":1061},[3028],{"type":998,"value":3029}," [",{"type":993,"tag":1034,"props":3031,"children":3032},{"style":1208},[3033],{"type":998,"value":3034},"0",{"type":993,"tag":1034,"props":3036,"children":3037},{"style":1061},[3038],{"type":998,"value":2398},{"type":993,"tag":1034,"props":3040,"children":3041},{"style":1208},[3042],{"type":998,"value":3034},{"type":993,"tag":1034,"props":3044,"children":3045},{"style":1061},[3046],{"type":998,"value":3047},"]:\n",{"type":993,"tag":1034,"props":3049,"children":3050},{"class":1036,"line":54},[3051,3055],{"type":993,"tag":1034,"props":3052,"children":3053},{"style":1049},[3054],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3056,"children":3057},{"style":1088},[3058],{"type":998,"value":3059}," \"Origin point\"\n",{"type":993,"tag":1034,"props":3061,"children":3062},{"class":1036,"line":63},[3063,3067,3072,3076],{"type":993,"tag":1034,"props":3064,"children":3065},{"style":1049},[3066],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3068,"children":3069},{"style":1061},[3070],{"type":998,"value":3071}," [x, ",{"type":993,"tag":1034,"props":3073,"children":3074},{"style":1208},[3075],{"type":998,"value":3034},{"type":993,"tag":1034,"props":3077,"children":3078},{"style":1061},[3079],{"type":998,"value":3047},{"type":993,"tag":1034,"props":3081,"children":3082},{"class":1036,"line":72},[3083,3087,3091,3096,3100,3105,3109],{"type":993,"tag":1034,"props":3084,"children":3085},{"style":1049},[3086],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3088,"children":3089},{"style":1049},[3090],{"type":998,"value":1975},{"type":993,"tag":1034,"props":3092,"children":3093},{"style":1088},[3094],{"type":998,"value":3095},"\"On X-axis at ",{"type":993,"tag":1034,"props":3097,"children":3098},{"style":1208},[3099],{"type":998,"value":1985},{"type":993,"tag":1034,"props":3101,"children":3102},{"style":1061},[3103],{"type":998,"value":3104},"x",{"type":993,"tag":1034,"props":3106,"children":3107},{"style":1208},[3108],{"type":998,"value":1995},{"type":993,"tag":1034,"props":3110,"children":3111},{"style":1088},[3112],{"type":998,"value":2000},{"type":993,"tag":1034,"props":3114,"children":3115},{"class":1036,"line":81},[3116,3120,3124,3128],{"type":993,"tag":1034,"props":3117,"children":3118},{"style":1049},[3119],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3121,"children":3122},{"style":1061},[3123],{"type":998,"value":3029},{"type":993,"tag":1034,"props":3125,"children":3126},{"style":1208},[3127],{"type":998,"value":3034},{"type":993,"tag":1034,"props":3129,"children":3130},{"style":1061},[3131],{"type":998,"value":3132},", y]:\n",{"type":993,"tag":1034,"props":3134,"children":3135},{"class":1036,"line":91},[3136,3140,3144,3149,3153,3158,3162],{"type":993,"tag":1034,"props":3137,"children":3138},{"style":1049},[3139],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3141,"children":3142},{"style":1049},[3143],{"type":998,"value":1975},{"type":993,"tag":1034,"props":3145,"children":3146},{"style":1088},[3147],{"type":998,"value":3148},"\"On Y-axis at ",{"type":993,"tag":1034,"props":3150,"children":3151},{"style":1208},[3152],{"type":998,"value":1985},{"type":993,"tag":1034,"props":3154,"children":3155},{"style":1061},[3156],{"type":998,"value":3157},"y",{"type":993,"tag":1034,"props":3159,"children":3160},{"style":1208},[3161],{"type":998,"value":1995},{"type":993,"tag":1034,"props":3163,"children":3164},{"style":1088},[3165],{"type":998,"value":2000},{"type":993,"tag":1034,"props":3167,"children":3168},{"class":1036,"line":100},[3169,3173,3178,3182,3187,3192],{"type":993,"tag":1034,"props":3170,"children":3171},{"style":1049},[3172],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3174,"children":3175},{"style":1061},[3176],{"type":998,"value":3177}," [x, y] ",{"type":993,"tag":1034,"props":3179,"children":3180},{"style":1049},[3181],{"type":998,"value":1944},{"type":993,"tag":1034,"props":3183,"children":3184},{"style":1061},[3185],{"type":998,"value":3186}," x ",{"type":993,"tag":1034,"props":3188,"children":3189},{"style":1049},[3190],{"type":998,"value":3191},"==",{"type":993,"tag":1034,"props":3193,"children":3194},{"style":1061},[3195],{"type":998,"value":3196}," y:\n",{"type":993,"tag":1034,"props":3198,"children":3199},{"class":1036,"line":109},[3200,3204,3208,3213,3217,3221,3225,3229,3233,3237,3241],{"type":993,"tag":1034,"props":3201,"children":3202},{"style":1049},[3203],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3205,"children":3206},{"style":1049},[3207],{"type":998,"value":1975},{"type":993,"tag":1034,"props":3209,"children":3210},{"style":1088},[3211],{"type":998,"value":3212},"\"Diagonal point at (",{"type":993,"tag":1034,"props":3214,"children":3215},{"style":1208},[3216],{"type":998,"value":1985},{"type":993,"tag":1034,"props":3218,"children":3219},{"style":1061},[3220],{"type":998,"value":3104},{"type":993,"tag":1034,"props":3222,"children":3223},{"style":1208},[3224],{"type":998,"value":1995},{"type":993,"tag":1034,"props":3226,"children":3227},{"style":1088},[3228],{"type":998,"value":2398},{"type":993,"tag":1034,"props":3230,"children":3231},{"style":1208},[3232],{"type":998,"value":1985},{"type":993,"tag":1034,"props":3234,"children":3235},{"style":1061},[3236],{"type":998,"value":3157},{"type":993,"tag":1034,"props":3238,"children":3239},{"style":1208},[3240],{"type":998,"value":1995},{"type":993,"tag":1034,"props":3242,"children":3243},{"style":1088},[3244],{"type":998,"value":3245},")\"\n",{"type":993,"tag":1034,"props":3247,"children":3248},{"class":1036,"line":118},[3249,3253],{"type":993,"tag":1034,"props":3250,"children":3251},{"style":1049},[3252],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3254,"children":3255},{"style":1061},[3256],{"type":998,"value":3257}," [x, y]:\n",{"type":993,"tag":1034,"props":3259,"children":3260},{"class":1036,"line":127},[3261,3265,3269,3274,3278,3282,3286,3290,3294,3298,3302],{"type":993,"tag":1034,"props":3262,"children":3263},{"style":1049},[3264],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3266,"children":3267},{"style":1049},[3268],{"type":998,"value":1975},{"type":993,"tag":1034,"props":3270,"children":3271},{"style":1088},[3272],{"type":998,"value":3273},"\"Point at (",{"type":993,"tag":1034,"props":3275,"children":3276},{"style":1208},[3277],{"type":998,"value":1985},{"type":993,"tag":1034,"props":3279,"children":3280},{"style":1061},[3281],{"type":998,"value":3104},{"type":993,"tag":1034,"props":3283,"children":3284},{"style":1208},[3285],{"type":998,"value":1995},{"type":993,"tag":1034,"props":3287,"children":3288},{"style":1088},[3289],{"type":998,"value":2398},{"type":993,"tag":1034,"props":3291,"children":3292},{"style":1208},[3293],{"type":998,"value":1985},{"type":993,"tag":1034,"props":3295,"children":3296},{"style":1061},[3297],{"type":998,"value":3157},{"type":993,"tag":1034,"props":3299,"children":3300},{"style":1208},[3301],{"type":998,"value":1995},{"type":993,"tag":1034,"props":3303,"children":3304},{"style":1088},[3305],{"type":998,"value":3245},{"type":993,"tag":1034,"props":3307,"children":3308},{"class":1036,"line":136},[3309,3313],{"type":993,"tag":1034,"props":3310,"children":3311},{"style":1049},[3312],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3314,"children":3315},{"style":1061},[3316],{"type":998,"value":1616},{"type":993,"tag":1034,"props":3318,"children":3319},{"class":1036,"line":146},[3320,3324],{"type":993,"tag":1034,"props":3321,"children":3322},{"style":1049},[3323],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3325,"children":3326},{"style":1088},[3327],{"type":998,"value":3328}," \"Invalid coordinates\"\n",{"type":993,"tag":1034,"props":3330,"children":3331},{"class":1036,"line":155},[3332],{"type":993,"tag":1034,"props":3333,"children":3334},{"emptyLinePlaceholder":13},[3335],{"type":998,"value":1202},{"type":993,"tag":1034,"props":3337,"children":3338},{"class":1036,"line":164},[3339,3343,3348,3352,3356,3360,3365],{"type":993,"tag":1034,"props":3340,"children":3341},{"style":1208},[3342],{"type":998,"value":1211},{"type":993,"tag":1034,"props":3344,"children":3345},{"style":1061},[3346],{"type":998,"value":3347},"(analyze_coordinates([",{"type":993,"tag":1034,"props":3349,"children":3350},{"style":1208},[3351],{"type":998,"value":3034},{"type":993,"tag":1034,"props":3353,"children":3354},{"style":1061},[3355],{"type":998,"value":2398},{"type":993,"tag":1034,"props":3357,"children":3358},{"style":1208},[3359],{"type":998,"value":3034},{"type":993,"tag":1034,"props":3361,"children":3362},{"style":1061},[3363],{"type":998,"value":3364},"]))    ",{"type":993,"tag":1034,"props":3366,"children":3367},{"style":1040},[3368],{"type":998,"value":3369},"# Output: Origin point\n",{"type":993,"tag":1034,"props":3371,"children":3372},{"class":1036,"line":173},[3373,3377,3381,3386,3390,3394,3398],{"type":993,"tag":1034,"props":3374,"children":3375},{"style":1208},[3376],{"type":998,"value":1211},{"type":993,"tag":1034,"props":3378,"children":3379},{"style":1061},[3380],{"type":998,"value":3347},{"type":993,"tag":1034,"props":3382,"children":3383},{"style":1208},[3384],{"type":998,"value":3385},"5",{"type":993,"tag":1034,"props":3387,"children":3388},{"style":1061},[3389],{"type":998,"value":2398},{"type":993,"tag":1034,"props":3391,"children":3392},{"style":1208},[3393],{"type":998,"value":3034},{"type":993,"tag":1034,"props":3395,"children":3396},{"style":1061},[3397],{"type":998,"value":3364},{"type":993,"tag":1034,"props":3399,"children":3400},{"style":1040},[3401],{"type":998,"value":3402},"# Output: On X-axis at 5\n",{"type":993,"tag":1034,"props":3404,"children":3405},{"class":1036,"line":182},[3406,3410,3414,3418,3422,3426,3430],{"type":993,"tag":1034,"props":3407,"children":3408},{"style":1208},[3409],{"type":998,"value":1211},{"type":993,"tag":1034,"props":3411,"children":3412},{"style":1061},[3413],{"type":998,"value":3347},{"type":993,"tag":1034,"props":3415,"children":3416},{"style":1208},[3417],{"type":998,"value":2412},{"type":993,"tag":1034,"props":3419,"children":3420},{"style":1061},[3421],{"type":998,"value":2398},{"type":993,"tag":1034,"props":3423,"children":3424},{"style":1208},[3425],{"type":998,"value":2412},{"type":993,"tag":1034,"props":3427,"children":3428},{"style":1061},[3429],{"type":998,"value":3364},{"type":993,"tag":1034,"props":3431,"children":3432},{"style":1040},[3433],{"type":998,"value":3434},"# Output: Diagonal point at (3, 3)\n",{"type":993,"tag":1034,"props":3436,"children":3437},{"class":1036,"line":191},[3438,3442,3446,3450,3454,3459,3463],{"type":993,"tag":1034,"props":3439,"children":3440},{"style":1208},[3441],{"type":998,"value":1211},{"type":993,"tag":1034,"props":3443,"children":3444},{"style":1061},[3445],{"type":998,"value":3347},{"type":993,"tag":1034,"props":3447,"children":3448},{"style":1208},[3449],{"type":998,"value":2403},{"type":993,"tag":1034,"props":3451,"children":3452},{"style":1061},[3453],{"type":998,"value":2398},{"type":993,"tag":1034,"props":3455,"children":3456},{"style":1208},[3457],{"type":998,"value":3458},"7",{"type":993,"tag":1034,"props":3460,"children":3461},{"style":1061},[3462],{"type":998,"value":3364},{"type":993,"tag":1034,"props":3464,"children":3465},{"style":1040},[3466],{"type":998,"value":3467},"# Output: Point at (2, 7)\n",{"type":993,"tag":1259,"props":3469,"children":3471},{"id":3470},"pattern-matching-vs-if-elif",[3472],{"type":998,"value":3473},"🔄 Pattern Matching vs If-Elif",{"type":993,"tag":1001,"props":3475,"children":3476},{},[3477,3479,3486],{"type":998,"value":3478},"Understanding when to use pattern matching versus traditional ",{"type":993,"tag":1007,"props":3480,"children":3481},{},[3482],{"type":993,"tag":1435,"props":3483,"children":3484},{"href":206},[3485],{"type":998,"value":1439},{"type":998,"value":3487}," helps you choose the right tool for each situation.",{"type":993,"tag":3489,"props":3490,"children":3491},"table",{},[3492,3515],{"type":993,"tag":3493,"props":3494,"children":3495},"thead",{},[3496],{"type":993,"tag":3497,"props":3498,"children":3499},"tr",{},[3500,3506,3510],{"type":993,"tag":3501,"props":3502,"children":3503},"th",{},[3504],{"type":998,"value":3505},"Feature",{"type":993,"tag":3501,"props":3507,"children":3508},{},[3509],{"type":998,"value":216},{"type":993,"tag":3501,"props":3511,"children":3512},{},[3513],{"type":998,"value":3514},"If-Elif Chains",{"type":993,"tag":3516,"props":3517,"children":3518},"tbody",{},[3519,3541,3570,3591,3620,3641],{"type":993,"tag":3497,"props":3520,"children":3521},{},[3522,3531,3536],{"type":993,"tag":3523,"props":3524,"children":3525},"td",{},[3526],{"type":993,"tag":1007,"props":3527,"children":3528},{},[3529],{"type":998,"value":3530},"Best for",{"type":993,"tag":3523,"props":3532,"children":3533},{},[3534],{"type":998,"value":3535},"Structural data comparison",{"type":993,"tag":3523,"props":3537,"children":3538},{},[3539],{"type":998,"value":3540},"Simple condition checking",{"type":993,"tag":3497,"props":3542,"children":3543},{},[3544,3552,3561],{"type":993,"tag":3523,"props":3545,"children":3546},{},[3547],{"type":993,"tag":1007,"props":3548,"children":3549},{},[3550],{"type":998,"value":3551},"Syntax",{"type":993,"tag":3523,"props":3553,"children":3554},{},[3555],{"type":993,"tag":1030,"props":3556,"children":3558},{"className":3557},[],[3559],{"type":998,"value":3560},"match value: case pattern:",{"type":993,"tag":3523,"props":3562,"children":3563},{},[3564],{"type":993,"tag":1030,"props":3565,"children":3567},{"className":3566},[],[3568],{"type":998,"value":3569},"if condition: elif condition:",{"type":993,"tag":3497,"props":3571,"children":3572},{},[3573,3581,3586],{"type":993,"tag":3523,"props":3574,"children":3575},{},[3576],{"type":993,"tag":1007,"props":3577,"children":3578},{},[3579],{"type":998,"value":3580},"Data Extraction",{"type":993,"tag":3523,"props":3582,"children":3583},{},[3584],{"type":998,"value":3585},"Built-in destructuring",{"type":993,"tag":3523,"props":3587,"children":3588},{},[3589],{"type":998,"value":3590},"Manual extraction needed",{"type":993,"tag":3497,"props":3592,"children":3593},{},[3594,3602,3611],{"type":993,"tag":3523,"props":3595,"children":3596},{},[3597],{"type":993,"tag":1007,"props":3598,"children":3599},{},[3600],{"type":998,"value":3601},"Guard Conditions",{"type":993,"tag":3523,"props":3603,"children":3604},{},[3605],{"type":993,"tag":1030,"props":3606,"children":3608},{"className":3607},[],[3609],{"type":998,"value":3610},"case x if condition:",{"type":993,"tag":3523,"props":3612,"children":3613},{},[3614],{"type":993,"tag":1030,"props":3615,"children":3617},{"className":3616},[],[3618],{"type":998,"value":3619},"elif condition and other:",{"type":993,"tag":3497,"props":3621,"children":3622},{},[3623,3631,3636],{"type":993,"tag":3523,"props":3624,"children":3625},{},[3626],{"type":993,"tag":1007,"props":3627,"children":3628},{},[3629],{"type":998,"value":3630},"Python Version",{"type":993,"tag":3523,"props":3632,"children":3633},{},[3634],{"type":998,"value":3635},"3.10+",{"type":993,"tag":3523,"props":3637,"children":3638},{},[3639],{"type":998,"value":3640},"All versions",{"type":993,"tag":3497,"props":3642,"children":3643},{},[3644,3652,3657],{"type":993,"tag":3523,"props":3645,"children":3646},{},[3647],{"type":993,"tag":1007,"props":3648,"children":3649},{},[3650],{"type":998,"value":3651},"Readability",{"type":993,"tag":3523,"props":3653,"children":3654},{},[3655],{"type":998,"value":3656},"Clean for complex patterns",{"type":993,"tag":3523,"props":3658,"children":3659},{},[3660],{"type":998,"value":3661},"Better for simple conditions",{"type":993,"tag":1020,"props":3663,"children":3664},{},[3665],{"type":993,"tag":1024,"props":3666,"children":3668},{"className":1026,"code":3667,"language":6,"meta":8,"style":8},"# Pattern matching vs if-elif comparison\ndef grade_with_match(score):\n    match score:\n        case s if s >= 90:\n            return \"A\"\n        case s if s >= 80:\n            return \"B\"\n        case s if s >= 70:\n            return \"C\"\n        case _:\n            return \"F\"\n\ndef grade_with_elif(score):\n    if score >= 90:\n        return \"A\"\n    elif score >= 80:\n        return \"B\"\n    elif score >= 70:\n        return \"C\"\n    else:\n        return \"F\"\n\n# Both functions work the same way\nprint(grade_with_match(85))  # Output: B\nprint(grade_with_elif(85))   # Output: B\n",[3669],{"type":993,"tag":1030,"props":3670,"children":3671},{"__ignoreMap":8},[3672,3680,3697,3709,3743,3755,3787,3799,3831,3843,3854,3866,3873,3889,3914,3926,3950,3961,3984,3995,4007,4018,4025,4033,4060],{"type":993,"tag":1034,"props":3673,"children":3674},{"class":1036,"line":12},[3675],{"type":993,"tag":1034,"props":3676,"children":3677},{"style":1040},[3678],{"type":998,"value":3679},"# Pattern matching vs if-elif comparison\n",{"type":993,"tag":1034,"props":3681,"children":3682},{"class":1036,"line":27},[3683,3687,3692],{"type":993,"tag":1034,"props":3684,"children":3685},{"style":1049},[3686],{"type":998,"value":1052},{"type":993,"tag":1034,"props":3688,"children":3689},{"style":1055},[3690],{"type":998,"value":3691}," grade_with_match",{"type":993,"tag":1034,"props":3693,"children":3694},{"style":1061},[3695],{"type":998,"value":3696},"(score):\n",{"type":993,"tag":1034,"props":3698,"children":3699},{"class":1036,"line":36},[3700,3704],{"type":993,"tag":1034,"props":3701,"children":3702},{"style":1049},[3703],{"type":998,"value":1072},{"type":993,"tag":1034,"props":3705,"children":3706},{"style":1061},[3707],{"type":998,"value":3708}," score:\n",{"type":993,"tag":1034,"props":3710,"children":3711},{"class":1036,"line":45},[3712,3716,3721,3725,3729,3734,3739],{"type":993,"tag":1034,"props":3713,"children":3714},{"style":1049},[3715],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3717,"children":3718},{"style":1061},[3719],{"type":998,"value":3720}," s ",{"type":993,"tag":1034,"props":3722,"children":3723},{"style":1049},[3724],{"type":998,"value":1944},{"type":993,"tag":1034,"props":3726,"children":3727},{"style":1061},[3728],{"type":998,"value":3720},{"type":993,"tag":1034,"props":3730,"children":3731},{"style":1049},[3732],{"type":998,"value":3733},">=",{"type":993,"tag":1034,"props":3735,"children":3736},{"style":1208},[3737],{"type":998,"value":3738}," 90",{"type":993,"tag":1034,"props":3740,"children":3741},{"style":1061},[3742],{"type":998,"value":1096},{"type":993,"tag":1034,"props":3744,"children":3745},{"class":1036,"line":54},[3746,3750],{"type":993,"tag":1034,"props":3747,"children":3748},{"style":1049},[3749],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3751,"children":3752},{"style":1088},[3753],{"type":998,"value":3754}," \"A\"\n",{"type":993,"tag":1034,"props":3756,"children":3757},{"class":1036,"line":63},[3758,3762,3766,3770,3774,3778,3783],{"type":993,"tag":1034,"props":3759,"children":3760},{"style":1049},[3761],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3763,"children":3764},{"style":1061},[3765],{"type":998,"value":3720},{"type":993,"tag":1034,"props":3767,"children":3768},{"style":1049},[3769],{"type":998,"value":1944},{"type":993,"tag":1034,"props":3771,"children":3772},{"style":1061},[3773],{"type":998,"value":3720},{"type":993,"tag":1034,"props":3775,"children":3776},{"style":1049},[3777],{"type":998,"value":3733},{"type":993,"tag":1034,"props":3779,"children":3780},{"style":1208},[3781],{"type":998,"value":3782}," 80",{"type":993,"tag":1034,"props":3784,"children":3785},{"style":1061},[3786],{"type":998,"value":1096},{"type":993,"tag":1034,"props":3788,"children":3789},{"class":1036,"line":72},[3790,3794],{"type":993,"tag":1034,"props":3791,"children":3792},{"style":1049},[3793],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3795,"children":3796},{"style":1088},[3797],{"type":998,"value":3798}," \"B\"\n",{"type":993,"tag":1034,"props":3800,"children":3801},{"class":1036,"line":81},[3802,3806,3810,3814,3818,3822,3827],{"type":993,"tag":1034,"props":3803,"children":3804},{"style":1049},[3805],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3807,"children":3808},{"style":1061},[3809],{"type":998,"value":3720},{"type":993,"tag":1034,"props":3811,"children":3812},{"style":1049},[3813],{"type":998,"value":1944},{"type":993,"tag":1034,"props":3815,"children":3816},{"style":1061},[3817],{"type":998,"value":3720},{"type":993,"tag":1034,"props":3819,"children":3820},{"style":1049},[3821],{"type":998,"value":3733},{"type":993,"tag":1034,"props":3823,"children":3824},{"style":1208},[3825],{"type":998,"value":3826}," 70",{"type":993,"tag":1034,"props":3828,"children":3829},{"style":1061},[3830],{"type":998,"value":1096},{"type":993,"tag":1034,"props":3832,"children":3833},{"class":1036,"line":91},[3834,3838],{"type":993,"tag":1034,"props":3835,"children":3836},{"style":1049},[3837],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3839,"children":3840},{"style":1088},[3841],{"type":998,"value":3842}," \"C\"\n",{"type":993,"tag":1034,"props":3844,"children":3845},{"class":1036,"line":100},[3846,3850],{"type":993,"tag":1034,"props":3847,"children":3848},{"style":1049},[3849],{"type":998,"value":1085},{"type":993,"tag":1034,"props":3851,"children":3852},{"style":1061},[3853],{"type":998,"value":1616},{"type":993,"tag":1034,"props":3855,"children":3856},{"class":1036,"line":109},[3857,3861],{"type":993,"tag":1034,"props":3858,"children":3859},{"style":1049},[3860],{"type":998,"value":1104},{"type":993,"tag":1034,"props":3862,"children":3863},{"style":1088},[3864],{"type":998,"value":3865}," \"F\"\n",{"type":993,"tag":1034,"props":3867,"children":3868},{"class":1036,"line":118},[3869],{"type":993,"tag":1034,"props":3870,"children":3871},{"emptyLinePlaceholder":13},[3872],{"type":998,"value":1202},{"type":993,"tag":1034,"props":3874,"children":3875},{"class":1036,"line":127},[3876,3880,3885],{"type":993,"tag":1034,"props":3877,"children":3878},{"style":1049},[3879],{"type":998,"value":1052},{"type":993,"tag":1034,"props":3881,"children":3882},{"style":1055},[3883],{"type":998,"value":3884}," grade_with_elif",{"type":993,"tag":1034,"props":3886,"children":3887},{"style":1061},[3888],{"type":998,"value":3696},{"type":993,"tag":1034,"props":3890,"children":3891},{"class":1036,"line":136},[3892,3897,3902,3906,3910],{"type":993,"tag":1034,"props":3893,"children":3894},{"style":1049},[3895],{"type":998,"value":3896},"    if",{"type":993,"tag":1034,"props":3898,"children":3899},{"style":1061},[3900],{"type":998,"value":3901}," score ",{"type":993,"tag":1034,"props":3903,"children":3904},{"style":1049},[3905],{"type":998,"value":3733},{"type":993,"tag":1034,"props":3907,"children":3908},{"style":1208},[3909],{"type":998,"value":3738},{"type":993,"tag":1034,"props":3911,"children":3912},{"style":1061},[3913],{"type":998,"value":1096},{"type":993,"tag":1034,"props":3915,"children":3916},{"class":1036,"line":146},[3917,3922],{"type":993,"tag":1034,"props":3918,"children":3919},{"style":1049},[3920],{"type":998,"value":3921},"        return",{"type":993,"tag":1034,"props":3923,"children":3924},{"style":1088},[3925],{"type":998,"value":3754},{"type":993,"tag":1034,"props":3927,"children":3928},{"class":1036,"line":155},[3929,3934,3938,3942,3946],{"type":993,"tag":1034,"props":3930,"children":3931},{"style":1049},[3932],{"type":998,"value":3933},"    elif",{"type":993,"tag":1034,"props":3935,"children":3936},{"style":1061},[3937],{"type":998,"value":3901},{"type":993,"tag":1034,"props":3939,"children":3940},{"style":1049},[3941],{"type":998,"value":3733},{"type":993,"tag":1034,"props":3943,"children":3944},{"style":1208},[3945],{"type":998,"value":3782},{"type":993,"tag":1034,"props":3947,"children":3948},{"style":1061},[3949],{"type":998,"value":1096},{"type":993,"tag":1034,"props":3951,"children":3952},{"class":1036,"line":164},[3953,3957],{"type":993,"tag":1034,"props":3954,"children":3955},{"style":1049},[3956],{"type":998,"value":3921},{"type":993,"tag":1034,"props":3958,"children":3959},{"style":1088},[3960],{"type":998,"value":3798},{"type":993,"tag":1034,"props":3962,"children":3963},{"class":1036,"line":173},[3964,3968,3972,3976,3980],{"type":993,"tag":1034,"props":3965,"children":3966},{"style":1049},[3967],{"type":998,"value":3933},{"type":993,"tag":1034,"props":3969,"children":3970},{"style":1061},[3971],{"type":998,"value":3901},{"type":993,"tag":1034,"props":3973,"children":3974},{"style":1049},[3975],{"type":998,"value":3733},{"type":993,"tag":1034,"props":3977,"children":3978},{"style":1208},[3979],{"type":998,"value":3826},{"type":993,"tag":1034,"props":3981,"children":3982},{"style":1061},[3983],{"type":998,"value":1096},{"type":993,"tag":1034,"props":3985,"children":3986},{"class":1036,"line":182},[3987,3991],{"type":993,"tag":1034,"props":3988,"children":3989},{"style":1049},[3990],{"type":998,"value":3921},{"type":993,"tag":1034,"props":3992,"children":3993},{"style":1088},[3994],{"type":998,"value":3842},{"type":993,"tag":1034,"props":3996,"children":3997},{"class":1036,"line":191},[3998,4003],{"type":993,"tag":1034,"props":3999,"children":4000},{"style":1049},[4001],{"type":998,"value":4002},"    else",{"type":993,"tag":1034,"props":4004,"children":4005},{"style":1061},[4006],{"type":998,"value":1096},{"type":993,"tag":1034,"props":4008,"children":4009},{"class":1036,"line":201},[4010,4014],{"type":993,"tag":1034,"props":4011,"children":4012},{"style":1049},[4013],{"type":998,"value":3921},{"type":993,"tag":1034,"props":4015,"children":4016},{"style":1088},[4017],{"type":998,"value":3865},{"type":993,"tag":1034,"props":4019,"children":4020},{"class":1036,"line":210},[4021],{"type":993,"tag":1034,"props":4022,"children":4023},{"emptyLinePlaceholder":13},[4024],{"type":998,"value":1202},{"type":993,"tag":1034,"props":4026,"children":4027},{"class":1036,"line":219},[4028],{"type":993,"tag":1034,"props":4029,"children":4030},{"style":1040},[4031],{"type":998,"value":4032},"# Both functions work the same way\n",{"type":993,"tag":1034,"props":4034,"children":4035},{"class":1036,"line":228},[4036,4040,4045,4050,4055],{"type":993,"tag":1034,"props":4037,"children":4038},{"style":1208},[4039],{"type":998,"value":1211},{"type":993,"tag":1034,"props":4041,"children":4042},{"style":1061},[4043],{"type":998,"value":4044},"(grade_with_match(",{"type":993,"tag":1034,"props":4046,"children":4047},{"style":1208},[4048],{"type":998,"value":4049},"85",{"type":993,"tag":1034,"props":4051,"children":4052},{"style":1061},[4053],{"type":998,"value":4054},"))  ",{"type":993,"tag":1034,"props":4056,"children":4057},{"style":1040},[4058],{"type":998,"value":4059},"# Output: B\n",{"type":993,"tag":1034,"props":4061,"children":4062},{"class":1036,"line":238},[4063,4067,4072,4076,4080],{"type":993,"tag":1034,"props":4064,"children":4065},{"style":1208},[4066],{"type":998,"value":1211},{"type":993,"tag":1034,"props":4068,"children":4069},{"style":1061},[4070],{"type":998,"value":4071},"(grade_with_elif(",{"type":993,"tag":1034,"props":4073,"children":4074},{"style":1208},[4075],{"type":998,"value":4049},{"type":993,"tag":1034,"props":4077,"children":4078},{"style":1061},[4079],{"type":998,"value":2346},{"type":993,"tag":1034,"props":4081,"children":4082},{"style":1040},[4083],{"type":998,"value":4059},{"type":993,"tag":1259,"props":4085,"children":4087},{"id":4086},"common-pattern-matching-patterns",[4088],{"type":998,"value":4089},"📊 Common Pattern Matching Patterns",{"type":993,"tag":1001,"props":4091,"children":4092},{},[4093],{"type":998,"value":4094},"There are several patterns you'll encounter frequently when working with pattern matching in real applications.",{"type":993,"tag":3489,"props":4096,"children":4097},{},[4098,4119],{"type":993,"tag":3493,"props":4099,"children":4100},{},[4101],{"type":993,"tag":3497,"props":4102,"children":4103},{},[4104,4109,4114],{"type":993,"tag":3501,"props":4105,"children":4106},{},[4107],{"type":998,"value":4108},"Pattern",{"type":993,"tag":3501,"props":4110,"children":4111},{},[4112],{"type":998,"value":4113},"Example",{"type":993,"tag":3501,"props":4115,"children":4116},{},[4117],{"type":998,"value":4118},"Use Case",{"type":993,"tag":3516,"props":4120,"children":4121},{},[4122,4146,4171,4194,4219],{"type":993,"tag":3497,"props":4123,"children":4124},{},[4125,4132,4141],{"type":993,"tag":3523,"props":4126,"children":4127},{},[4128],{"type":993,"tag":1007,"props":4129,"children":4130},{},[4131],{"type":998,"value":1793},{"type":993,"tag":3523,"props":4133,"children":4134},{},[4135],{"type":993,"tag":1030,"props":4136,"children":4138},{"className":4137},[],[4139],{"type":998,"value":4140},"case \"yes\" | \"y\" | \"true\":",{"type":993,"tag":3523,"props":4142,"children":4143},{},[4144],{"type":998,"value":4145},"Multiple valid inputs",{"type":993,"tag":3497,"props":4147,"children":4148},{},[4149,4157,4166],{"type":993,"tag":3523,"props":4150,"children":4151},{},[4152],{"type":993,"tag":1007,"props":4153,"children":4154},{},[4155],{"type":998,"value":4156},"Wildcard",{"type":993,"tag":3523,"props":4158,"children":4159},{},[4160],{"type":993,"tag":1030,"props":4161,"children":4163},{"className":4162},[],[4164],{"type":998,"value":4165},"case _:",{"type":993,"tag":3523,"props":4167,"children":4168},{},[4169],{"type":998,"value":4170},"Default case",{"type":993,"tag":3497,"props":4172,"children":4173},{},[4174,4181,4189],{"type":993,"tag":3523,"props":4175,"children":4176},{},[4177],{"type":993,"tag":1007,"props":4178,"children":4179},{},[4180],{"type":998,"value":1810},{"type":993,"tag":3523,"props":4182,"children":4183},{},[4184],{"type":993,"tag":1030,"props":4185,"children":4187},{"className":4186},[],[4188],{"type":998,"value":1818},{"type":993,"tag":3523,"props":4190,"children":4191},{},[4192],{"type":998,"value":4193},"Additional conditions",{"type":993,"tag":3497,"props":4195,"children":4196},{},[4197,4205,4214],{"type":993,"tag":3523,"props":4198,"children":4199},{},[4200],{"type":993,"tag":1007,"props":4201,"children":4202},{},[4203],{"type":998,"value":4204},"List Destructuring",{"type":993,"tag":3523,"props":4206,"children":4207},{},[4208],{"type":993,"tag":1030,"props":4209,"children":4211},{"className":4210},[],[4212],{"type":998,"value":4213},"case [first, *rest]:",{"type":993,"tag":3523,"props":4215,"children":4216},{},[4217],{"type":998,"value":4218},"Processing sequences",{"type":993,"tag":3497,"props":4220,"children":4221},{},[4222,4230,4239],{"type":993,"tag":3523,"props":4223,"children":4224},{},[4225],{"type":993,"tag":1007,"props":4226,"children":4227},{},[4228],{"type":998,"value":4229},"Dictionary Matching",{"type":993,"tag":3523,"props":4231,"children":4232},{},[4233],{"type":993,"tag":1030,"props":4234,"children":4236},{"className":4235},[],[4237],{"type":998,"value":4238},"case {\"type\": \"user\"}:",{"type":993,"tag":3523,"props":4240,"children":4241},{},[4242],{"type":998,"value":4243},"API response handling",{"type":993,"tag":1020,"props":4245,"children":4246},{},[4247],{"type":993,"tag":1024,"props":4248,"children":4250},{"className":1026,"code":4249,"language":6,"meta":8,"style":8},"# Common pattern matching patterns\ndef handle_user_input(command):\n    match command.lower().split():\n        case [\"quit\"] | [\"exit\"] | [\"q\"]:\n            return \"Goodbye!\"\n        case [\"help\"] | [\"h\"]:\n            return \"Available commands: save, load, quit\"\n        case [\"save\", filename]:\n            return f\"Saving to {filename}\"\n        case [\"load\", filename]:\n            return f\"Loading from {filename}\"\n        case [\"count\", *numbers]:\n            total = sum(int(n) for n in numbers)\n            return f\"Sum: {total}\"\n        case _:\n            return \"Unknown command\"\n\nprint(handle_user_input(\"quit\"))              # Output: Goodbye!\nprint(handle_user_input(\"save data.txt\"))     # Output: Saving to data.txt\nprint(handle_user_input(\"count 1 2 3 4\"))     # Output: Sum: 10\n",[4251],{"type":993,"tag":1030,"props":4252,"children":4253},{"__ignoreMap":8},[4254,4262,4279,4291,4347,4359,4396,4408,4429,4462,4482,4514,4544,4595,4628,4639,4651,4658,4684,4709],{"type":993,"tag":1034,"props":4255,"children":4256},{"class":1036,"line":12},[4257],{"type":993,"tag":1034,"props":4258,"children":4259},{"style":1040},[4260],{"type":998,"value":4261},"# Common pattern matching patterns\n",{"type":993,"tag":1034,"props":4263,"children":4264},{"class":1036,"line":27},[4265,4269,4274],{"type":993,"tag":1034,"props":4266,"children":4267},{"style":1049},[4268],{"type":998,"value":1052},{"type":993,"tag":1034,"props":4270,"children":4271},{"style":1055},[4272],{"type":998,"value":4273}," handle_user_input",{"type":993,"tag":1034,"props":4275,"children":4276},{"style":1061},[4277],{"type":998,"value":4278},"(command):\n",{"type":993,"tag":1034,"props":4280,"children":4281},{"class":1036,"line":36},[4282,4286],{"type":993,"tag":1034,"props":4283,"children":4284},{"style":1049},[4285],{"type":998,"value":1072},{"type":993,"tag":1034,"props":4287,"children":4288},{"style":1061},[4289],{"type":998,"value":4290}," command.lower().split():\n",{"type":993,"tag":1034,"props":4292,"children":4293},{"class":1036,"line":45},[4294,4298,4302,4307,4312,4317,4321,4326,4330,4334,4338,4343],{"type":993,"tag":1034,"props":4295,"children":4296},{"style":1049},[4297],{"type":998,"value":1085},{"type":993,"tag":1034,"props":4299,"children":4300},{"style":1061},[4301],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4303,"children":4304},{"style":1088},[4305],{"type":998,"value":4306},"\"quit\"",{"type":993,"tag":1034,"props":4308,"children":4309},{"style":1061},[4310],{"type":998,"value":4311},"] ",{"type":993,"tag":1034,"props":4313,"children":4314},{"style":1049},[4315],{"type":998,"value":4316},"|",{"type":993,"tag":1034,"props":4318,"children":4319},{"style":1061},[4320],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4322,"children":4323},{"style":1088},[4324],{"type":998,"value":4325},"\"exit\"",{"type":993,"tag":1034,"props":4327,"children":4328},{"style":1061},[4329],{"type":998,"value":4311},{"type":993,"tag":1034,"props":4331,"children":4332},{"style":1049},[4333],{"type":998,"value":4316},{"type":993,"tag":1034,"props":4335,"children":4336},{"style":1061},[4337],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4339,"children":4340},{"style":1088},[4341],{"type":998,"value":4342},"\"q\"",{"type":993,"tag":1034,"props":4344,"children":4345},{"style":1061},[4346],{"type":998,"value":3047},{"type":993,"tag":1034,"props":4348,"children":4349},{"class":1036,"line":54},[4350,4354],{"type":993,"tag":1034,"props":4351,"children":4352},{"style":1049},[4353],{"type":998,"value":1104},{"type":993,"tag":1034,"props":4355,"children":4356},{"style":1088},[4357],{"type":998,"value":4358}," \"Goodbye!\"\n",{"type":993,"tag":1034,"props":4360,"children":4361},{"class":1036,"line":63},[4362,4366,4370,4375,4379,4383,4387,4392],{"type":993,"tag":1034,"props":4363,"children":4364},{"style":1049},[4365],{"type":998,"value":1085},{"type":993,"tag":1034,"props":4367,"children":4368},{"style":1061},[4369],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4371,"children":4372},{"style":1088},[4373],{"type":998,"value":4374},"\"help\"",{"type":993,"tag":1034,"props":4376,"children":4377},{"style":1061},[4378],{"type":998,"value":4311},{"type":993,"tag":1034,"props":4380,"children":4381},{"style":1049},[4382],{"type":998,"value":4316},{"type":993,"tag":1034,"props":4384,"children":4385},{"style":1061},[4386],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4388,"children":4389},{"style":1088},[4390],{"type":998,"value":4391},"\"h\"",{"type":993,"tag":1034,"props":4393,"children":4394},{"style":1061},[4395],{"type":998,"value":3047},{"type":993,"tag":1034,"props":4397,"children":4398},{"class":1036,"line":72},[4399,4403],{"type":993,"tag":1034,"props":4400,"children":4401},{"style":1049},[4402],{"type":998,"value":1104},{"type":993,"tag":1034,"props":4404,"children":4405},{"style":1088},[4406],{"type":998,"value":4407}," \"Available commands: save, load, quit\"\n",{"type":993,"tag":1034,"props":4409,"children":4410},{"class":1036,"line":81},[4411,4415,4419,4424],{"type":993,"tag":1034,"props":4412,"children":4413},{"style":1049},[4414],{"type":998,"value":1085},{"type":993,"tag":1034,"props":4416,"children":4417},{"style":1061},[4418],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4420,"children":4421},{"style":1088},[4422],{"type":998,"value":4423},"\"save\"",{"type":993,"tag":1034,"props":4425,"children":4426},{"style":1061},[4427],{"type":998,"value":4428},", filename]:\n",{"type":993,"tag":1034,"props":4430,"children":4431},{"class":1036,"line":91},[4432,4436,4440,4445,4449,4454,4458],{"type":993,"tag":1034,"props":4433,"children":4434},{"style":1049},[4435],{"type":998,"value":1104},{"type":993,"tag":1034,"props":4437,"children":4438},{"style":1049},[4439],{"type":998,"value":1975},{"type":993,"tag":1034,"props":4441,"children":4442},{"style":1088},[4443],{"type":998,"value":4444},"\"Saving to ",{"type":993,"tag":1034,"props":4446,"children":4447},{"style":1208},[4448],{"type":998,"value":1985},{"type":993,"tag":1034,"props":4450,"children":4451},{"style":1061},[4452],{"type":998,"value":4453},"filename",{"type":993,"tag":1034,"props":4455,"children":4456},{"style":1208},[4457],{"type":998,"value":1995},{"type":993,"tag":1034,"props":4459,"children":4460},{"style":1088},[4461],{"type":998,"value":2000},{"type":993,"tag":1034,"props":4463,"children":4464},{"class":1036,"line":100},[4465,4469,4473,4478],{"type":993,"tag":1034,"props":4466,"children":4467},{"style":1049},[4468],{"type":998,"value":1085},{"type":993,"tag":1034,"props":4470,"children":4471},{"style":1061},[4472],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4474,"children":4475},{"style":1088},[4476],{"type":998,"value":4477},"\"load\"",{"type":993,"tag":1034,"props":4479,"children":4480},{"style":1061},[4481],{"type":998,"value":4428},{"type":993,"tag":1034,"props":4483,"children":4484},{"class":1036,"line":109},[4485,4489,4493,4498,4502,4506,4510],{"type":993,"tag":1034,"props":4486,"children":4487},{"style":1049},[4488],{"type":998,"value":1104},{"type":993,"tag":1034,"props":4490,"children":4491},{"style":1049},[4492],{"type":998,"value":1975},{"type":993,"tag":1034,"props":4494,"children":4495},{"style":1088},[4496],{"type":998,"value":4497},"\"Loading from ",{"type":993,"tag":1034,"props":4499,"children":4500},{"style":1208},[4501],{"type":998,"value":1985},{"type":993,"tag":1034,"props":4503,"children":4504},{"style":1061},[4505],{"type":998,"value":4453},{"type":993,"tag":1034,"props":4507,"children":4508},{"style":1208},[4509],{"type":998,"value":1995},{"type":993,"tag":1034,"props":4511,"children":4512},{"style":1088},[4513],{"type":998,"value":2000},{"type":993,"tag":1034,"props":4515,"children":4516},{"class":1036,"line":118},[4517,4521,4525,4530,4534,4539],{"type":993,"tag":1034,"props":4518,"children":4519},{"style":1049},[4520],{"type":998,"value":1085},{"type":993,"tag":1034,"props":4522,"children":4523},{"style":1061},[4524],{"type":998,"value":3029},{"type":993,"tag":1034,"props":4526,"children":4527},{"style":1088},[4528],{"type":998,"value":4529},"\"count\"",{"type":993,"tag":1034,"props":4531,"children":4532},{"style":1061},[4533],{"type":998,"value":2398},{"type":993,"tag":1034,"props":4535,"children":4536},{"style":1049},[4537],{"type":998,"value":4538},"*",{"type":993,"tag":1034,"props":4540,"children":4541},{"style":1061},[4542],{"type":998,"value":4543},"numbers]:\n",{"type":993,"tag":1034,"props":4545,"children":4546},{"class":1036,"line":127},[4547,4552,4556,4561,4565,4570,4575,4580,4585,4590],{"type":993,"tag":1034,"props":4548,"children":4549},{"style":1061},[4550],{"type":998,"value":4551},"            total ",{"type":993,"tag":1034,"props":4553,"children":4554},{"style":1049},[4555],{"type":998,"value":2487},{"type":993,"tag":1034,"props":4557,"children":4558},{"style":1208},[4559],{"type":998,"value":4560}," sum",{"type":993,"tag":1034,"props":4562,"children":4563},{"style":1061},[4564],{"type":998,"value":2663},{"type":993,"tag":1034,"props":4566,"children":4567},{"style":1208},[4568],{"type":998,"value":4569},"int",{"type":993,"tag":1034,"props":4571,"children":4572},{"style":1061},[4573],{"type":998,"value":4574},"(n) ",{"type":993,"tag":1034,"props":4576,"children":4577},{"style":1049},[4578],{"type":998,"value":4579},"for",{"type":993,"tag":1034,"props":4581,"children":4582},{"style":1061},[4583],{"type":998,"value":4584}," n ",{"type":993,"tag":1034,"props":4586,"children":4587},{"style":1049},[4588],{"type":998,"value":4589},"in",{"type":993,"tag":1034,"props":4591,"children":4592},{"style":1061},[4593],{"type":998,"value":4594}," numbers)\n",{"type":993,"tag":1034,"props":4596,"children":4597},{"class":1036,"line":136},[4598,4602,4606,4611,4615,4620,4624],{"type":993,"tag":1034,"props":4599,"children":4600},{"style":1049},[4601],{"type":998,"value":1104},{"type":993,"tag":1034,"props":4603,"children":4604},{"style":1049},[4605],{"type":998,"value":1975},{"type":993,"tag":1034,"props":4607,"children":4608},{"style":1088},[4609],{"type":998,"value":4610},"\"Sum: ",{"type":993,"tag":1034,"props":4612,"children":4613},{"style":1208},[4614],{"type":998,"value":1985},{"type":993,"tag":1034,"props":4616,"children":4617},{"style":1061},[4618],{"type":998,"value":4619},"total",{"type":993,"tag":1034,"props":4621,"children":4622},{"style":1208},[4623],{"type":998,"value":1995},{"type":993,"tag":1034,"props":4625,"children":4626},{"style":1088},[4627],{"type":998,"value":2000},{"type":993,"tag":1034,"props":4629,"children":4630},{"class":1036,"line":146},[4631,4635],{"type":993,"tag":1034,"props":4632,"children":4633},{"style":1049},[4634],{"type":998,"value":1085},{"type":993,"tag":1034,"props":4636,"children":4637},{"style":1061},[4638],{"type":998,"value":1616},{"type":993,"tag":1034,"props":4640,"children":4641},{"class":1036,"line":155},[4642,4646],{"type":993,"tag":1034,"props":4643,"children":4644},{"style":1049},[4645],{"type":998,"value":1104},{"type":993,"tag":1034,"props":4647,"children":4648},{"style":1088},[4649],{"type":998,"value":4650}," \"Unknown command\"\n",{"type":993,"tag":1034,"props":4652,"children":4653},{"class":1036,"line":164},[4654],{"type":993,"tag":1034,"props":4655,"children":4656},{"emptyLinePlaceholder":13},[4657],{"type":998,"value":1202},{"type":993,"tag":1034,"props":4659,"children":4660},{"class":1036,"line":173},[4661,4665,4670,4674,4679],{"type":993,"tag":1034,"props":4662,"children":4663},{"style":1208},[4664],{"type":998,"value":1211},{"type":993,"tag":1034,"props":4666,"children":4667},{"style":1061},[4668],{"type":998,"value":4669},"(handle_user_input(",{"type":993,"tag":1034,"props":4671,"children":4672},{"style":1088},[4673],{"type":998,"value":4306},{"type":993,"tag":1034,"props":4675,"children":4676},{"style":1061},[4677],{"type":998,"value":4678},"))              ",{"type":993,"tag":1034,"props":4680,"children":4681},{"style":1040},[4682],{"type":998,"value":4683},"# Output: Goodbye!\n",{"type":993,"tag":1034,"props":4685,"children":4686},{"class":1036,"line":182},[4687,4691,4695,4700,4704],{"type":993,"tag":1034,"props":4688,"children":4689},{"style":1208},[4690],{"type":998,"value":1211},{"type":993,"tag":1034,"props":4692,"children":4693},{"style":1061},[4694],{"type":998,"value":4669},{"type":993,"tag":1034,"props":4696,"children":4697},{"style":1088},[4698],{"type":998,"value":4699},"\"save data.txt\"",{"type":993,"tag":1034,"props":4701,"children":4702},{"style":1061},[4703],{"type":998,"value":1252},{"type":993,"tag":1034,"props":4705,"children":4706},{"style":1040},[4707],{"type":998,"value":4708},"# Output: Saving to data.txt\n",{"type":993,"tag":1034,"props":4710,"children":4711},{"class":1036,"line":191},[4712,4716,4720,4725,4729],{"type":993,"tag":1034,"props":4713,"children":4714},{"style":1208},[4715],{"type":998,"value":1211},{"type":993,"tag":1034,"props":4717,"children":4718},{"style":1061},[4719],{"type":998,"value":4669},{"type":993,"tag":1034,"props":4721,"children":4722},{"style":1088},[4723],{"type":998,"value":4724},"\"count 1 2 3 4\"",{"type":993,"tag":1034,"props":4726,"children":4727},{"style":1061},[4728],{"type":998,"value":1252},{"type":993,"tag":1034,"props":4730,"children":4731},{"style":1040},[4732],{"type":998,"value":4733},"# Output: Sum: 10\n",{"type":993,"tag":1259,"props":4735,"children":4737},{"id":4736},"pattern-matching-best-practices",[4738],{"type":998,"value":4739},"✅ Pattern Matching Best Practices",{"type":993,"tag":1001,"props":4741,"children":4742},{},[4743],{"type":998,"value":4744},"Following best practices helps you write effective and maintainable pattern matching code.",{"type":993,"tag":1271,"props":4746,"children":4749},{"emoji":4747,"title":4748,"type":1738},"✅","Pattern Matching Best Practices",[4750,4758,4810,4818,4862,4870,4912],{"type":993,"tag":1001,"props":4751,"children":4752},{},[4753],{"type":993,"tag":1007,"props":4754,"children":4755},{},[4756],{"type":998,"value":4757},"Code Quality:",{"type":993,"tag":1286,"props":4759,"children":4760},{},[4761,4771,4783,4793],{"type":993,"tag":1290,"props":4762,"children":4763},{},[4764,4766],{"type":998,"value":4765},"Order patterns from ",{"type":993,"tag":1007,"props":4767,"children":4768},{},[4769],{"type":998,"value":4770},"specific to general",{"type":993,"tag":1290,"props":4772,"children":4773},{},[4774,4776,4781],{"type":998,"value":4775},"Use ",{"type":993,"tag":1007,"props":4777,"children":4778},{},[4779],{"type":998,"value":4780},"descriptive variable names",{"type":998,"value":4782}," in captures",{"type":993,"tag":1290,"props":4784,"children":4785},{},[4786,4788],{"type":998,"value":4787},"Keep patterns ",{"type":993,"tag":1007,"props":4789,"children":4790},{},[4791],{"type":998,"value":4792},"simple and readable",{"type":993,"tag":1290,"props":4794,"children":4795},{},[4796,4798,4803,4805],{"type":998,"value":4797},"Always include a ",{"type":993,"tag":1007,"props":4799,"children":4800},{},[4801],{"type":998,"value":4802},"default case",{"type":998,"value":4804}," with ",{"type":993,"tag":1030,"props":4806,"children":4808},{"className":4807},[],[4809],{"type":998,"value":1335},{"type":993,"tag":1001,"props":4811,"children":4812},{},[4813],{"type":993,"tag":1007,"props":4814,"children":4815},{},[4816],{"type":998,"value":4817},"Performance:",{"type":993,"tag":1286,"props":4819,"children":4820},{},[4821,4831,4842,4852],{"type":993,"tag":1290,"props":4822,"children":4823},{},[4824,4826],{"type":998,"value":4825},"Put ",{"type":993,"tag":1007,"props":4827,"children":4828},{},[4829],{"type":998,"value":4830},"most common patterns first",{"type":993,"tag":1290,"props":4832,"children":4833},{},[4834,4835,4840],{"type":998,"value":4775},{"type":993,"tag":1007,"props":4836,"children":4837},{},[4838],{"type":998,"value":4839},"guards sparingly",{"type":998,"value":4841}," for better performance",{"type":993,"tag":1290,"props":4843,"children":4844},{},[4845,4847],{"type":998,"value":4846},"Avoid ",{"type":993,"tag":1007,"props":4848,"children":4849},{},[4850],{"type":998,"value":4851},"deeply nested patterns",{"type":993,"tag":1290,"props":4853,"children":4854},{},[4855,4857],{"type":998,"value":4856},"Consider ",{"type":993,"tag":1007,"props":4858,"children":4859},{},[4860],{"type":998,"value":4861},"if-elif for simple conditions",{"type":993,"tag":1001,"props":4863,"children":4864},{},[4865],{"type":993,"tag":1007,"props":4866,"children":4867},{},[4868],{"type":998,"value":4869},"Maintainability:",{"type":993,"tag":1286,"props":4871,"children":4872},{},[4873,4883,4892,4902],{"type":993,"tag":1290,"props":4874,"children":4875},{},[4876,4878],{"type":998,"value":4877},"Document ",{"type":993,"tag":1007,"props":4879,"children":4880},{},[4881],{"type":998,"value":4882},"complex pattern logic",{"type":993,"tag":1290,"props":4884,"children":4885},{},[4886,4887],{"type":998,"value":4775},{"type":993,"tag":1007,"props":4888,"children":4889},{},[4890],{"type":998,"value":4891},"meaningful pattern structures",{"type":993,"tag":1290,"props":4893,"children":4894},{},[4895,4897],{"type":998,"value":4896},"Group ",{"type":993,"tag":1007,"props":4898,"children":4899},{},[4900],{"type":998,"value":4901},"related patterns together",{"type":993,"tag":1290,"props":4903,"children":4904},{},[4905,4907],{"type":998,"value":4906},"Test ",{"type":993,"tag":1007,"props":4908,"children":4909},{},[4910],{"type":998,"value":4911},"all pattern branches",{"type":993,"tag":1001,"props":4913,"children":4914},{},[4915,4920,4922],{"type":993,"tag":1007,"props":4916,"children":4917},{},[4918],{"type":998,"value":4919},"Version Compatibility:",{"type":998,"value":4921}," Remember pattern matching requires ",{"type":993,"tag":1007,"props":4923,"children":4924},{},[4925],{"type":998,"value":2830},{"type":993,"tag":1259,"props":4927,"children":4929},{"id":4928},"key-takeaways",[4930],{"type":998,"value":4931},"📚 Key Takeaways",{"type":993,"tag":1271,"props":4933,"children":4936},{"emoji":4934,"title":4935,"type":1275},"📚","Pattern Matching Essentials",[4937,4945,5018,5026,5068,5076,5119],{"type":993,"tag":1001,"props":4938,"children":4939},{},[4940],{"type":993,"tag":1007,"props":4941,"children":4942},{},[4943],{"type":998,"value":4944},"Core Concepts:",{"type":993,"tag":1286,"props":4946,"children":4947},{},[4948,4963,4973,4987,5003],{"type":993,"tag":1290,"props":4949,"children":4950},{},[4951,4956,4958],{"type":993,"tag":1007,"props":4952,"children":4953},{},[4954],{"type":998,"value":4955},"Match-case syntax",{"type":998,"value":4957},": ",{"type":993,"tag":1030,"props":4959,"children":4961},{"className":4960},[],[4962],{"type":998,"value":3560},{"type":993,"tag":1290,"props":4964,"children":4965},{},[4966,4971],{"type":993,"tag":1007,"props":4967,"children":4968},{},[4969],{"type":998,"value":4970},"Pattern types",{"type":998,"value":4972},": Literals, types, structures, guards",{"type":993,"tag":1290,"props":4974,"children":4975},{},[4976,4985],{"type":993,"tag":1007,"props":4977,"children":4978},{},[4979,4980],{"type":998,"value":1329},{"type":993,"tag":1030,"props":4981,"children":4983},{"className":4982},[],[4984],{"type":998,"value":1335},{"type":998,"value":4986},": Default case that matches anything",{"type":993,"tag":1290,"props":4988,"children":4989},{},[4990,4995,4996,5001],{"type":993,"tag":1007,"props":4991,"children":4992},{},[4993],{"type":998,"value":4994},"OR patterns",{"type":998,"value":4957},{"type":993,"tag":1030,"props":4997,"children":4999},{"className":4998},[],[5000],{"type":998,"value":1801},{"type":998,"value":5002}," for multiple options",{"type":993,"tag":1290,"props":5004,"children":5005},{},[5006,5010,5011,5016],{"type":993,"tag":1007,"props":5007,"children":5008},{},[5009],{"type":998,"value":1810},{"type":998,"value":4957},{"type":993,"tag":1030,"props":5012,"children":5014},{"className":5013},[],[5015],{"type":998,"value":3610},{"type":998,"value":5017}," for additional filtering",{"type":993,"tag":1001,"props":5019,"children":5020},{},[5021],{"type":993,"tag":1007,"props":5022,"children":5023},{},[5024],{"type":998,"value":5025},"Important Details:",{"type":993,"tag":1286,"props":5027,"children":5028},{},[5029,5038,5048,5058],{"type":993,"tag":1290,"props":5030,"children":5031},{},[5032,5036],{"type":993,"tag":1007,"props":5033,"children":5034},{},[5035],{"type":998,"value":2830},{"type":998,"value":5037}," required for pattern matching",{"type":993,"tag":1290,"props":5039,"children":5040},{},[5041,5046],{"type":993,"tag":1007,"props":5042,"children":5043},{},[5044],{"type":998,"value":5045},"Sequential evaluation",{"type":998,"value":5047},": First match wins",{"type":993,"tag":1290,"props":5049,"children":5050},{},[5051,5056],{"type":993,"tag":1007,"props":5052,"children":5053},{},[5054],{"type":998,"value":5055},"Structural matching",{"type":998,"value":5057},": Built-in data destructuring",{"type":993,"tag":1290,"props":5059,"children":5060},{},[5061,5066],{"type":993,"tag":1007,"props":5062,"children":5063},{},[5064],{"type":998,"value":5065},"Type checking",{"type":998,"value":5067},": Combines type validation with pattern matching",{"type":993,"tag":1001,"props":5069,"children":5070},{},[5071],{"type":993,"tag":1007,"props":5072,"children":5073},{},[5074],{"type":998,"value":5075},"When to Use:",{"type":993,"tag":1286,"props":5077,"children":5078},{},[5079,5089,5099,5109],{"type":993,"tag":1290,"props":5080,"children":5081},{},[5082,5087],{"type":993,"tag":1007,"props":5083,"children":5084},{},[5085],{"type":998,"value":5086},"Complex data structures",{"type":998,"value":5088}," with multiple formats",{"type":993,"tag":1290,"props":5090,"children":5091},{},[5092,5097],{"type":993,"tag":1007,"props":5093,"children":5094},{},[5095],{"type":998,"value":5096},"API response processing",{"type":998,"value":5098}," with different structures",{"type":993,"tag":1290,"props":5100,"children":5101},{},[5102,5107],{"type":993,"tag":1007,"props":5103,"children":5104},{},[5105],{"type":998,"value":5106},"Command parsing",{"type":998,"value":5108}," with various formats",{"type":993,"tag":1290,"props":5110,"children":5111},{},[5112,5117],{"type":993,"tag":1007,"props":5113,"children":5114},{},[5115],{"type":998,"value":5116},"State machine",{"type":998,"value":5118}," implementations",{"type":993,"tag":1001,"props":5120,"children":5121},{},[5122,5127,5129,5137,5139],{"type":993,"tag":1007,"props":5123,"children":5124},{},[5125],{"type":998,"value":5126},"Next Steps:",{"type":998,"value":5128}," Apply to ",{"type":993,"tag":1007,"props":5130,"children":5131},{},[5132],{"type":993,"tag":1435,"props":5133,"children":5134},{"href":234},[5135],{"type":998,"value":5136},"loop control",{"type":998,"value":5138}," and ",{"type":993,"tag":1007,"props":5140,"children":5141},{},[5142],{"type":993,"tag":1435,"props":5143,"children":5144},{"href":280},[5145],{"type":998,"value":5146},"data processing",{"type":993,"tag":1259,"props":5148,"children":5150},{"id":5149},"test-your-knowledge",[5151],{"type":998,"value":5152},"Test Your Knowledge",{"type":993,"tag":1001,"props":5154,"children":5155},{},[5156],{"type":998,"value":5157},"Test what you've learned about pattern matching in Python:",{"type":993,"tag":5159,"props":5160,"children":5164},"redirect-button",{"icon":5161,"label":5162,"url":5163},"pi pi-send","Take Quiz","/tutorial-quiz/python/pattern-matching",[],{"type":993,"tag":1259,"props":5166,"children":5168},{"id":5167},"whats-next",[5169],{"type":998,"value":5170},"🚀 What's Next?",{"type":993,"tag":1001,"props":5172,"children":5173},{},[5174],{"type":998,"value":5175},"Pattern matching is a powerful tool for handling complex decision scenarios in modern Python code. While not always necessary, it shines when dealing with structured data and complex conditional logic.",{"type":993,"tag":1001,"props":5177,"children":5178},{},[5179,5181,5189,5191,5199],{"type":998,"value":5180},"Next, you'll learn about ",{"type":993,"tag":1007,"props":5182,"children":5183},{},[5184],{"type":993,"tag":1435,"props":5185,"children":5186},{"href":224},[5187],{"type":998,"value":5188},"Repetition and Loops",{"type":998,"value":5190},", which introduces the fundamental concept of repeating code execution. Loops often use the ",{"type":993,"tag":1007,"props":5192,"children":5193},{},[5194],{"type":993,"tag":1435,"props":5195,"children":5196},{"href":187},[5197],{"type":998,"value":5198},"decision-making skills",{"type":998,"value":5200}," you've learned for controlling when to continue or stop.",{"type":993,"tag":1001,"props":5202,"children":5203},{},[5204,5206,5214,5215,5223,5225,5233],{"type":998,"value":5205},"Pattern matching works excellently with ",{"type":993,"tag":1007,"props":5207,"children":5208},{},[5209],{"type":993,"tag":1435,"props":5210,"children":5211},{"href":280},[5212],{"type":998,"value":5213},"data structures",{"type":998,"value":2398},{"type":993,"tag":1007,"props":5216,"children":5217},{},[5218],{"type":993,"tag":1435,"props":5219,"children":5220},{"href":626},[5221],{"type":998,"value":5222},"function parameters",{"type":998,"value":5224},", and ",{"type":993,"tag":1007,"props":5226,"children":5227},{},[5228],{"type":993,"tag":1435,"props":5229,"children":5230},{"href":781},[5231],{"type":998,"value":5232},"error handling",{"type":998,"value":5234}," scenarios.",{"type":993,"tag":1001,"props":5236,"children":5237},{},[5238,5240,5248,5249,5257],{"type":998,"value":5239},"Understanding pattern matching prepares you for ",{"type":993,"tag":1007,"props":5241,"children":5242},{},[5243],{"type":993,"tag":1435,"props":5244,"children":5245},{"href":763},[5246],{"type":998,"value":5247},"advanced Python features",{"type":998,"value":5138},{"type":993,"tag":1007,"props":5250,"children":5251},{},[5252],{"type":993,"tag":1435,"props":5253,"children":5254},{"href":781},[5255],{"type":998,"value":5256},"professional development practices",{"type":998,"value":5258},".",{"type":993,"tag":5260,"props":5261,"children":5262},"style",{},[5263],{"type":998,"value":5264},"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 .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":5266},[5267,5268,5269,5272,5273,5274,5275,5276,5277,5278],{"id":1261,"depth":27,"text":1264},{"id":1715,"depth":27,"text":1718},{"id":2430,"depth":27,"text":2433,"children":5270},[5271],{"id":2553,"depth":36,"text":2556},{"id":2835,"depth":27,"text":2838},{"id":3470,"depth":27,"text":3473},{"id":4086,"depth":27,"text":4089},{"id":4736,"depth":27,"text":4739},{"id":4928,"depth":27,"text":4931},{"id":5149,"depth":27,"text":5152},{"id":5167,"depth":27,"text":5170},1782373733965]