[{"data":1,"prerenderedAt":10936},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/tuple-unpacking":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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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",[406],{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"body":989,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},{"type":990,"children":991,"toc":10904},"root",[992,1000,1006,1479,1486,1491,1608,1615,1620,2036,2042,2047,2421,2427,2432,2834,2840,2853,2960,2966,2971,3391,3397,3402,3827,3833,3838,4371,4376,4382,4387,4475,4481,4486,5040,5046,5051,5647,5653,5658,6386,6392,6397,6476,6482,6487,7228,7234,7239,7776,7782,7787,8280,8286,8291,8352,8358,8363,8940,8946,8951,9487,9493,9498,10026,10032,10037,10311,10316,10335,10566,10572,10858,10864,10869,10876,10882,10887,10898],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":410},[997],{"type":998,"value":999},"text","📦 Tuple Unpacking",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Tuple unpacking is one of Python's most elegant features, allowing you to extract tuple values into individual variables in a single operation. This powerful technique makes code more readable, enables multiple function returns, and provides intuitive ways to work with structured data.",{"type":993,"tag":1007,"props":1008,"children":1009},"code-try",{},[1010],{"type":993,"tag":1011,"props":1012,"children":1015},"pre",{"className":1013,"code":1014,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic tuple unpacking\npoint = (10, 20)\nx, y = point\n\nperson = (\"Alice\", 25, \"Engineer\")\nname, age, job = person\n\nprint(f\"Point coordinates: x={x}, y={y}\")\nprint(f\"Person: {name}, age {age}, job {job}\")\n\n# Swapping variables elegantly\na, b = 5, 15\nprint(f\"Before swap: a={a}, b={b}\")\na, b = b, a\nprint(f\"After swap: a={a}, b={b}\")\n",[1016],{"type":993,"tag":1017,"props":1018,"children":1019},"code",{"__ignoreMap":8},[1020,1031,1072,1089,1097,1141,1158,1165,1230,1307,1314,1322,1348,1407,1423],{"type":993,"tag":1021,"props":1022,"children":1024},"span",{"class":1023,"line":12},"line",[1025],{"type":993,"tag":1021,"props":1026,"children":1028},{"style":1027},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1029],{"type":998,"value":1030},"# Basic tuple unpacking\n",{"type":993,"tag":1021,"props":1032,"children":1033},{"class":1023,"line":27},[1034,1040,1046,1051,1057,1062,1067],{"type":993,"tag":1021,"props":1035,"children":1037},{"style":1036},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1038],{"type":998,"value":1039},"point ",{"type":993,"tag":1021,"props":1041,"children":1043},{"style":1042},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1044],{"type":998,"value":1045},"=",{"type":993,"tag":1021,"props":1047,"children":1048},{"style":1036},[1049],{"type":998,"value":1050}," (",{"type":993,"tag":1021,"props":1052,"children":1054},{"style":1053},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1055],{"type":998,"value":1056},"10",{"type":993,"tag":1021,"props":1058,"children":1059},{"style":1036},[1060],{"type":998,"value":1061},", ",{"type":993,"tag":1021,"props":1063,"children":1064},{"style":1053},[1065],{"type":998,"value":1066},"20",{"type":993,"tag":1021,"props":1068,"children":1069},{"style":1036},[1070],{"type":998,"value":1071},")\n",{"type":993,"tag":1021,"props":1073,"children":1074},{"class":1023,"line":36},[1075,1080,1084],{"type":993,"tag":1021,"props":1076,"children":1077},{"style":1036},[1078],{"type":998,"value":1079},"x, y ",{"type":993,"tag":1021,"props":1081,"children":1082},{"style":1042},[1083],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1085,"children":1086},{"style":1036},[1087],{"type":998,"value":1088}," point\n",{"type":993,"tag":1021,"props":1090,"children":1091},{"class":1023,"line":45},[1092],{"type":993,"tag":1021,"props":1093,"children":1094},{"emptyLinePlaceholder":13},[1095],{"type":998,"value":1096},"\n",{"type":993,"tag":1021,"props":1098,"children":1099},{"class":1023,"line":54},[1100,1105,1109,1113,1119,1123,1128,1132,1137],{"type":993,"tag":1021,"props":1101,"children":1102},{"style":1036},[1103],{"type":998,"value":1104},"person ",{"type":993,"tag":1021,"props":1106,"children":1107},{"style":1042},[1108],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1110,"children":1111},{"style":1036},[1112],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1114,"children":1116},{"style":1115},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1117],{"type":998,"value":1118},"\"Alice\"",{"type":993,"tag":1021,"props":1120,"children":1121},{"style":1036},[1122],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1124,"children":1125},{"style":1053},[1126],{"type":998,"value":1127},"25",{"type":993,"tag":1021,"props":1129,"children":1130},{"style":1036},[1131],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1133,"children":1134},{"style":1115},[1135],{"type":998,"value":1136},"\"Engineer\"",{"type":993,"tag":1021,"props":1138,"children":1139},{"style":1036},[1140],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1142,"children":1143},{"class":1023,"line":63},[1144,1149,1153],{"type":993,"tag":1021,"props":1145,"children":1146},{"style":1036},[1147],{"type":998,"value":1148},"name, age, job ",{"type":993,"tag":1021,"props":1150,"children":1151},{"style":1042},[1152],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1154,"children":1155},{"style":1036},[1156],{"type":998,"value":1157}," person\n",{"type":993,"tag":1021,"props":1159,"children":1160},{"class":1023,"line":72},[1161],{"type":993,"tag":1021,"props":1162,"children":1163},{"emptyLinePlaceholder":13},[1164],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1166,"children":1167},{"class":1023,"line":81},[1168,1173,1178,1183,1188,1193,1198,1203,1208,1212,1217,1221,1226],{"type":993,"tag":1021,"props":1169,"children":1170},{"style":1053},[1171],{"type":998,"value":1172},"print",{"type":993,"tag":1021,"props":1174,"children":1175},{"style":1036},[1176],{"type":998,"value":1177},"(",{"type":993,"tag":1021,"props":1179,"children":1180},{"style":1042},[1181],{"type":998,"value":1182},"f",{"type":993,"tag":1021,"props":1184,"children":1185},{"style":1115},[1186],{"type":998,"value":1187},"\"Point coordinates: x=",{"type":993,"tag":1021,"props":1189,"children":1190},{"style":1053},[1191],{"type":998,"value":1192},"{",{"type":993,"tag":1021,"props":1194,"children":1195},{"style":1036},[1196],{"type":998,"value":1197},"x",{"type":993,"tag":1021,"props":1199,"children":1200},{"style":1053},[1201],{"type":998,"value":1202},"}",{"type":993,"tag":1021,"props":1204,"children":1205},{"style":1115},[1206],{"type":998,"value":1207},", y=",{"type":993,"tag":1021,"props":1209,"children":1210},{"style":1053},[1211],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1213,"children":1214},{"style":1036},[1215],{"type":998,"value":1216},"y",{"type":993,"tag":1021,"props":1218,"children":1219},{"style":1053},[1220],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1222,"children":1223},{"style":1115},[1224],{"type":998,"value":1225},"\"",{"type":993,"tag":1021,"props":1227,"children":1228},{"style":1036},[1229],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1231,"children":1232},{"class":1023,"line":91},[1233,1237,1241,1245,1250,1254,1259,1263,1268,1272,1277,1281,1286,1290,1295,1299,1303],{"type":993,"tag":1021,"props":1234,"children":1235},{"style":1053},[1236],{"type":998,"value":1172},{"type":993,"tag":1021,"props":1238,"children":1239},{"style":1036},[1240],{"type":998,"value":1177},{"type":993,"tag":1021,"props":1242,"children":1243},{"style":1042},[1244],{"type":998,"value":1182},{"type":993,"tag":1021,"props":1246,"children":1247},{"style":1115},[1248],{"type":998,"value":1249},"\"Person: ",{"type":993,"tag":1021,"props":1251,"children":1252},{"style":1053},[1253],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1255,"children":1256},{"style":1036},[1257],{"type":998,"value":1258},"name",{"type":993,"tag":1021,"props":1260,"children":1261},{"style":1053},[1262],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1264,"children":1265},{"style":1115},[1266],{"type":998,"value":1267},", age ",{"type":993,"tag":1021,"props":1269,"children":1270},{"style":1053},[1271],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1273,"children":1274},{"style":1036},[1275],{"type":998,"value":1276},"age",{"type":993,"tag":1021,"props":1278,"children":1279},{"style":1053},[1280],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1282,"children":1283},{"style":1115},[1284],{"type":998,"value":1285},", job ",{"type":993,"tag":1021,"props":1287,"children":1288},{"style":1053},[1289],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1291,"children":1292},{"style":1036},[1293],{"type":998,"value":1294},"job",{"type":993,"tag":1021,"props":1296,"children":1297},{"style":1053},[1298],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1300,"children":1301},{"style":1115},[1302],{"type":998,"value":1225},{"type":993,"tag":1021,"props":1304,"children":1305},{"style":1036},[1306],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1308,"children":1309},{"class":1023,"line":100},[1310],{"type":993,"tag":1021,"props":1311,"children":1312},{"emptyLinePlaceholder":13},[1313],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1315,"children":1316},{"class":1023,"line":109},[1317],{"type":993,"tag":1021,"props":1318,"children":1319},{"style":1027},[1320],{"type":998,"value":1321},"# Swapping variables elegantly\n",{"type":993,"tag":1021,"props":1323,"children":1324},{"class":1023,"line":118},[1325,1330,1334,1339,1343],{"type":993,"tag":1021,"props":1326,"children":1327},{"style":1036},[1328],{"type":998,"value":1329},"a, b ",{"type":993,"tag":1021,"props":1331,"children":1332},{"style":1042},[1333],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1335,"children":1336},{"style":1053},[1337],{"type":998,"value":1338}," 5",{"type":993,"tag":1021,"props":1340,"children":1341},{"style":1036},[1342],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1344,"children":1345},{"style":1053},[1346],{"type":998,"value":1347},"15\n",{"type":993,"tag":1021,"props":1349,"children":1350},{"class":1023,"line":127},[1351,1355,1359,1363,1368,1372,1377,1381,1386,1390,1395,1399,1403],{"type":993,"tag":1021,"props":1352,"children":1353},{"style":1053},[1354],{"type":998,"value":1172},{"type":993,"tag":1021,"props":1356,"children":1357},{"style":1036},[1358],{"type":998,"value":1177},{"type":993,"tag":1021,"props":1360,"children":1361},{"style":1042},[1362],{"type":998,"value":1182},{"type":993,"tag":1021,"props":1364,"children":1365},{"style":1115},[1366],{"type":998,"value":1367},"\"Before swap: a=",{"type":993,"tag":1021,"props":1369,"children":1370},{"style":1053},[1371],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1373,"children":1374},{"style":1036},[1375],{"type":998,"value":1376},"a",{"type":993,"tag":1021,"props":1378,"children":1379},{"style":1053},[1380],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1382,"children":1383},{"style":1115},[1384],{"type":998,"value":1385},", b=",{"type":993,"tag":1021,"props":1387,"children":1388},{"style":1053},[1389],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1391,"children":1392},{"style":1036},[1393],{"type":998,"value":1394},"b",{"type":993,"tag":1021,"props":1396,"children":1397},{"style":1053},[1398],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1400,"children":1401},{"style":1115},[1402],{"type":998,"value":1225},{"type":993,"tag":1021,"props":1404,"children":1405},{"style":1036},[1406],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1408,"children":1409},{"class":1023,"line":136},[1410,1414,1418],{"type":993,"tag":1021,"props":1411,"children":1412},{"style":1036},[1413],{"type":998,"value":1329},{"type":993,"tag":1021,"props":1415,"children":1416},{"style":1042},[1417],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1419,"children":1420},{"style":1036},[1421],{"type":998,"value":1422}," b, a\n",{"type":993,"tag":1021,"props":1424,"children":1425},{"class":1023,"line":146},[1426,1430,1434,1438,1443,1447,1451,1455,1459,1463,1467,1471,1475],{"type":993,"tag":1021,"props":1427,"children":1428},{"style":1053},[1429],{"type":998,"value":1172},{"type":993,"tag":1021,"props":1431,"children":1432},{"style":1036},[1433],{"type":998,"value":1177},{"type":993,"tag":1021,"props":1435,"children":1436},{"style":1042},[1437],{"type":998,"value":1182},{"type":993,"tag":1021,"props":1439,"children":1440},{"style":1115},[1441],{"type":998,"value":1442},"\"After swap: a=",{"type":993,"tag":1021,"props":1444,"children":1445},{"style":1053},[1446],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1448,"children":1449},{"style":1036},[1450],{"type":998,"value":1376},{"type":993,"tag":1021,"props":1452,"children":1453},{"style":1053},[1454],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1456,"children":1457},{"style":1115},[1458],{"type":998,"value":1385},{"type":993,"tag":1021,"props":1460,"children":1461},{"style":1053},[1462],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1464,"children":1465},{"style":1036},[1466],{"type":998,"value":1394},{"type":993,"tag":1021,"props":1468,"children":1469},{"style":1053},[1470],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1472,"children":1473},{"style":1115},[1474],{"type":998,"value":1225},{"type":993,"tag":1021,"props":1476,"children":1477},{"style":1036},[1478],{"type":998,"value":1071},{"type":993,"tag":1480,"props":1481,"children":1483},"h2",{"id":1482},"basic-tuple-unpacking",[1484],{"type":998,"value":1485},"🎯 Basic Tuple Unpacking",{"type":993,"tag":1001,"props":1487,"children":1488},{},[1489],{"type":998,"value":1490},"Tuple unpacking assigns each tuple element to a corresponding variable in a single statement. The number of variables must match the number of tuple elements.",{"type":993,"tag":1492,"props":1493,"children":1497},"info-box",{"emoji":1494,"title":1495,"type":1496},"🔑","Unpacking Fundamentals","info",[1498,1507,1532,1540,1587,1595],{"type":993,"tag":1001,"props":1499,"children":1500},{},[1501],{"type":993,"tag":1502,"props":1503,"children":1504},"strong",{},[1505],{"type":998,"value":1506},"Basic Rules:",{"type":993,"tag":1508,"props":1509,"children":1510},"ul",{},[1511,1517,1522,1527],{"type":993,"tag":1512,"props":1513,"children":1514},"li",{},[1515],{"type":998,"value":1516},"Number of variables must equal number of tuple elements",{"type":993,"tag":1512,"props":1518,"children":1519},{},[1520],{"type":998,"value":1521},"Assignment happens left to right in order",{"type":993,"tag":1512,"props":1523,"children":1524},{},[1525],{"type":998,"value":1526},"Parentheses optional on the left side",{"type":993,"tag":1512,"props":1528,"children":1529},{},[1530],{"type":998,"value":1531},"Works with any iterable, not just tuples",{"type":993,"tag":1001,"props":1533,"children":1534},{},[1535],{"type":993,"tag":1502,"props":1536,"children":1537},{},[1538],{"type":998,"value":1539},"Common Applications:",{"type":993,"tag":1508,"props":1541,"children":1542},{},[1543,1554,1565,1576],{"type":993,"tag":1512,"props":1544,"children":1545},{},[1546,1548],{"type":998,"value":1547},"Coordinate extraction: ",{"type":993,"tag":1017,"props":1549,"children":1551},{"className":1550},[],[1552],{"type":998,"value":1553},"x, y = point",{"type":993,"tag":1512,"props":1555,"children":1556},{},[1557,1559],{"type":998,"value":1558},"Database records: ",{"type":993,"tag":1017,"props":1560,"children":1562},{"className":1561},[],[1563],{"type":998,"value":1564},"name, age, email = user_record",{"type":993,"tag":1512,"props":1566,"children":1567},{},[1568,1570],{"type":998,"value":1569},"Function returns: ",{"type":993,"tag":1017,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":998,"value":1575},"result, status = process_data()",{"type":993,"tag":1512,"props":1577,"children":1578},{},[1579,1581],{"type":998,"value":1580},"Configuration settings: ",{"type":993,"tag":1017,"props":1582,"children":1584},{"className":1583},[],[1585],{"type":998,"value":1586},"host, port, debug = config",{"type":993,"tag":1001,"props":1588,"children":1589},{},[1590],{"type":993,"tag":1502,"props":1591,"children":1592},{},[1593],{"type":998,"value":1594},"Error Prevention:",{"type":993,"tag":1508,"props":1596,"children":1597},{},[1598,1603],{"type":993,"tag":1512,"props":1599,"children":1600},{},[1601],{"type":998,"value":1602},"ValueError raised if count mismatch occurs",{"type":993,"tag":1512,"props":1604,"children":1605},{},[1606],{"type":998,"value":1607},"Use star expressions for flexible unpacking",{"type":993,"tag":1609,"props":1610,"children":1612},"h3",{"id":1611},"simple-variable-assignment",[1613],{"type":998,"value":1614},"Simple Variable Assignment",{"type":993,"tag":1001,"props":1616,"children":1617},{},[1618],{"type":998,"value":1619},"Direct extraction of tuple elements into individual variables for immediate use.",{"type":993,"tag":1007,"props":1621,"children":1622},{},[1623],{"type":993,"tag":1011,"props":1624,"children":1626},{"className":1013,"code":1625,"language":6,"meta":8,"style":8},"# Simple unpacking examples\nrgb_color = (255, 128, 0)\nred, green, blue = rgb_color\n\ncoordinates = (100, 200)\nx, y = coordinates\n\nstudent_info = (\"Bob\", 20, \"Mathematics\")\nname, age, major = student_info\n\nprint(f\"RGB: R={red}, G={green}, B={blue}\")\nprint(f\"Position: ({x}, {y})\")\nprint(f\"Student: {name}, {age} years old, studying {major}\")\n",[1627],{"type":993,"tag":1017,"props":1628,"children":1629},{"__ignoreMap":8},[1630,1638,1681,1698,1705,1739,1755,1762,1804,1821,1828,1905,1962],{"type":993,"tag":1021,"props":1631,"children":1632},{"class":1023,"line":12},[1633],{"type":993,"tag":1021,"props":1634,"children":1635},{"style":1027},[1636],{"type":998,"value":1637},"# Simple unpacking examples\n",{"type":993,"tag":1021,"props":1639,"children":1640},{"class":1023,"line":27},[1641,1646,1650,1654,1659,1663,1668,1672,1677],{"type":993,"tag":1021,"props":1642,"children":1643},{"style":1036},[1644],{"type":998,"value":1645},"rgb_color ",{"type":993,"tag":1021,"props":1647,"children":1648},{"style":1042},[1649],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1651,"children":1652},{"style":1036},[1653],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1655,"children":1656},{"style":1053},[1657],{"type":998,"value":1658},"255",{"type":993,"tag":1021,"props":1660,"children":1661},{"style":1036},[1662],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1664,"children":1665},{"style":1053},[1666],{"type":998,"value":1667},"128",{"type":993,"tag":1021,"props":1669,"children":1670},{"style":1036},[1671],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1673,"children":1674},{"style":1053},[1675],{"type":998,"value":1676},"0",{"type":993,"tag":1021,"props":1678,"children":1679},{"style":1036},[1680],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1682,"children":1683},{"class":1023,"line":36},[1684,1689,1693],{"type":993,"tag":1021,"props":1685,"children":1686},{"style":1036},[1687],{"type":998,"value":1688},"red, green, blue ",{"type":993,"tag":1021,"props":1690,"children":1691},{"style":1042},[1692],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1694,"children":1695},{"style":1036},[1696],{"type":998,"value":1697}," rgb_color\n",{"type":993,"tag":1021,"props":1699,"children":1700},{"class":1023,"line":45},[1701],{"type":993,"tag":1021,"props":1702,"children":1703},{"emptyLinePlaceholder":13},[1704],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1706,"children":1707},{"class":1023,"line":54},[1708,1713,1717,1721,1726,1730,1735],{"type":993,"tag":1021,"props":1709,"children":1710},{"style":1036},[1711],{"type":998,"value":1712},"coordinates ",{"type":993,"tag":1021,"props":1714,"children":1715},{"style":1042},[1716],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1718,"children":1719},{"style":1036},[1720],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1722,"children":1723},{"style":1053},[1724],{"type":998,"value":1725},"100",{"type":993,"tag":1021,"props":1727,"children":1728},{"style":1036},[1729],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1731,"children":1732},{"style":1053},[1733],{"type":998,"value":1734},"200",{"type":993,"tag":1021,"props":1736,"children":1737},{"style":1036},[1738],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1740,"children":1741},{"class":1023,"line":63},[1742,1746,1750],{"type":993,"tag":1021,"props":1743,"children":1744},{"style":1036},[1745],{"type":998,"value":1079},{"type":993,"tag":1021,"props":1747,"children":1748},{"style":1042},[1749],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1751,"children":1752},{"style":1036},[1753],{"type":998,"value":1754}," coordinates\n",{"type":993,"tag":1021,"props":1756,"children":1757},{"class":1023,"line":72},[1758],{"type":993,"tag":1021,"props":1759,"children":1760},{"emptyLinePlaceholder":13},[1761],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1763,"children":1764},{"class":1023,"line":81},[1765,1770,1774,1778,1783,1787,1791,1795,1800],{"type":993,"tag":1021,"props":1766,"children":1767},{"style":1036},[1768],{"type":998,"value":1769},"student_info ",{"type":993,"tag":1021,"props":1771,"children":1772},{"style":1042},[1773],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1775,"children":1776},{"style":1036},[1777],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1779,"children":1780},{"style":1115},[1781],{"type":998,"value":1782},"\"Bob\"",{"type":993,"tag":1021,"props":1784,"children":1785},{"style":1036},[1786],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1788,"children":1789},{"style":1053},[1790],{"type":998,"value":1066},{"type":993,"tag":1021,"props":1792,"children":1793},{"style":1036},[1794],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1796,"children":1797},{"style":1115},[1798],{"type":998,"value":1799},"\"Mathematics\"",{"type":993,"tag":1021,"props":1801,"children":1802},{"style":1036},[1803],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1805,"children":1806},{"class":1023,"line":91},[1807,1812,1816],{"type":993,"tag":1021,"props":1808,"children":1809},{"style":1036},[1810],{"type":998,"value":1811},"name, age, major ",{"type":993,"tag":1021,"props":1813,"children":1814},{"style":1042},[1815],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1817,"children":1818},{"style":1036},[1819],{"type":998,"value":1820}," student_info\n",{"type":993,"tag":1021,"props":1822,"children":1823},{"class":1023,"line":100},[1824],{"type":993,"tag":1021,"props":1825,"children":1826},{"emptyLinePlaceholder":13},[1827],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1829,"children":1830},{"class":1023,"line":109},[1831,1835,1839,1843,1848,1852,1857,1861,1866,1870,1875,1879,1884,1888,1893,1897,1901],{"type":993,"tag":1021,"props":1832,"children":1833},{"style":1053},[1834],{"type":998,"value":1172},{"type":993,"tag":1021,"props":1836,"children":1837},{"style":1036},[1838],{"type":998,"value":1177},{"type":993,"tag":1021,"props":1840,"children":1841},{"style":1042},[1842],{"type":998,"value":1182},{"type":993,"tag":1021,"props":1844,"children":1845},{"style":1115},[1846],{"type":998,"value":1847},"\"RGB: R=",{"type":993,"tag":1021,"props":1849,"children":1850},{"style":1053},[1851],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1853,"children":1854},{"style":1036},[1855],{"type":998,"value":1856},"red",{"type":993,"tag":1021,"props":1858,"children":1859},{"style":1053},[1860],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1862,"children":1863},{"style":1115},[1864],{"type":998,"value":1865},", G=",{"type":993,"tag":1021,"props":1867,"children":1868},{"style":1053},[1869],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1871,"children":1872},{"style":1036},[1873],{"type":998,"value":1874},"green",{"type":993,"tag":1021,"props":1876,"children":1877},{"style":1053},[1878],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1880,"children":1881},{"style":1115},[1882],{"type":998,"value":1883},", B=",{"type":993,"tag":1021,"props":1885,"children":1886},{"style":1053},[1887],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1889,"children":1890},{"style":1036},[1891],{"type":998,"value":1892},"blue",{"type":993,"tag":1021,"props":1894,"children":1895},{"style":1053},[1896],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1898,"children":1899},{"style":1115},[1900],{"type":998,"value":1225},{"type":993,"tag":1021,"props":1902,"children":1903},{"style":1036},[1904],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1906,"children":1907},{"class":1023,"line":118},[1908,1912,1916,1920,1925,1929,1933,1937,1941,1945,1949,1953,1958],{"type":993,"tag":1021,"props":1909,"children":1910},{"style":1053},[1911],{"type":998,"value":1172},{"type":993,"tag":1021,"props":1913,"children":1914},{"style":1036},[1915],{"type":998,"value":1177},{"type":993,"tag":1021,"props":1917,"children":1918},{"style":1042},[1919],{"type":998,"value":1182},{"type":993,"tag":1021,"props":1921,"children":1922},{"style":1115},[1923],{"type":998,"value":1924},"\"Position: (",{"type":993,"tag":1021,"props":1926,"children":1927},{"style":1053},[1928],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1930,"children":1931},{"style":1036},[1932],{"type":998,"value":1197},{"type":993,"tag":1021,"props":1934,"children":1935},{"style":1053},[1936],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1938,"children":1939},{"style":1115},[1940],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1942,"children":1943},{"style":1053},[1944],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1946,"children":1947},{"style":1036},[1948],{"type":998,"value":1216},{"type":993,"tag":1021,"props":1950,"children":1951},{"style":1053},[1952],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1954,"children":1955},{"style":1115},[1956],{"type":998,"value":1957},")\"",{"type":993,"tag":1021,"props":1959,"children":1960},{"style":1036},[1961],{"type":998,"value":1071},{"type":993,"tag":1021,"props":1963,"children":1964},{"class":1023,"line":127},[1965,1969,1973,1977,1982,1986,1990,1994,1998,2002,2006,2010,2015,2019,2024,2028,2032],{"type":993,"tag":1021,"props":1966,"children":1967},{"style":1053},[1968],{"type":998,"value":1172},{"type":993,"tag":1021,"props":1970,"children":1971},{"style":1036},[1972],{"type":998,"value":1177},{"type":993,"tag":1021,"props":1974,"children":1975},{"style":1042},[1976],{"type":998,"value":1182},{"type":993,"tag":1021,"props":1978,"children":1979},{"style":1115},[1980],{"type":998,"value":1981},"\"Student: ",{"type":993,"tag":1021,"props":1983,"children":1984},{"style":1053},[1985],{"type":998,"value":1192},{"type":993,"tag":1021,"props":1987,"children":1988},{"style":1036},[1989],{"type":998,"value":1258},{"type":993,"tag":1021,"props":1991,"children":1992},{"style":1053},[1993],{"type":998,"value":1202},{"type":993,"tag":1021,"props":1995,"children":1996},{"style":1115},[1997],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1999,"children":2000},{"style":1053},[2001],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2003,"children":2004},{"style":1036},[2005],{"type":998,"value":1276},{"type":993,"tag":1021,"props":2007,"children":2008},{"style":1053},[2009],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2011,"children":2012},{"style":1115},[2013],{"type":998,"value":2014}," years old, studying ",{"type":993,"tag":1021,"props":2016,"children":2017},{"style":1053},[2018],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2020,"children":2021},{"style":1036},[2022],{"type":998,"value":2023},"major",{"type":993,"tag":1021,"props":2025,"children":2026},{"style":1053},[2027],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2029,"children":2030},{"style":1115},[2031],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2033,"children":2034},{"style":1036},[2035],{"type":998,"value":1071},{"type":993,"tag":1609,"props":2037,"children":2039},{"id":2038},"multiple-assignment-patterns",[2040],{"type":998,"value":2041},"Multiple Assignment Patterns",{"type":993,"tag":1001,"props":2043,"children":2044},{},[2045],{"type":998,"value":2046},"Simultaneous assignment of multiple variables using tuple unpacking syntax.",{"type":993,"tag":1007,"props":2048,"children":2049},{},[2050],{"type":993,"tag":1011,"props":2051,"children":2053},{"className":1013,"code":2052,"language":6,"meta":8,"style":8},"# Multiple assignment with unpacking\n# Assign multiple variables at once\nfirst, second, third = 1, 2, 3\nname, email = \"Alice\", \"alice@email.com\"\n\nprint(f\"Numbers: {first}, {second}, {third}\")\nprint(f\"Contact: {name} - {email}\")\n\n# Parallel assignment\nuser1, user2 = (\"Alice\", 25), (\"Bob\", 30)\nprint(f\"User 1: {user1}\")\nprint(f\"User 2: {user2}\")\n",[2054],{"type":993,"tag":1017,"props":2055,"children":2056},{"__ignoreMap":8},[2057,2065,2073,2108,2134,2141,2216,2274,2281,2289,2339,2380],{"type":993,"tag":1021,"props":2058,"children":2059},{"class":1023,"line":12},[2060],{"type":993,"tag":1021,"props":2061,"children":2062},{"style":1027},[2063],{"type":998,"value":2064},"# Multiple assignment with unpacking\n",{"type":993,"tag":1021,"props":2066,"children":2067},{"class":1023,"line":27},[2068],{"type":993,"tag":1021,"props":2069,"children":2070},{"style":1027},[2071],{"type":998,"value":2072},"# Assign multiple variables at once\n",{"type":993,"tag":1021,"props":2074,"children":2075},{"class":1023,"line":36},[2076,2081,2085,2090,2094,2099,2103],{"type":993,"tag":1021,"props":2077,"children":2078},{"style":1036},[2079],{"type":998,"value":2080},"first, second, third ",{"type":993,"tag":1021,"props":2082,"children":2083},{"style":1042},[2084],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2086,"children":2087},{"style":1053},[2088],{"type":998,"value":2089}," 1",{"type":993,"tag":1021,"props":2091,"children":2092},{"style":1036},[2093],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2095,"children":2096},{"style":1053},[2097],{"type":998,"value":2098},"2",{"type":993,"tag":1021,"props":2100,"children":2101},{"style":1036},[2102],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2104,"children":2105},{"style":1053},[2106],{"type":998,"value":2107},"3\n",{"type":993,"tag":1021,"props":2109,"children":2110},{"class":1023,"line":45},[2111,2116,2120,2125,2129],{"type":993,"tag":1021,"props":2112,"children":2113},{"style":1036},[2114],{"type":998,"value":2115},"name, email ",{"type":993,"tag":1021,"props":2117,"children":2118},{"style":1042},[2119],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2121,"children":2122},{"style":1115},[2123],{"type":998,"value":2124}," \"Alice\"",{"type":993,"tag":1021,"props":2126,"children":2127},{"style":1036},[2128],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2130,"children":2131},{"style":1115},[2132],{"type":998,"value":2133},"\"alice@email.com\"\n",{"type":993,"tag":1021,"props":2135,"children":2136},{"class":1023,"line":54},[2137],{"type":993,"tag":1021,"props":2138,"children":2139},{"emptyLinePlaceholder":13},[2140],{"type":998,"value":1096},{"type":993,"tag":1021,"props":2142,"children":2143},{"class":1023,"line":63},[2144,2148,2152,2156,2161,2165,2170,2174,2178,2182,2187,2191,2195,2199,2204,2208,2212],{"type":993,"tag":1021,"props":2145,"children":2146},{"style":1053},[2147],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2149,"children":2150},{"style":1036},[2151],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2153,"children":2154},{"style":1042},[2155],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2157,"children":2158},{"style":1115},[2159],{"type":998,"value":2160},"\"Numbers: ",{"type":993,"tag":1021,"props":2162,"children":2163},{"style":1053},[2164],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2166,"children":2167},{"style":1036},[2168],{"type":998,"value":2169},"first",{"type":993,"tag":1021,"props":2171,"children":2172},{"style":1053},[2173],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2175,"children":2176},{"style":1115},[2177],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2179,"children":2180},{"style":1053},[2181],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2183,"children":2184},{"style":1036},[2185],{"type":998,"value":2186},"second",{"type":993,"tag":1021,"props":2188,"children":2189},{"style":1053},[2190],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2192,"children":2193},{"style":1115},[2194],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2196,"children":2197},{"style":1053},[2198],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2200,"children":2201},{"style":1036},[2202],{"type":998,"value":2203},"third",{"type":993,"tag":1021,"props":2205,"children":2206},{"style":1053},[2207],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2209,"children":2210},{"style":1115},[2211],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2213,"children":2214},{"style":1036},[2215],{"type":998,"value":1071},{"type":993,"tag":1021,"props":2217,"children":2218},{"class":1023,"line":72},[2219,2223,2227,2231,2236,2240,2244,2248,2253,2257,2262,2266,2270],{"type":993,"tag":1021,"props":2220,"children":2221},{"style":1053},[2222],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2224,"children":2225},{"style":1036},[2226],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2228,"children":2229},{"style":1042},[2230],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2232,"children":2233},{"style":1115},[2234],{"type":998,"value":2235},"\"Contact: ",{"type":993,"tag":1021,"props":2237,"children":2238},{"style":1053},[2239],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2241,"children":2242},{"style":1036},[2243],{"type":998,"value":1258},{"type":993,"tag":1021,"props":2245,"children":2246},{"style":1053},[2247],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2249,"children":2250},{"style":1115},[2251],{"type":998,"value":2252}," - ",{"type":993,"tag":1021,"props":2254,"children":2255},{"style":1053},[2256],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2258,"children":2259},{"style":1036},[2260],{"type":998,"value":2261},"email",{"type":993,"tag":1021,"props":2263,"children":2264},{"style":1053},[2265],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2267,"children":2268},{"style":1115},[2269],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2271,"children":2272},{"style":1036},[2273],{"type":998,"value":1071},{"type":993,"tag":1021,"props":2275,"children":2276},{"class":1023,"line":81},[2277],{"type":993,"tag":1021,"props":2278,"children":2279},{"emptyLinePlaceholder":13},[2280],{"type":998,"value":1096},{"type":993,"tag":1021,"props":2282,"children":2283},{"class":1023,"line":91},[2284],{"type":993,"tag":1021,"props":2285,"children":2286},{"style":1027},[2287],{"type":998,"value":2288},"# Parallel assignment\n",{"type":993,"tag":1021,"props":2290,"children":2291},{"class":1023,"line":100},[2292,2297,2301,2305,2309,2313,2317,2322,2326,2330,2335],{"type":993,"tag":1021,"props":2293,"children":2294},{"style":1036},[2295],{"type":998,"value":2296},"user1, user2 ",{"type":993,"tag":1021,"props":2298,"children":2299},{"style":1042},[2300],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2302,"children":2303},{"style":1036},[2304],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2306,"children":2307},{"style":1115},[2308],{"type":998,"value":1118},{"type":993,"tag":1021,"props":2310,"children":2311},{"style":1036},[2312],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2314,"children":2315},{"style":1053},[2316],{"type":998,"value":1127},{"type":993,"tag":1021,"props":2318,"children":2319},{"style":1036},[2320],{"type":998,"value":2321},"), (",{"type":993,"tag":1021,"props":2323,"children":2324},{"style":1115},[2325],{"type":998,"value":1782},{"type":993,"tag":1021,"props":2327,"children":2328},{"style":1036},[2329],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2331,"children":2332},{"style":1053},[2333],{"type":998,"value":2334},"30",{"type":993,"tag":1021,"props":2336,"children":2337},{"style":1036},[2338],{"type":998,"value":1071},{"type":993,"tag":1021,"props":2340,"children":2341},{"class":1023,"line":109},[2342,2346,2350,2354,2359,2363,2368,2372,2376],{"type":993,"tag":1021,"props":2343,"children":2344},{"style":1053},[2345],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2347,"children":2348},{"style":1036},[2349],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2351,"children":2352},{"style":1042},[2353],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2355,"children":2356},{"style":1115},[2357],{"type":998,"value":2358},"\"User 1: ",{"type":993,"tag":1021,"props":2360,"children":2361},{"style":1053},[2362],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2364,"children":2365},{"style":1036},[2366],{"type":998,"value":2367},"user1",{"type":993,"tag":1021,"props":2369,"children":2370},{"style":1053},[2371],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2373,"children":2374},{"style":1115},[2375],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2377,"children":2378},{"style":1036},[2379],{"type":998,"value":1071},{"type":993,"tag":1021,"props":2381,"children":2382},{"class":1023,"line":118},[2383,2387,2391,2395,2400,2404,2409,2413,2417],{"type":993,"tag":1021,"props":2384,"children":2385},{"style":1053},[2386],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2388,"children":2389},{"style":1036},[2390],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2392,"children":2393},{"style":1042},[2394],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2396,"children":2397},{"style":1115},[2398],{"type":998,"value":2399},"\"User 2: ",{"type":993,"tag":1021,"props":2401,"children":2402},{"style":1053},[2403],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2405,"children":2406},{"style":1036},[2407],{"type":998,"value":2408},"user2",{"type":993,"tag":1021,"props":2410,"children":2411},{"style":1053},[2412],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2414,"children":2415},{"style":1115},[2416],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2418,"children":2419},{"style":1036},[2420],{"type":998,"value":1071},{"type":993,"tag":1609,"props":2422,"children":2424},{"id":2423},"variable-swapping",[2425],{"type":998,"value":2426},"Variable Swapping",{"type":993,"tag":1001,"props":2428,"children":2429},{},[2430],{"type":998,"value":2431},"Elegant variable exchange using tuple unpacking without temporary variables.",{"type":993,"tag":1007,"props":2433,"children":2434},{},[2435],{"type":993,"tag":1011,"props":2436,"children":2438},{"className":1013,"code":2437,"language":6,"meta":8,"style":8},"# Variable swapping\nx, y = 10, 20\nprint(f\"Original: x={x}, y={y}\")\n\n# Swap variables elegantly\nx, y = y, x\nprint(f\"Swapped: x={x}, y={y}\")\n\n# Multiple variable rotation\na, b, c = 1, 2, 3\nprint(f\"Original: a={a}, b={b}, c={c}\")\n\na, b, c = b, c, a\nprint(f\"Rotated: a={a}, b={b}, c={c}\")\n",[2439],{"type":993,"tag":1017,"props":2440,"children":2441},{"__ignoreMap":8},[2442,2450,2475,2531,2538,2546,2562,2618,2625,2633,2665,2739,2746,2762],{"type":993,"tag":1021,"props":2443,"children":2444},{"class":1023,"line":12},[2445],{"type":993,"tag":1021,"props":2446,"children":2447},{"style":1027},[2448],{"type":998,"value":2449},"# Variable swapping\n",{"type":993,"tag":1021,"props":2451,"children":2452},{"class":1023,"line":27},[2453,2457,2461,2466,2470],{"type":993,"tag":1021,"props":2454,"children":2455},{"style":1036},[2456],{"type":998,"value":1079},{"type":993,"tag":1021,"props":2458,"children":2459},{"style":1042},[2460],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2462,"children":2463},{"style":1053},[2464],{"type":998,"value":2465}," 10",{"type":993,"tag":1021,"props":2467,"children":2468},{"style":1036},[2469],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2471,"children":2472},{"style":1053},[2473],{"type":998,"value":2474},"20\n",{"type":993,"tag":1021,"props":2476,"children":2477},{"class":1023,"line":36},[2478,2482,2486,2490,2495,2499,2503,2507,2511,2515,2519,2523,2527],{"type":993,"tag":1021,"props":2479,"children":2480},{"style":1053},[2481],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2483,"children":2484},{"style":1036},[2485],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2487,"children":2488},{"style":1042},[2489],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2491,"children":2492},{"style":1115},[2493],{"type":998,"value":2494},"\"Original: x=",{"type":993,"tag":1021,"props":2496,"children":2497},{"style":1053},[2498],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2500,"children":2501},{"style":1036},[2502],{"type":998,"value":1197},{"type":993,"tag":1021,"props":2504,"children":2505},{"style":1053},[2506],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2508,"children":2509},{"style":1115},[2510],{"type":998,"value":1207},{"type":993,"tag":1021,"props":2512,"children":2513},{"style":1053},[2514],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2516,"children":2517},{"style":1036},[2518],{"type":998,"value":1216},{"type":993,"tag":1021,"props":2520,"children":2521},{"style":1053},[2522],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2524,"children":2525},{"style":1115},[2526],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2528,"children":2529},{"style":1036},[2530],{"type":998,"value":1071},{"type":993,"tag":1021,"props":2532,"children":2533},{"class":1023,"line":45},[2534],{"type":993,"tag":1021,"props":2535,"children":2536},{"emptyLinePlaceholder":13},[2537],{"type":998,"value":1096},{"type":993,"tag":1021,"props":2539,"children":2540},{"class":1023,"line":54},[2541],{"type":993,"tag":1021,"props":2542,"children":2543},{"style":1027},[2544],{"type":998,"value":2545},"# Swap variables elegantly\n",{"type":993,"tag":1021,"props":2547,"children":2548},{"class":1023,"line":63},[2549,2553,2557],{"type":993,"tag":1021,"props":2550,"children":2551},{"style":1036},[2552],{"type":998,"value":1079},{"type":993,"tag":1021,"props":2554,"children":2555},{"style":1042},[2556],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2558,"children":2559},{"style":1036},[2560],{"type":998,"value":2561}," y, x\n",{"type":993,"tag":1021,"props":2563,"children":2564},{"class":1023,"line":72},[2565,2569,2573,2577,2582,2586,2590,2594,2598,2602,2606,2610,2614],{"type":993,"tag":1021,"props":2566,"children":2567},{"style":1053},[2568],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2570,"children":2571},{"style":1036},[2572],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2574,"children":2575},{"style":1042},[2576],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2578,"children":2579},{"style":1115},[2580],{"type":998,"value":2581},"\"Swapped: x=",{"type":993,"tag":1021,"props":2583,"children":2584},{"style":1053},[2585],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2587,"children":2588},{"style":1036},[2589],{"type":998,"value":1197},{"type":993,"tag":1021,"props":2591,"children":2592},{"style":1053},[2593],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2595,"children":2596},{"style":1115},[2597],{"type":998,"value":1207},{"type":993,"tag":1021,"props":2599,"children":2600},{"style":1053},[2601],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2603,"children":2604},{"style":1036},[2605],{"type":998,"value":1216},{"type":993,"tag":1021,"props":2607,"children":2608},{"style":1053},[2609],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2611,"children":2612},{"style":1115},[2613],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2615,"children":2616},{"style":1036},[2617],{"type":998,"value":1071},{"type":993,"tag":1021,"props":2619,"children":2620},{"class":1023,"line":81},[2621],{"type":993,"tag":1021,"props":2622,"children":2623},{"emptyLinePlaceholder":13},[2624],{"type":998,"value":1096},{"type":993,"tag":1021,"props":2626,"children":2627},{"class":1023,"line":91},[2628],{"type":993,"tag":1021,"props":2629,"children":2630},{"style":1027},[2631],{"type":998,"value":2632},"# Multiple variable rotation\n",{"type":993,"tag":1021,"props":2634,"children":2635},{"class":1023,"line":100},[2636,2641,2645,2649,2653,2657,2661],{"type":993,"tag":1021,"props":2637,"children":2638},{"style":1036},[2639],{"type":998,"value":2640},"a, b, c ",{"type":993,"tag":1021,"props":2642,"children":2643},{"style":1042},[2644],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2646,"children":2647},{"style":1053},[2648],{"type":998,"value":2089},{"type":993,"tag":1021,"props":2650,"children":2651},{"style":1036},[2652],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2654,"children":2655},{"style":1053},[2656],{"type":998,"value":2098},{"type":993,"tag":1021,"props":2658,"children":2659},{"style":1036},[2660],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2662,"children":2663},{"style":1053},[2664],{"type":998,"value":2107},{"type":993,"tag":1021,"props":2666,"children":2667},{"class":1023,"line":109},[2668,2672,2676,2680,2685,2689,2693,2697,2701,2705,2709,2713,2718,2722,2727,2731,2735],{"type":993,"tag":1021,"props":2669,"children":2670},{"style":1053},[2671],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2673,"children":2674},{"style":1036},[2675],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2677,"children":2678},{"style":1042},[2679],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2681,"children":2682},{"style":1115},[2683],{"type":998,"value":2684},"\"Original: a=",{"type":993,"tag":1021,"props":2686,"children":2687},{"style":1053},[2688],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2690,"children":2691},{"style":1036},[2692],{"type":998,"value":1376},{"type":993,"tag":1021,"props":2694,"children":2695},{"style":1053},[2696],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2698,"children":2699},{"style":1115},[2700],{"type":998,"value":1385},{"type":993,"tag":1021,"props":2702,"children":2703},{"style":1053},[2704],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2706,"children":2707},{"style":1036},[2708],{"type":998,"value":1394},{"type":993,"tag":1021,"props":2710,"children":2711},{"style":1053},[2712],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2714,"children":2715},{"style":1115},[2716],{"type":998,"value":2717},", c=",{"type":993,"tag":1021,"props":2719,"children":2720},{"style":1053},[2721],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2723,"children":2724},{"style":1036},[2725],{"type":998,"value":2726},"c",{"type":993,"tag":1021,"props":2728,"children":2729},{"style":1053},[2730],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2732,"children":2733},{"style":1115},[2734],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2736,"children":2737},{"style":1036},[2738],{"type":998,"value":1071},{"type":993,"tag":1021,"props":2740,"children":2741},{"class":1023,"line":118},[2742],{"type":993,"tag":1021,"props":2743,"children":2744},{"emptyLinePlaceholder":13},[2745],{"type":998,"value":1096},{"type":993,"tag":1021,"props":2747,"children":2748},{"class":1023,"line":127},[2749,2753,2757],{"type":993,"tag":1021,"props":2750,"children":2751},{"style":1036},[2752],{"type":998,"value":2640},{"type":993,"tag":1021,"props":2754,"children":2755},{"style":1042},[2756],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2758,"children":2759},{"style":1036},[2760],{"type":998,"value":2761}," b, c, a\n",{"type":993,"tag":1021,"props":2763,"children":2764},{"class":1023,"line":136},[2765,2769,2773,2777,2782,2786,2790,2794,2798,2802,2806,2810,2814,2818,2822,2826,2830],{"type":993,"tag":1021,"props":2766,"children":2767},{"style":1053},[2768],{"type":998,"value":1172},{"type":993,"tag":1021,"props":2770,"children":2771},{"style":1036},[2772],{"type":998,"value":1177},{"type":993,"tag":1021,"props":2774,"children":2775},{"style":1042},[2776],{"type":998,"value":1182},{"type":993,"tag":1021,"props":2778,"children":2779},{"style":1115},[2780],{"type":998,"value":2781},"\"Rotated: a=",{"type":993,"tag":1021,"props":2783,"children":2784},{"style":1053},[2785],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2787,"children":2788},{"style":1036},[2789],{"type":998,"value":1376},{"type":993,"tag":1021,"props":2791,"children":2792},{"style":1053},[2793],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2795,"children":2796},{"style":1115},[2797],{"type":998,"value":1385},{"type":993,"tag":1021,"props":2799,"children":2800},{"style":1053},[2801],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2803,"children":2804},{"style":1036},[2805],{"type":998,"value":1394},{"type":993,"tag":1021,"props":2807,"children":2808},{"style":1053},[2809],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2811,"children":2812},{"style":1115},[2813],{"type":998,"value":2717},{"type":993,"tag":1021,"props":2815,"children":2816},{"style":1053},[2817],{"type":998,"value":1192},{"type":993,"tag":1021,"props":2819,"children":2820},{"style":1036},[2821],{"type":998,"value":2726},{"type":993,"tag":1021,"props":2823,"children":2824},{"style":1053},[2825],{"type":998,"value":1202},{"type":993,"tag":1021,"props":2827,"children":2828},{"style":1115},[2829],{"type":998,"value":1225},{"type":993,"tag":1021,"props":2831,"children":2832},{"style":1036},[2833],{"type":998,"value":1071},{"type":993,"tag":1480,"props":2835,"children":2837},{"id":2836},"advanced-unpacking-with-star-expressions",[2838],{"type":998,"value":2839},"⭐ Advanced Unpacking with Star Expressions",{"type":993,"tag":1001,"props":2841,"children":2842},{},[2843,2845,2851],{"type":998,"value":2844},"Star expressions (",{"type":993,"tag":1017,"props":2846,"children":2848},{"className":2847},[],[2849],{"type":998,"value":2850},"*variable",{"type":998,"value":2852},") allow flexible unpacking when you don't know the exact number of elements or want to capture multiple elements in one variable.",{"type":993,"tag":1492,"props":2854,"children":2858},{"emoji":2855,"title":2856,"type":2857},"⭐","Star Expression Benefits","success",[2859,2867,2908,2916,2939,2947],{"type":993,"tag":1001,"props":2860,"children":2861},{},[2862],{"type":993,"tag":1502,"props":2863,"children":2864},{},[2865],{"type":998,"value":2866},"Flexible Unpacking:",{"type":993,"tag":1508,"props":2868,"children":2869},{},[2870,2881,2892,2903],{"type":993,"tag":1512,"props":2871,"children":2872},{},[2873,2875],{"type":998,"value":2874},"Capture remaining elements: ",{"type":993,"tag":1017,"props":2876,"children":2878},{"className":2877},[],[2879],{"type":998,"value":2880},"first, *rest = tuple",{"type":993,"tag":1512,"props":2882,"children":2883},{},[2884,2886],{"type":998,"value":2885},"Capture middle elements: ",{"type":993,"tag":1017,"props":2887,"children":2889},{"className":2888},[],[2890],{"type":998,"value":2891},"first, *middle, last = tuple",{"type":993,"tag":1512,"props":2893,"children":2894},{},[2895,2897],{"type":998,"value":2896},"Skip unwanted elements: ",{"type":993,"tag":1017,"props":2898,"children":2900},{"className":2899},[],[2901],{"type":998,"value":2902},"first, *_, last = tuple",{"type":993,"tag":1512,"props":2904,"children":2905},{},[2906],{"type":998,"value":2907},"Handle variable-length tuples gracefully",{"type":993,"tag":1001,"props":2909,"children":2910},{},[2911],{"type":993,"tag":1502,"props":2912,"children":2913},{},[2914],{"type":998,"value":2915},"Use Cases:",{"type":993,"tag":1508,"props":2917,"children":2918},{},[2919,2924,2929,2934],{"type":993,"tag":1512,"props":2920,"children":2921},{},[2922],{"type":998,"value":2923},"Processing lists with headers/footers",{"type":993,"tag":1512,"props":2925,"children":2926},{},[2927],{"type":998,"value":2928},"Function parameter unpacking",{"type":993,"tag":1512,"props":2930,"children":2931},{},[2932],{"type":998,"value":2933},"Data parsing with variable fields",{"type":993,"tag":1512,"props":2935,"children":2936},{},[2937],{"type":998,"value":2938},"Extracting specific elements from longer tuples",{"type":993,"tag":1001,"props":2940,"children":2941},{},[2942],{"type":993,"tag":1502,"props":2943,"children":2944},{},[2945],{"type":998,"value":2946},"Result Type:",{"type":993,"tag":1508,"props":2948,"children":2949},{},[2950,2955],{"type":993,"tag":1512,"props":2951,"children":2952},{},[2953],{"type":998,"value":2954},"Star expressions always create lists, not tuples",{"type":993,"tag":1512,"props":2956,"children":2957},{},[2958],{"type":998,"value":2959},"Empty matches create empty lists",{"type":993,"tag":1609,"props":2961,"children":2963},{"id":2962},"rest-element-capture",[2964],{"type":998,"value":2965},"Rest Element Capture",{"type":993,"tag":1001,"props":2967,"children":2968},{},[2969],{"type":998,"value":2970},"Collecting remaining tuple elements into a list using star expressions.",{"type":993,"tag":1007,"props":2972,"children":2973},{},[2974],{"type":993,"tag":1011,"props":2975,"children":2977},{"className":1013,"code":2976,"language":6,"meta":8,"style":8},"# Capturing rest elements\nnumbers = (1, 2, 3, 4, 5, 6)\nfirst, *rest = numbers\nprint(f\"First: {first}\")\nprint(f\"Rest: {rest}\")\n\n# Capture beginning and end\ndata = (\"header\", \"item1\", \"item2\", \"item3\", \"footer\")\nheader, *items, footer = data\nprint(f\"Header: {header}\")\nprint(f\"Items: {items}\")\nprint(f\"Footer: {footer}\")\n",[2978],{"type":993,"tag":1017,"props":2979,"children":2980},{"__ignoreMap":8},[2981,2989,3058,3085,3125,3166,3173,3181,3242,3268,3309,3350],{"type":993,"tag":1021,"props":2982,"children":2983},{"class":1023,"line":12},[2984],{"type":993,"tag":1021,"props":2985,"children":2986},{"style":1027},[2987],{"type":998,"value":2988},"# Capturing rest elements\n",{"type":993,"tag":1021,"props":2990,"children":2991},{"class":1023,"line":27},[2992,2997,3001,3005,3010,3014,3018,3022,3027,3031,3036,3040,3045,3049,3054],{"type":993,"tag":1021,"props":2993,"children":2994},{"style":1036},[2995],{"type":998,"value":2996},"numbers ",{"type":993,"tag":1021,"props":2998,"children":2999},{"style":1042},[3000],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3002,"children":3003},{"style":1036},[3004],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3006,"children":3007},{"style":1053},[3008],{"type":998,"value":3009},"1",{"type":993,"tag":1021,"props":3011,"children":3012},{"style":1036},[3013],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3015,"children":3016},{"style":1053},[3017],{"type":998,"value":2098},{"type":993,"tag":1021,"props":3019,"children":3020},{"style":1036},[3021],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3023,"children":3024},{"style":1053},[3025],{"type":998,"value":3026},"3",{"type":993,"tag":1021,"props":3028,"children":3029},{"style":1036},[3030],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3032,"children":3033},{"style":1053},[3034],{"type":998,"value":3035},"4",{"type":993,"tag":1021,"props":3037,"children":3038},{"style":1036},[3039],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3041,"children":3042},{"style":1053},[3043],{"type":998,"value":3044},"5",{"type":993,"tag":1021,"props":3046,"children":3047},{"style":1036},[3048],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3050,"children":3051},{"style":1053},[3052],{"type":998,"value":3053},"6",{"type":993,"tag":1021,"props":3055,"children":3056},{"style":1036},[3057],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3059,"children":3060},{"class":1023,"line":36},[3061,3066,3071,3076,3080],{"type":993,"tag":1021,"props":3062,"children":3063},{"style":1036},[3064],{"type":998,"value":3065},"first, ",{"type":993,"tag":1021,"props":3067,"children":3068},{"style":1042},[3069],{"type":998,"value":3070},"*",{"type":993,"tag":1021,"props":3072,"children":3073},{"style":1036},[3074],{"type":998,"value":3075},"rest ",{"type":993,"tag":1021,"props":3077,"children":3078},{"style":1042},[3079],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3081,"children":3082},{"style":1036},[3083],{"type":998,"value":3084}," numbers\n",{"type":993,"tag":1021,"props":3086,"children":3087},{"class":1023,"line":45},[3088,3092,3096,3100,3105,3109,3113,3117,3121],{"type":993,"tag":1021,"props":3089,"children":3090},{"style":1053},[3091],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3093,"children":3094},{"style":1036},[3095],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3097,"children":3098},{"style":1042},[3099],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3101,"children":3102},{"style":1115},[3103],{"type":998,"value":3104},"\"First: ",{"type":993,"tag":1021,"props":3106,"children":3107},{"style":1053},[3108],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3110,"children":3111},{"style":1036},[3112],{"type":998,"value":2169},{"type":993,"tag":1021,"props":3114,"children":3115},{"style":1053},[3116],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3118,"children":3119},{"style":1115},[3120],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3122,"children":3123},{"style":1036},[3124],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3126,"children":3127},{"class":1023,"line":54},[3128,3132,3136,3140,3145,3149,3154,3158,3162],{"type":993,"tag":1021,"props":3129,"children":3130},{"style":1053},[3131],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3133,"children":3134},{"style":1036},[3135],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3137,"children":3138},{"style":1042},[3139],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3141,"children":3142},{"style":1115},[3143],{"type":998,"value":3144},"\"Rest: ",{"type":993,"tag":1021,"props":3146,"children":3147},{"style":1053},[3148],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3150,"children":3151},{"style":1036},[3152],{"type":998,"value":3153},"rest",{"type":993,"tag":1021,"props":3155,"children":3156},{"style":1053},[3157],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3159,"children":3160},{"style":1115},[3161],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3163,"children":3164},{"style":1036},[3165],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3167,"children":3168},{"class":1023,"line":63},[3169],{"type":993,"tag":1021,"props":3170,"children":3171},{"emptyLinePlaceholder":13},[3172],{"type":998,"value":1096},{"type":993,"tag":1021,"props":3174,"children":3175},{"class":1023,"line":72},[3176],{"type":993,"tag":1021,"props":3177,"children":3178},{"style":1027},[3179],{"type":998,"value":3180},"# Capture beginning and end\n",{"type":993,"tag":1021,"props":3182,"children":3183},{"class":1023,"line":81},[3184,3189,3193,3197,3202,3206,3211,3215,3220,3224,3229,3233,3238],{"type":993,"tag":1021,"props":3185,"children":3186},{"style":1036},[3187],{"type":998,"value":3188},"data ",{"type":993,"tag":1021,"props":3190,"children":3191},{"style":1042},[3192],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3194,"children":3195},{"style":1036},[3196],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3198,"children":3199},{"style":1115},[3200],{"type":998,"value":3201},"\"header\"",{"type":993,"tag":1021,"props":3203,"children":3204},{"style":1036},[3205],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3207,"children":3208},{"style":1115},[3209],{"type":998,"value":3210},"\"item1\"",{"type":993,"tag":1021,"props":3212,"children":3213},{"style":1036},[3214],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3216,"children":3217},{"style":1115},[3218],{"type":998,"value":3219},"\"item2\"",{"type":993,"tag":1021,"props":3221,"children":3222},{"style":1036},[3223],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3225,"children":3226},{"style":1115},[3227],{"type":998,"value":3228},"\"item3\"",{"type":993,"tag":1021,"props":3230,"children":3231},{"style":1036},[3232],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3234,"children":3235},{"style":1115},[3236],{"type":998,"value":3237},"\"footer\"",{"type":993,"tag":1021,"props":3239,"children":3240},{"style":1036},[3241],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3243,"children":3244},{"class":1023,"line":91},[3245,3250,3254,3259,3263],{"type":993,"tag":1021,"props":3246,"children":3247},{"style":1036},[3248],{"type":998,"value":3249},"header, ",{"type":993,"tag":1021,"props":3251,"children":3252},{"style":1042},[3253],{"type":998,"value":3070},{"type":993,"tag":1021,"props":3255,"children":3256},{"style":1036},[3257],{"type":998,"value":3258},"items, footer ",{"type":993,"tag":1021,"props":3260,"children":3261},{"style":1042},[3262],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3264,"children":3265},{"style":1036},[3266],{"type":998,"value":3267}," data\n",{"type":993,"tag":1021,"props":3269,"children":3270},{"class":1023,"line":100},[3271,3275,3279,3283,3288,3292,3297,3301,3305],{"type":993,"tag":1021,"props":3272,"children":3273},{"style":1053},[3274],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3276,"children":3277},{"style":1036},[3278],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3280,"children":3281},{"style":1042},[3282],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3284,"children":3285},{"style":1115},[3286],{"type":998,"value":3287},"\"Header: ",{"type":993,"tag":1021,"props":3289,"children":3290},{"style":1053},[3291],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3293,"children":3294},{"style":1036},[3295],{"type":998,"value":3296},"header",{"type":993,"tag":1021,"props":3298,"children":3299},{"style":1053},[3300],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3302,"children":3303},{"style":1115},[3304],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3306,"children":3307},{"style":1036},[3308],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3310,"children":3311},{"class":1023,"line":109},[3312,3316,3320,3324,3329,3333,3338,3342,3346],{"type":993,"tag":1021,"props":3313,"children":3314},{"style":1053},[3315],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3317,"children":3318},{"style":1036},[3319],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3321,"children":3322},{"style":1042},[3323],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3325,"children":3326},{"style":1115},[3327],{"type":998,"value":3328},"\"Items: ",{"type":993,"tag":1021,"props":3330,"children":3331},{"style":1053},[3332],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3334,"children":3335},{"style":1036},[3336],{"type":998,"value":3337},"items",{"type":993,"tag":1021,"props":3339,"children":3340},{"style":1053},[3341],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3343,"children":3344},{"style":1115},[3345],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3347,"children":3348},{"style":1036},[3349],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3351,"children":3352},{"class":1023,"line":118},[3353,3357,3361,3365,3370,3374,3379,3383,3387],{"type":993,"tag":1021,"props":3354,"children":3355},{"style":1053},[3356],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3358,"children":3359},{"style":1036},[3360],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3362,"children":3363},{"style":1042},[3364],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3366,"children":3367},{"style":1115},[3368],{"type":998,"value":3369},"\"Footer: ",{"type":993,"tag":1021,"props":3371,"children":3372},{"style":1053},[3373],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3375,"children":3376},{"style":1036},[3377],{"type":998,"value":3378},"footer",{"type":993,"tag":1021,"props":3380,"children":3381},{"style":1053},[3382],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3384,"children":3385},{"style":1115},[3386],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3388,"children":3389},{"style":1036},[3390],{"type":998,"value":1071},{"type":993,"tag":1609,"props":3392,"children":3394},{"id":3393},"selective-element-extraction",[3395],{"type":998,"value":3396},"Selective Element Extraction",{"type":993,"tag":1001,"props":3398,"children":3399},{},[3400],{"type":998,"value":3401},"Using star expressions to ignore unwanted elements and focus on specific data.",{"type":993,"tag":1007,"props":3403,"children":3404},{},[3405],{"type":993,"tag":1011,"props":3406,"children":3408},{"className":1013,"code":3407,"language":6,"meta":8,"style":8},"# Selective unpacking\nlog_entry = (\"2024-01-15\", \"14:30\", \"ERROR\", \"Database\", \"Connection failed\")\n\n# Extract date and message, ignore time and level details\ndate, _, _, *message_parts = log_entry\nmessage = \" \".join(message_parts)\n\nprint(f\"Date: {date}\")\nprint(f\"Message: {message}\")\n\n# Extract first and last, ignore middle\nscores = (95, 87, 92, 78, 88, 94)\nhighest, *_, lowest = sorted(scores, reverse=True)\nprint(f\"Highest: {highest}, Lowest: {lowest}\")\n",[3409],{"type":993,"tag":1017,"props":3410,"children":3411},{"__ignoreMap":8},[3412,3420,3481,3488,3496,3522,3544,3551,3592,3633,3640,3648,3718,3768],{"type":993,"tag":1021,"props":3413,"children":3414},{"class":1023,"line":12},[3415],{"type":993,"tag":1021,"props":3416,"children":3417},{"style":1027},[3418],{"type":998,"value":3419},"# Selective unpacking\n",{"type":993,"tag":1021,"props":3421,"children":3422},{"class":1023,"line":27},[3423,3428,3432,3436,3441,3445,3450,3454,3459,3463,3468,3472,3477],{"type":993,"tag":1021,"props":3424,"children":3425},{"style":1036},[3426],{"type":998,"value":3427},"log_entry ",{"type":993,"tag":1021,"props":3429,"children":3430},{"style":1042},[3431],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3433,"children":3434},{"style":1036},[3435],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3437,"children":3438},{"style":1115},[3439],{"type":998,"value":3440},"\"2024-01-15\"",{"type":993,"tag":1021,"props":3442,"children":3443},{"style":1036},[3444],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3446,"children":3447},{"style":1115},[3448],{"type":998,"value":3449},"\"14:30\"",{"type":993,"tag":1021,"props":3451,"children":3452},{"style":1036},[3453],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3455,"children":3456},{"style":1115},[3457],{"type":998,"value":3458},"\"ERROR\"",{"type":993,"tag":1021,"props":3460,"children":3461},{"style":1036},[3462],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3464,"children":3465},{"style":1115},[3466],{"type":998,"value":3467},"\"Database\"",{"type":993,"tag":1021,"props":3469,"children":3470},{"style":1036},[3471],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3473,"children":3474},{"style":1115},[3475],{"type":998,"value":3476},"\"Connection failed\"",{"type":993,"tag":1021,"props":3478,"children":3479},{"style":1036},[3480],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3482,"children":3483},{"class":1023,"line":36},[3484],{"type":993,"tag":1021,"props":3485,"children":3486},{"emptyLinePlaceholder":13},[3487],{"type":998,"value":1096},{"type":993,"tag":1021,"props":3489,"children":3490},{"class":1023,"line":45},[3491],{"type":993,"tag":1021,"props":3492,"children":3493},{"style":1027},[3494],{"type":998,"value":3495},"# Extract date and message, ignore time and level details\n",{"type":993,"tag":1021,"props":3497,"children":3498},{"class":1023,"line":54},[3499,3504,3508,3513,3517],{"type":993,"tag":1021,"props":3500,"children":3501},{"style":1036},[3502],{"type":998,"value":3503},"date, _, _, ",{"type":993,"tag":1021,"props":3505,"children":3506},{"style":1042},[3507],{"type":998,"value":3070},{"type":993,"tag":1021,"props":3509,"children":3510},{"style":1036},[3511],{"type":998,"value":3512},"message_parts ",{"type":993,"tag":1021,"props":3514,"children":3515},{"style":1042},[3516],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3518,"children":3519},{"style":1036},[3520],{"type":998,"value":3521}," log_entry\n",{"type":993,"tag":1021,"props":3523,"children":3524},{"class":1023,"line":63},[3525,3530,3534,3539],{"type":993,"tag":1021,"props":3526,"children":3527},{"style":1036},[3528],{"type":998,"value":3529},"message ",{"type":993,"tag":1021,"props":3531,"children":3532},{"style":1042},[3533],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3535,"children":3536},{"style":1115},[3537],{"type":998,"value":3538}," \" \"",{"type":993,"tag":1021,"props":3540,"children":3541},{"style":1036},[3542],{"type":998,"value":3543},".join(message_parts)\n",{"type":993,"tag":1021,"props":3545,"children":3546},{"class":1023,"line":72},[3547],{"type":993,"tag":1021,"props":3548,"children":3549},{"emptyLinePlaceholder":13},[3550],{"type":998,"value":1096},{"type":993,"tag":1021,"props":3552,"children":3553},{"class":1023,"line":81},[3554,3558,3562,3566,3571,3575,3580,3584,3588],{"type":993,"tag":1021,"props":3555,"children":3556},{"style":1053},[3557],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3559,"children":3560},{"style":1036},[3561],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3563,"children":3564},{"style":1042},[3565],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3567,"children":3568},{"style":1115},[3569],{"type":998,"value":3570},"\"Date: ",{"type":993,"tag":1021,"props":3572,"children":3573},{"style":1053},[3574],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3576,"children":3577},{"style":1036},[3578],{"type":998,"value":3579},"date",{"type":993,"tag":1021,"props":3581,"children":3582},{"style":1053},[3583],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3585,"children":3586},{"style":1115},[3587],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3589,"children":3590},{"style":1036},[3591],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3593,"children":3594},{"class":1023,"line":91},[3595,3599,3603,3607,3612,3616,3621,3625,3629],{"type":993,"tag":1021,"props":3596,"children":3597},{"style":1053},[3598],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3600,"children":3601},{"style":1036},[3602],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3604,"children":3605},{"style":1042},[3606],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3608,"children":3609},{"style":1115},[3610],{"type":998,"value":3611},"\"Message: ",{"type":993,"tag":1021,"props":3613,"children":3614},{"style":1053},[3615],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3617,"children":3618},{"style":1036},[3619],{"type":998,"value":3620},"message",{"type":993,"tag":1021,"props":3622,"children":3623},{"style":1053},[3624],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3626,"children":3627},{"style":1115},[3628],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3630,"children":3631},{"style":1036},[3632],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3634,"children":3635},{"class":1023,"line":100},[3636],{"type":993,"tag":1021,"props":3637,"children":3638},{"emptyLinePlaceholder":13},[3639],{"type":998,"value":1096},{"type":993,"tag":1021,"props":3641,"children":3642},{"class":1023,"line":109},[3643],{"type":993,"tag":1021,"props":3644,"children":3645},{"style":1027},[3646],{"type":998,"value":3647},"# Extract first and last, ignore middle\n",{"type":993,"tag":1021,"props":3649,"children":3650},{"class":1023,"line":118},[3651,3656,3660,3664,3669,3673,3678,3682,3687,3691,3696,3700,3705,3709,3714],{"type":993,"tag":1021,"props":3652,"children":3653},{"style":1036},[3654],{"type":998,"value":3655},"scores ",{"type":993,"tag":1021,"props":3657,"children":3658},{"style":1042},[3659],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3661,"children":3662},{"style":1036},[3663],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3665,"children":3666},{"style":1053},[3667],{"type":998,"value":3668},"95",{"type":993,"tag":1021,"props":3670,"children":3671},{"style":1036},[3672],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3674,"children":3675},{"style":1053},[3676],{"type":998,"value":3677},"87",{"type":993,"tag":1021,"props":3679,"children":3680},{"style":1036},[3681],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3683,"children":3684},{"style":1053},[3685],{"type":998,"value":3686},"92",{"type":993,"tag":1021,"props":3688,"children":3689},{"style":1036},[3690],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3692,"children":3693},{"style":1053},[3694],{"type":998,"value":3695},"78",{"type":993,"tag":1021,"props":3697,"children":3698},{"style":1036},[3699],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3701,"children":3702},{"style":1053},[3703],{"type":998,"value":3704},"88",{"type":993,"tag":1021,"props":3706,"children":3707},{"style":1036},[3708],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3710,"children":3711},{"style":1053},[3712],{"type":998,"value":3713},"94",{"type":993,"tag":1021,"props":3715,"children":3716},{"style":1036},[3717],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3719,"children":3720},{"class":1023,"line":127},[3721,3726,3730,3735,3739,3744,3749,3755,3759,3764],{"type":993,"tag":1021,"props":3722,"children":3723},{"style":1036},[3724],{"type":998,"value":3725},"highest, ",{"type":993,"tag":1021,"props":3727,"children":3728},{"style":1042},[3729],{"type":998,"value":3070},{"type":993,"tag":1021,"props":3731,"children":3732},{"style":1036},[3733],{"type":998,"value":3734},"_, lowest ",{"type":993,"tag":1021,"props":3736,"children":3737},{"style":1042},[3738],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3740,"children":3741},{"style":1053},[3742],{"type":998,"value":3743}," sorted",{"type":993,"tag":1021,"props":3745,"children":3746},{"style":1036},[3747],{"type":998,"value":3748},"(scores, ",{"type":993,"tag":1021,"props":3750,"children":3752},{"style":3751},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[3753],{"type":998,"value":3754},"reverse",{"type":993,"tag":1021,"props":3756,"children":3757},{"style":1042},[3758],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3760,"children":3761},{"style":1053},[3762],{"type":998,"value":3763},"True",{"type":993,"tag":1021,"props":3765,"children":3766},{"style":1036},[3767],{"type":998,"value":1071},{"type":993,"tag":1021,"props":3769,"children":3770},{"class":1023,"line":136},[3771,3775,3779,3783,3788,3792,3797,3801,3806,3810,3815,3819,3823],{"type":993,"tag":1021,"props":3772,"children":3773},{"style":1053},[3774],{"type":998,"value":1172},{"type":993,"tag":1021,"props":3776,"children":3777},{"style":1036},[3778],{"type":998,"value":1177},{"type":993,"tag":1021,"props":3780,"children":3781},{"style":1042},[3782],{"type":998,"value":1182},{"type":993,"tag":1021,"props":3784,"children":3785},{"style":1115},[3786],{"type":998,"value":3787},"\"Highest: ",{"type":993,"tag":1021,"props":3789,"children":3790},{"style":1053},[3791],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3793,"children":3794},{"style":1036},[3795],{"type":998,"value":3796},"highest",{"type":993,"tag":1021,"props":3798,"children":3799},{"style":1053},[3800],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3802,"children":3803},{"style":1115},[3804],{"type":998,"value":3805},", Lowest: ",{"type":993,"tag":1021,"props":3807,"children":3808},{"style":1053},[3809],{"type":998,"value":1192},{"type":993,"tag":1021,"props":3811,"children":3812},{"style":1036},[3813],{"type":998,"value":3814},"lowest",{"type":993,"tag":1021,"props":3816,"children":3817},{"style":1053},[3818],{"type":998,"value":1202},{"type":993,"tag":1021,"props":3820,"children":3821},{"style":1115},[3822],{"type":998,"value":1225},{"type":993,"tag":1021,"props":3824,"children":3825},{"style":1036},[3826],{"type":998,"value":1071},{"type":993,"tag":1609,"props":3828,"children":3830},{"id":3829},"nested-unpacking",[3831],{"type":998,"value":3832},"Nested Unpacking",{"type":993,"tag":1001,"props":3834,"children":3835},{},[3836],{"type":998,"value":3837},"Unpacking nested tuple structures in single operations for complex data extraction.",{"type":993,"tag":1007,"props":3839,"children":3840},{},[3841],{"type":993,"tag":1011,"props":3842,"children":3844},{"className":1013,"code":3843,"language":6,"meta":8,"style":8},"# Nested unpacking\nline = ((0, 0), (10, 5))\n(x1, y1), (x2, y2) = line\n\ntriangle = ((0, 0), (5, 0), (2.5, 4.33))\npoint1, point2, point3 = triangle\n\nprint(f\"Line: from ({x1}, {y1}) to ({x2}, {y2})\")\nprint(f\"Triangle points: {point1}, {point2}, {point3}\")\n\n# Mixed nested unpacking\nuser_data = (\"Alice\", (25, \"Engineer\"), [\"Python\", \"JavaScript\"])\nname, (age, job), skills = user_data\nprint(f\"User: {name}, {age}, {job}, skills: {skills}\")\n",[3845],{"type":993,"tag":1017,"props":3846,"children":3847},{"__ignoreMap":8},[3848,3856,3906,3923,3930,3996,4013,4020,4113,4188,4195,4203,4264,4281],{"type":993,"tag":1021,"props":3849,"children":3850},{"class":1023,"line":12},[3851],{"type":993,"tag":1021,"props":3852,"children":3853},{"style":1027},[3854],{"type":998,"value":3855},"# Nested unpacking\n",{"type":993,"tag":1021,"props":3857,"children":3858},{"class":1023,"line":27},[3859,3864,3868,3873,3877,3881,3885,3889,3893,3897,3901],{"type":993,"tag":1021,"props":3860,"children":3861},{"style":1036},[3862],{"type":998,"value":3863},"line ",{"type":993,"tag":1021,"props":3865,"children":3866},{"style":1042},[3867],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3869,"children":3870},{"style":1036},[3871],{"type":998,"value":3872}," ((",{"type":993,"tag":1021,"props":3874,"children":3875},{"style":1053},[3876],{"type":998,"value":1676},{"type":993,"tag":1021,"props":3878,"children":3879},{"style":1036},[3880],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3882,"children":3883},{"style":1053},[3884],{"type":998,"value":1676},{"type":993,"tag":1021,"props":3886,"children":3887},{"style":1036},[3888],{"type":998,"value":2321},{"type":993,"tag":1021,"props":3890,"children":3891},{"style":1053},[3892],{"type":998,"value":1056},{"type":993,"tag":1021,"props":3894,"children":3895},{"style":1036},[3896],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3898,"children":3899},{"style":1053},[3900],{"type":998,"value":3044},{"type":993,"tag":1021,"props":3902,"children":3903},{"style":1036},[3904],{"type":998,"value":3905},"))\n",{"type":993,"tag":1021,"props":3907,"children":3908},{"class":1023,"line":36},[3909,3914,3918],{"type":993,"tag":1021,"props":3910,"children":3911},{"style":1036},[3912],{"type":998,"value":3913},"(x1, y1), (x2, y2) ",{"type":993,"tag":1021,"props":3915,"children":3916},{"style":1042},[3917],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3919,"children":3920},{"style":1036},[3921],{"type":998,"value":3922}," line\n",{"type":993,"tag":1021,"props":3924,"children":3925},{"class":1023,"line":45},[3926],{"type":993,"tag":1021,"props":3927,"children":3928},{"emptyLinePlaceholder":13},[3929],{"type":998,"value":1096},{"type":993,"tag":1021,"props":3931,"children":3932},{"class":1023,"line":54},[3933,3938,3942,3946,3950,3954,3958,3962,3966,3970,3974,3978,3983,3987,3992],{"type":993,"tag":1021,"props":3934,"children":3935},{"style":1036},[3936],{"type":998,"value":3937},"triangle ",{"type":993,"tag":1021,"props":3939,"children":3940},{"style":1042},[3941],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3943,"children":3944},{"style":1036},[3945],{"type":998,"value":3872},{"type":993,"tag":1021,"props":3947,"children":3948},{"style":1053},[3949],{"type":998,"value":1676},{"type":993,"tag":1021,"props":3951,"children":3952},{"style":1036},[3953],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3955,"children":3956},{"style":1053},[3957],{"type":998,"value":1676},{"type":993,"tag":1021,"props":3959,"children":3960},{"style":1036},[3961],{"type":998,"value":2321},{"type":993,"tag":1021,"props":3963,"children":3964},{"style":1053},[3965],{"type":998,"value":3044},{"type":993,"tag":1021,"props":3967,"children":3968},{"style":1036},[3969],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3971,"children":3972},{"style":1053},[3973],{"type":998,"value":1676},{"type":993,"tag":1021,"props":3975,"children":3976},{"style":1036},[3977],{"type":998,"value":2321},{"type":993,"tag":1021,"props":3979,"children":3980},{"style":1053},[3981],{"type":998,"value":3982},"2.5",{"type":993,"tag":1021,"props":3984,"children":3985},{"style":1036},[3986],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3988,"children":3989},{"style":1053},[3990],{"type":998,"value":3991},"4.33",{"type":993,"tag":1021,"props":3993,"children":3994},{"style":1036},[3995],{"type":998,"value":3905},{"type":993,"tag":1021,"props":3997,"children":3998},{"class":1023,"line":63},[3999,4004,4008],{"type":993,"tag":1021,"props":4000,"children":4001},{"style":1036},[4002],{"type":998,"value":4003},"point1, point2, point3 ",{"type":993,"tag":1021,"props":4005,"children":4006},{"style":1042},[4007],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4009,"children":4010},{"style":1036},[4011],{"type":998,"value":4012}," triangle\n",{"type":993,"tag":1021,"props":4014,"children":4015},{"class":1023,"line":72},[4016],{"type":993,"tag":1021,"props":4017,"children":4018},{"emptyLinePlaceholder":13},[4019],{"type":998,"value":1096},{"type":993,"tag":1021,"props":4021,"children":4022},{"class":1023,"line":81},[4023,4027,4031,4035,4040,4044,4049,4053,4057,4061,4066,4070,4075,4079,4084,4088,4092,4096,4101,4105,4109],{"type":993,"tag":1021,"props":4024,"children":4025},{"style":1053},[4026],{"type":998,"value":1172},{"type":993,"tag":1021,"props":4028,"children":4029},{"style":1036},[4030],{"type":998,"value":1177},{"type":993,"tag":1021,"props":4032,"children":4033},{"style":1042},[4034],{"type":998,"value":1182},{"type":993,"tag":1021,"props":4036,"children":4037},{"style":1115},[4038],{"type":998,"value":4039},"\"Line: from (",{"type":993,"tag":1021,"props":4041,"children":4042},{"style":1053},[4043],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4045,"children":4046},{"style":1036},[4047],{"type":998,"value":4048},"x1",{"type":993,"tag":1021,"props":4050,"children":4051},{"style":1053},[4052],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4054,"children":4055},{"style":1115},[4056],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4058,"children":4059},{"style":1053},[4060],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4062,"children":4063},{"style":1036},[4064],{"type":998,"value":4065},"y1",{"type":993,"tag":1021,"props":4067,"children":4068},{"style":1053},[4069],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4071,"children":4072},{"style":1115},[4073],{"type":998,"value":4074},") to (",{"type":993,"tag":1021,"props":4076,"children":4077},{"style":1053},[4078],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4080,"children":4081},{"style":1036},[4082],{"type":998,"value":4083},"x2",{"type":993,"tag":1021,"props":4085,"children":4086},{"style":1053},[4087],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4089,"children":4090},{"style":1115},[4091],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4093,"children":4094},{"style":1053},[4095],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4097,"children":4098},{"style":1036},[4099],{"type":998,"value":4100},"y2",{"type":993,"tag":1021,"props":4102,"children":4103},{"style":1053},[4104],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4106,"children":4107},{"style":1115},[4108],{"type":998,"value":1957},{"type":993,"tag":1021,"props":4110,"children":4111},{"style":1036},[4112],{"type":998,"value":1071},{"type":993,"tag":1021,"props":4114,"children":4115},{"class":1023,"line":91},[4116,4120,4124,4128,4133,4137,4142,4146,4150,4154,4159,4163,4167,4171,4176,4180,4184],{"type":993,"tag":1021,"props":4117,"children":4118},{"style":1053},[4119],{"type":998,"value":1172},{"type":993,"tag":1021,"props":4121,"children":4122},{"style":1036},[4123],{"type":998,"value":1177},{"type":993,"tag":1021,"props":4125,"children":4126},{"style":1042},[4127],{"type":998,"value":1182},{"type":993,"tag":1021,"props":4129,"children":4130},{"style":1115},[4131],{"type":998,"value":4132},"\"Triangle points: ",{"type":993,"tag":1021,"props":4134,"children":4135},{"style":1053},[4136],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4138,"children":4139},{"style":1036},[4140],{"type":998,"value":4141},"point1",{"type":993,"tag":1021,"props":4143,"children":4144},{"style":1053},[4145],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4147,"children":4148},{"style":1115},[4149],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4151,"children":4152},{"style":1053},[4153],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4155,"children":4156},{"style":1036},[4157],{"type":998,"value":4158},"point2",{"type":993,"tag":1021,"props":4160,"children":4161},{"style":1053},[4162],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4164,"children":4165},{"style":1115},[4166],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4168,"children":4169},{"style":1053},[4170],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4172,"children":4173},{"style":1036},[4174],{"type":998,"value":4175},"point3",{"type":993,"tag":1021,"props":4177,"children":4178},{"style":1053},[4179],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4181,"children":4182},{"style":1115},[4183],{"type":998,"value":1225},{"type":993,"tag":1021,"props":4185,"children":4186},{"style":1036},[4187],{"type":998,"value":1071},{"type":993,"tag":1021,"props":4189,"children":4190},{"class":1023,"line":100},[4191],{"type":993,"tag":1021,"props":4192,"children":4193},{"emptyLinePlaceholder":13},[4194],{"type":998,"value":1096},{"type":993,"tag":1021,"props":4196,"children":4197},{"class":1023,"line":109},[4198],{"type":993,"tag":1021,"props":4199,"children":4200},{"style":1027},[4201],{"type":998,"value":4202},"# Mixed nested unpacking\n",{"type":993,"tag":1021,"props":4204,"children":4205},{"class":1023,"line":118},[4206,4211,4215,4219,4223,4228,4232,4236,4240,4245,4250,4254,4259],{"type":993,"tag":1021,"props":4207,"children":4208},{"style":1036},[4209],{"type":998,"value":4210},"user_data ",{"type":993,"tag":1021,"props":4212,"children":4213},{"style":1042},[4214],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4216,"children":4217},{"style":1036},[4218],{"type":998,"value":1050},{"type":993,"tag":1021,"props":4220,"children":4221},{"style":1115},[4222],{"type":998,"value":1118},{"type":993,"tag":1021,"props":4224,"children":4225},{"style":1036},[4226],{"type":998,"value":4227},", (",{"type":993,"tag":1021,"props":4229,"children":4230},{"style":1053},[4231],{"type":998,"value":1127},{"type":993,"tag":1021,"props":4233,"children":4234},{"style":1036},[4235],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4237,"children":4238},{"style":1115},[4239],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4241,"children":4242},{"style":1036},[4243],{"type":998,"value":4244},"), [",{"type":993,"tag":1021,"props":4246,"children":4247},{"style":1115},[4248],{"type":998,"value":4249},"\"Python\"",{"type":993,"tag":1021,"props":4251,"children":4252},{"style":1036},[4253],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4255,"children":4256},{"style":1115},[4257],{"type":998,"value":4258},"\"JavaScript\"",{"type":993,"tag":1021,"props":4260,"children":4261},{"style":1036},[4262],{"type":998,"value":4263},"])\n",{"type":993,"tag":1021,"props":4265,"children":4266},{"class":1023,"line":127},[4267,4272,4276],{"type":993,"tag":1021,"props":4268,"children":4269},{"style":1036},[4270],{"type":998,"value":4271},"name, (age, job), skills ",{"type":993,"tag":1021,"props":4273,"children":4274},{"style":1042},[4275],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4277,"children":4278},{"style":1036},[4279],{"type":998,"value":4280}," user_data\n",{"type":993,"tag":1021,"props":4282,"children":4283},{"class":1023,"line":136},[4284,4288,4292,4296,4301,4305,4309,4313,4317,4321,4325,4329,4333,4337,4341,4345,4350,4354,4359,4363,4367],{"type":993,"tag":1021,"props":4285,"children":4286},{"style":1053},[4287],{"type":998,"value":1172},{"type":993,"tag":1021,"props":4289,"children":4290},{"style":1036},[4291],{"type":998,"value":1177},{"type":993,"tag":1021,"props":4293,"children":4294},{"style":1042},[4295],{"type":998,"value":1182},{"type":993,"tag":1021,"props":4297,"children":4298},{"style":1115},[4299],{"type":998,"value":4300},"\"User: ",{"type":993,"tag":1021,"props":4302,"children":4303},{"style":1053},[4304],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4306,"children":4307},{"style":1036},[4308],{"type":998,"value":1258},{"type":993,"tag":1021,"props":4310,"children":4311},{"style":1053},[4312],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4314,"children":4315},{"style":1115},[4316],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4318,"children":4319},{"style":1053},[4320],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4322,"children":4323},{"style":1036},[4324],{"type":998,"value":1276},{"type":993,"tag":1021,"props":4326,"children":4327},{"style":1053},[4328],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4330,"children":4331},{"style":1115},[4332],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4334,"children":4335},{"style":1053},[4336],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4338,"children":4339},{"style":1036},[4340],{"type":998,"value":1294},{"type":993,"tag":1021,"props":4342,"children":4343},{"style":1053},[4344],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4346,"children":4347},{"style":1115},[4348],{"type":998,"value":4349},", skills: ",{"type":993,"tag":1021,"props":4351,"children":4352},{"style":1053},[4353],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4355,"children":4356},{"style":1036},[4357],{"type":998,"value":4358},"skills",{"type":993,"tag":1021,"props":4360,"children":4361},{"style":1053},[4362],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4364,"children":4365},{"style":1115},[4366],{"type":998,"value":1225},{"type":993,"tag":1021,"props":4368,"children":4369},{"style":1036},[4370],{"type":998,"value":1071},{"type":993,"tag":4372,"props":4373,"children":4375},"content-exercise",{":widget-view":4374,"category":6,"id":410},"true",[],{"type":993,"tag":1480,"props":4377,"children":4379},{"id":4378},"function-returns-and-unpacking",[4380],{"type":998,"value":4381},"🔄 Function Returns and Unpacking",{"type":993,"tag":1001,"props":4383,"children":4384},{},[4385],{"type":998,"value":4386},"Tuple unpacking is particularly powerful with functions that return multiple values. This pattern enables clean, readable code when functions need to return several related pieces of information.",{"type":993,"tag":1492,"props":4388,"children":4391},{"emoji":4389,"title":4390,"type":1496},"🔄","Function Return Unpacking",[4392,4400,4423,4431,4454,4462],{"type":993,"tag":1001,"props":4393,"children":4394},{},[4395],{"type":993,"tag":1502,"props":4396,"children":4397},{},[4398],{"type":998,"value":4399},"Multiple Return Values:",{"type":993,"tag":1508,"props":4401,"children":4402},{},[4403,4408,4413,4418],{"type":993,"tag":1512,"props":4404,"children":4405},{},[4406],{"type":998,"value":4407},"Functions can return tuples implicitly",{"type":993,"tag":1512,"props":4409,"children":4410},{},[4411],{"type":998,"value":4412},"Unpacking makes multiple returns elegant",{"type":993,"tag":1512,"props":4414,"children":4415},{},[4416],{"type":998,"value":4417},"Common pattern for status codes and results",{"type":993,"tag":1512,"props":4419,"children":4420},{},[4421],{"type":998,"value":4422},"Cleaner than returning dictionaries for simple cases",{"type":993,"tag":1001,"props":4424,"children":4425},{},[4426],{"type":993,"tag":1502,"props":4427,"children":4428},{},[4429],{"type":998,"value":4430},"Best Practices:",{"type":993,"tag":1508,"props":4432,"children":4433},{},[4434,4439,4444,4449],{"type":993,"tag":1512,"props":4435,"children":4436},{},[4437],{"type":998,"value":4438},"Document what each return value represents",{"type":993,"tag":1512,"props":4440,"children":4441},{},[4442],{"type":998,"value":4443},"Use consistent ordering across similar functions",{"type":993,"tag":1512,"props":4445,"children":4446},{},[4447],{"type":998,"value":4448},"Consider named tuples for complex returns",{"type":993,"tag":1512,"props":4450,"children":4451},{},[4452],{"type":998,"value":4453},"Keep return count reasonable (2-4 values typically)",{"type":993,"tag":1001,"props":4455,"children":4456},{},[4457],{"type":993,"tag":1502,"props":4458,"children":4459},{},[4460],{"type":998,"value":4461},"Error Handling:",{"type":993,"tag":1508,"props":4463,"children":4464},{},[4465,4470],{"type":993,"tag":1512,"props":4466,"children":4467},{},[4468],{"type":998,"value":4469},"Validate return value count matches unpacking",{"type":993,"tag":1512,"props":4471,"children":4472},{},[4473],{"type":998,"value":4474},"Use star expressions for flexible returns",{"type":993,"tag":1609,"props":4476,"children":4478},{"id":4477},"function-multiple-returns",[4479],{"type":998,"value":4480},"Function Multiple Returns",{"type":993,"tag":1001,"props":4482,"children":4483},{},[4484],{"type":998,"value":4485},"Functions returning multiple values through tuple packing and unpacking.",{"type":993,"tag":1007,"props":4487,"children":4488},{},[4489],{"type":993,"tag":1011,"props":4490,"children":4492},{"className":1013,"code":4491,"language":6,"meta":8,"style":8},"# Functions with multiple returns\ndef get_name_parts(full_name):\n    parts = full_name.split()\n    if len(parts) >= 2:\n        return parts[0], parts[-1]  # first, last\n    return parts[0], \"\"  # first only\n\ndef calculate_stats(numbers):\n    if not numbers:\n        return 0, 0, 0\n    total = sum(numbers)\n    count = len(numbers)\n    average = total / count\n    return total, count, average\n\n# Unpacking function returns\nfirst_name, last_name = get_name_parts(\"Alice Johnson\")\ntotal, count, avg = calculate_stats([85, 92, 78, 96, 88])\n\nprint(f\"Name: {first_name} {last_name}\")\nprint(f\"Stats: total={total}, count={count}, average={avg:.1f}\")\n",[4493],{"type":993,"tag":1017,"props":4494,"children":4495},{"__ignoreMap":8},[4496,4504,4523,4540,4573,4614,4645,4652,4669,4686,4715,4737,4757,4784,4796,4803,4811,4837,4896,4903,4958],{"type":993,"tag":1021,"props":4497,"children":4498},{"class":1023,"line":12},[4499],{"type":993,"tag":1021,"props":4500,"children":4501},{"style":1027},[4502],{"type":998,"value":4503},"# Functions with multiple returns\n",{"type":993,"tag":1021,"props":4505,"children":4506},{"class":1023,"line":27},[4507,4512,4518],{"type":993,"tag":1021,"props":4508,"children":4509},{"style":1042},[4510],{"type":998,"value":4511},"def",{"type":993,"tag":1021,"props":4513,"children":4515},{"style":4514},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[4516],{"type":998,"value":4517}," get_name_parts",{"type":993,"tag":1021,"props":4519,"children":4520},{"style":1036},[4521],{"type":998,"value":4522},"(full_name):\n",{"type":993,"tag":1021,"props":4524,"children":4525},{"class":1023,"line":36},[4526,4531,4535],{"type":993,"tag":1021,"props":4527,"children":4528},{"style":1036},[4529],{"type":998,"value":4530},"    parts ",{"type":993,"tag":1021,"props":4532,"children":4533},{"style":1042},[4534],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4536,"children":4537},{"style":1036},[4538],{"type":998,"value":4539}," full_name.split()\n",{"type":993,"tag":1021,"props":4541,"children":4542},{"class":1023,"line":45},[4543,4548,4553,4558,4563,4568],{"type":993,"tag":1021,"props":4544,"children":4545},{"style":1042},[4546],{"type":998,"value":4547},"    if",{"type":993,"tag":1021,"props":4549,"children":4550},{"style":1053},[4551],{"type":998,"value":4552}," len",{"type":993,"tag":1021,"props":4554,"children":4555},{"style":1036},[4556],{"type":998,"value":4557},"(parts) ",{"type":993,"tag":1021,"props":4559,"children":4560},{"style":1042},[4561],{"type":998,"value":4562},">=",{"type":993,"tag":1021,"props":4564,"children":4565},{"style":1053},[4566],{"type":998,"value":4567}," 2",{"type":993,"tag":1021,"props":4569,"children":4570},{"style":1036},[4571],{"type":998,"value":4572},":\n",{"type":993,"tag":1021,"props":4574,"children":4575},{"class":1023,"line":54},[4576,4581,4586,4590,4595,4600,4604,4609],{"type":993,"tag":1021,"props":4577,"children":4578},{"style":1042},[4579],{"type":998,"value":4580},"        return",{"type":993,"tag":1021,"props":4582,"children":4583},{"style":1036},[4584],{"type":998,"value":4585}," parts[",{"type":993,"tag":1021,"props":4587,"children":4588},{"style":1053},[4589],{"type":998,"value":1676},{"type":993,"tag":1021,"props":4591,"children":4592},{"style":1036},[4593],{"type":998,"value":4594},"], parts[",{"type":993,"tag":1021,"props":4596,"children":4597},{"style":1042},[4598],{"type":998,"value":4599},"-",{"type":993,"tag":1021,"props":4601,"children":4602},{"style":1053},[4603],{"type":998,"value":3009},{"type":993,"tag":1021,"props":4605,"children":4606},{"style":1036},[4607],{"type":998,"value":4608},"]  ",{"type":993,"tag":1021,"props":4610,"children":4611},{"style":1027},[4612],{"type":998,"value":4613},"# first, last\n",{"type":993,"tag":1021,"props":4615,"children":4616},{"class":1023,"line":63},[4617,4622,4626,4630,4635,4640],{"type":993,"tag":1021,"props":4618,"children":4619},{"style":1042},[4620],{"type":998,"value":4621},"    return",{"type":993,"tag":1021,"props":4623,"children":4624},{"style":1036},[4625],{"type":998,"value":4585},{"type":993,"tag":1021,"props":4627,"children":4628},{"style":1053},[4629],{"type":998,"value":1676},{"type":993,"tag":1021,"props":4631,"children":4632},{"style":1036},[4633],{"type":998,"value":4634},"], ",{"type":993,"tag":1021,"props":4636,"children":4637},{"style":1115},[4638],{"type":998,"value":4639},"\"\"",{"type":993,"tag":1021,"props":4641,"children":4642},{"style":1027},[4643],{"type":998,"value":4644},"  # first only\n",{"type":993,"tag":1021,"props":4646,"children":4647},{"class":1023,"line":72},[4648],{"type":993,"tag":1021,"props":4649,"children":4650},{"emptyLinePlaceholder":13},[4651],{"type":998,"value":1096},{"type":993,"tag":1021,"props":4653,"children":4654},{"class":1023,"line":81},[4655,4659,4664],{"type":993,"tag":1021,"props":4656,"children":4657},{"style":1042},[4658],{"type":998,"value":4511},{"type":993,"tag":1021,"props":4660,"children":4661},{"style":4514},[4662],{"type":998,"value":4663}," calculate_stats",{"type":993,"tag":1021,"props":4665,"children":4666},{"style":1036},[4667],{"type":998,"value":4668},"(numbers):\n",{"type":993,"tag":1021,"props":4670,"children":4671},{"class":1023,"line":91},[4672,4676,4681],{"type":993,"tag":1021,"props":4673,"children":4674},{"style":1042},[4675],{"type":998,"value":4547},{"type":993,"tag":1021,"props":4677,"children":4678},{"style":1042},[4679],{"type":998,"value":4680}," not",{"type":993,"tag":1021,"props":4682,"children":4683},{"style":1036},[4684],{"type":998,"value":4685}," numbers:\n",{"type":993,"tag":1021,"props":4687,"children":4688},{"class":1023,"line":100},[4689,4693,4698,4702,4706,4710],{"type":993,"tag":1021,"props":4690,"children":4691},{"style":1042},[4692],{"type":998,"value":4580},{"type":993,"tag":1021,"props":4694,"children":4695},{"style":1053},[4696],{"type":998,"value":4697}," 0",{"type":993,"tag":1021,"props":4699,"children":4700},{"style":1036},[4701],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4703,"children":4704},{"style":1053},[4705],{"type":998,"value":1676},{"type":993,"tag":1021,"props":4707,"children":4708},{"style":1036},[4709],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4711,"children":4712},{"style":1053},[4713],{"type":998,"value":4714},"0\n",{"type":993,"tag":1021,"props":4716,"children":4717},{"class":1023,"line":109},[4718,4723,4727,4732],{"type":993,"tag":1021,"props":4719,"children":4720},{"style":1036},[4721],{"type":998,"value":4722},"    total ",{"type":993,"tag":1021,"props":4724,"children":4725},{"style":1042},[4726],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4728,"children":4729},{"style":1053},[4730],{"type":998,"value":4731}," sum",{"type":993,"tag":1021,"props":4733,"children":4734},{"style":1036},[4735],{"type":998,"value":4736},"(numbers)\n",{"type":993,"tag":1021,"props":4738,"children":4739},{"class":1023,"line":118},[4740,4745,4749,4753],{"type":993,"tag":1021,"props":4741,"children":4742},{"style":1036},[4743],{"type":998,"value":4744},"    count ",{"type":993,"tag":1021,"props":4746,"children":4747},{"style":1042},[4748],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4750,"children":4751},{"style":1053},[4752],{"type":998,"value":4552},{"type":993,"tag":1021,"props":4754,"children":4755},{"style":1036},[4756],{"type":998,"value":4736},{"type":993,"tag":1021,"props":4758,"children":4759},{"class":1023,"line":127},[4760,4765,4769,4774,4779],{"type":993,"tag":1021,"props":4761,"children":4762},{"style":1036},[4763],{"type":998,"value":4764},"    average ",{"type":993,"tag":1021,"props":4766,"children":4767},{"style":1042},[4768],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4770,"children":4771},{"style":1036},[4772],{"type":998,"value":4773}," total ",{"type":993,"tag":1021,"props":4775,"children":4776},{"style":1042},[4777],{"type":998,"value":4778},"/",{"type":993,"tag":1021,"props":4780,"children":4781},{"style":1036},[4782],{"type":998,"value":4783}," count\n",{"type":993,"tag":1021,"props":4785,"children":4786},{"class":1023,"line":136},[4787,4791],{"type":993,"tag":1021,"props":4788,"children":4789},{"style":1042},[4790],{"type":998,"value":4621},{"type":993,"tag":1021,"props":4792,"children":4793},{"style":1036},[4794],{"type":998,"value":4795}," total, count, average\n",{"type":993,"tag":1021,"props":4797,"children":4798},{"class":1023,"line":146},[4799],{"type":993,"tag":1021,"props":4800,"children":4801},{"emptyLinePlaceholder":13},[4802],{"type":998,"value":1096},{"type":993,"tag":1021,"props":4804,"children":4805},{"class":1023,"line":155},[4806],{"type":993,"tag":1021,"props":4807,"children":4808},{"style":1027},[4809],{"type":998,"value":4810},"# Unpacking function returns\n",{"type":993,"tag":1021,"props":4812,"children":4813},{"class":1023,"line":164},[4814,4819,4823,4828,4833],{"type":993,"tag":1021,"props":4815,"children":4816},{"style":1036},[4817],{"type":998,"value":4818},"first_name, last_name ",{"type":993,"tag":1021,"props":4820,"children":4821},{"style":1042},[4822],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4824,"children":4825},{"style":1036},[4826],{"type":998,"value":4827}," get_name_parts(",{"type":993,"tag":1021,"props":4829,"children":4830},{"style":1115},[4831],{"type":998,"value":4832},"\"Alice Johnson\"",{"type":993,"tag":1021,"props":4834,"children":4835},{"style":1036},[4836],{"type":998,"value":1071},{"type":993,"tag":1021,"props":4838,"children":4839},{"class":1023,"line":173},[4840,4845,4849,4854,4859,4863,4867,4871,4875,4879,4884,4888,4892],{"type":993,"tag":1021,"props":4841,"children":4842},{"style":1036},[4843],{"type":998,"value":4844},"total, count, avg ",{"type":993,"tag":1021,"props":4846,"children":4847},{"style":1042},[4848],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4850,"children":4851},{"style":1036},[4852],{"type":998,"value":4853}," calculate_stats([",{"type":993,"tag":1021,"props":4855,"children":4856},{"style":1053},[4857],{"type":998,"value":4858},"85",{"type":993,"tag":1021,"props":4860,"children":4861},{"style":1036},[4862],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4864,"children":4865},{"style":1053},[4866],{"type":998,"value":3686},{"type":993,"tag":1021,"props":4868,"children":4869},{"style":1036},[4870],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4872,"children":4873},{"style":1053},[4874],{"type":998,"value":3695},{"type":993,"tag":1021,"props":4876,"children":4877},{"style":1036},[4878],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4880,"children":4881},{"style":1053},[4882],{"type":998,"value":4883},"96",{"type":993,"tag":1021,"props":4885,"children":4886},{"style":1036},[4887],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4889,"children":4890},{"style":1053},[4891],{"type":998,"value":3704},{"type":993,"tag":1021,"props":4893,"children":4894},{"style":1036},[4895],{"type":998,"value":4263},{"type":993,"tag":1021,"props":4897,"children":4898},{"class":1023,"line":182},[4899],{"type":993,"tag":1021,"props":4900,"children":4901},{"emptyLinePlaceholder":13},[4902],{"type":998,"value":1096},{"type":993,"tag":1021,"props":4904,"children":4905},{"class":1023,"line":191},[4906,4910,4914,4918,4923,4927,4932,4936,4941,4946,4950,4954],{"type":993,"tag":1021,"props":4907,"children":4908},{"style":1053},[4909],{"type":998,"value":1172},{"type":993,"tag":1021,"props":4911,"children":4912},{"style":1036},[4913],{"type":998,"value":1177},{"type":993,"tag":1021,"props":4915,"children":4916},{"style":1042},[4917],{"type":998,"value":1182},{"type":993,"tag":1021,"props":4919,"children":4920},{"style":1115},[4921],{"type":998,"value":4922},"\"Name: ",{"type":993,"tag":1021,"props":4924,"children":4925},{"style":1053},[4926],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4928,"children":4929},{"style":1036},[4930],{"type":998,"value":4931},"first_name",{"type":993,"tag":1021,"props":4933,"children":4934},{"style":1053},[4935],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4937,"children":4938},{"style":1053},[4939],{"type":998,"value":4940}," {",{"type":993,"tag":1021,"props":4942,"children":4943},{"style":1036},[4944],{"type":998,"value":4945},"last_name",{"type":993,"tag":1021,"props":4947,"children":4948},{"style":1053},[4949],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4951,"children":4952},{"style":1115},[4953],{"type":998,"value":1225},{"type":993,"tag":1021,"props":4955,"children":4956},{"style":1036},[4957],{"type":998,"value":1071},{"type":993,"tag":1021,"props":4959,"children":4960},{"class":1023,"line":201},[4961,4965,4969,4973,4978,4982,4987,4991,4996,5000,5005,5009,5014,5018,5023,5028,5032,5036],{"type":993,"tag":1021,"props":4962,"children":4963},{"style":1053},[4964],{"type":998,"value":1172},{"type":993,"tag":1021,"props":4966,"children":4967},{"style":1036},[4968],{"type":998,"value":1177},{"type":993,"tag":1021,"props":4970,"children":4971},{"style":1042},[4972],{"type":998,"value":1182},{"type":993,"tag":1021,"props":4974,"children":4975},{"style":1115},[4976],{"type":998,"value":4977},"\"Stats: total=",{"type":993,"tag":1021,"props":4979,"children":4980},{"style":1053},[4981],{"type":998,"value":1192},{"type":993,"tag":1021,"props":4983,"children":4984},{"style":1036},[4985],{"type":998,"value":4986},"total",{"type":993,"tag":1021,"props":4988,"children":4989},{"style":1053},[4990],{"type":998,"value":1202},{"type":993,"tag":1021,"props":4992,"children":4993},{"style":1115},[4994],{"type":998,"value":4995},", count=",{"type":993,"tag":1021,"props":4997,"children":4998},{"style":1053},[4999],{"type":998,"value":1192},{"type":993,"tag":1021,"props":5001,"children":5002},{"style":1036},[5003],{"type":998,"value":5004},"count",{"type":993,"tag":1021,"props":5006,"children":5007},{"style":1053},[5008],{"type":998,"value":1202},{"type":993,"tag":1021,"props":5010,"children":5011},{"style":1115},[5012],{"type":998,"value":5013},", average=",{"type":993,"tag":1021,"props":5015,"children":5016},{"style":1053},[5017],{"type":998,"value":1192},{"type":993,"tag":1021,"props":5019,"children":5020},{"style":1036},[5021],{"type":998,"value":5022},"avg",{"type":993,"tag":1021,"props":5024,"children":5025},{"style":1042},[5026],{"type":998,"value":5027},":.1f",{"type":993,"tag":1021,"props":5029,"children":5030},{"style":1053},[5031],{"type":998,"value":1202},{"type":993,"tag":1021,"props":5033,"children":5034},{"style":1115},[5035],{"type":998,"value":1225},{"type":993,"tag":1021,"props":5037,"children":5038},{"style":1036},[5039],{"type":998,"value":1071},{"type":993,"tag":1609,"props":5041,"children":5043},{"id":5042},"error-handling-with-unpacking",[5044],{"type":998,"value":5045},"Error Handling with Unpacking",{"type":993,"tag":1001,"props":5047,"children":5048},{},[5049],{"type":998,"value":5050},"Safe unpacking patterns when function returns might vary in structure.",{"type":993,"tag":1007,"props":5052,"children":5053},{},[5054],{"type":993,"tag":1011,"props":5055,"children":5057},{"className":1013,"code":5056,"language":6,"meta":8,"style":8},"# Safe unpacking with error handling\ndef divide_with_remainder(a, b):\n    if b == 0:\n        return None, \"Division by zero\"\n    quotient, remainder = divmod(a, b)\n    return (quotient, remainder), \"Success\"\n\ndef parse_coordinate(coord_string):\n    try:\n        parts = coord_string.split(',')\n        x, y = float(parts[0]), float(parts[1])\n        return x, y, True\n    except (ValueError, IndexError):\n        return 0, 0, False\n\n# Safe unpacking\nresult, message = divide_with_remainder(10, 3)\nif result:\n    quotient, remainder = result\n    print(f\"10 ÷ 3 = {quotient} remainder {remainder}\")\nelse:\n    print(f\"Error: {message}\")\n\nx, y, success = parse_coordinate(\"10.5,20.3\")\nif success:\n    print(f\"Coordinates: ({x}, {y})\")\n",[5058],{"type":993,"tag":1017,"props":5059,"children":5060},{"__ignoreMap":8},[5061,5069,5086,5111,5132,5154,5171,5178,5195,5207,5233,5281,5298,5329,5357,5364,5372,5405,5418,5434,5494,5506,5546,5553,5579,5591],{"type":993,"tag":1021,"props":5062,"children":5063},{"class":1023,"line":12},[5064],{"type":993,"tag":1021,"props":5065,"children":5066},{"style":1027},[5067],{"type":998,"value":5068},"# Safe unpacking with error handling\n",{"type":993,"tag":1021,"props":5070,"children":5071},{"class":1023,"line":27},[5072,5076,5081],{"type":993,"tag":1021,"props":5073,"children":5074},{"style":1042},[5075],{"type":998,"value":4511},{"type":993,"tag":1021,"props":5077,"children":5078},{"style":4514},[5079],{"type":998,"value":5080}," divide_with_remainder",{"type":993,"tag":1021,"props":5082,"children":5083},{"style":1036},[5084],{"type":998,"value":5085},"(a, b):\n",{"type":993,"tag":1021,"props":5087,"children":5088},{"class":1023,"line":36},[5089,5093,5098,5103,5107],{"type":993,"tag":1021,"props":5090,"children":5091},{"style":1042},[5092],{"type":998,"value":4547},{"type":993,"tag":1021,"props":5094,"children":5095},{"style":1036},[5096],{"type":998,"value":5097}," b ",{"type":993,"tag":1021,"props":5099,"children":5100},{"style":1042},[5101],{"type":998,"value":5102},"==",{"type":993,"tag":1021,"props":5104,"children":5105},{"style":1053},[5106],{"type":998,"value":4697},{"type":993,"tag":1021,"props":5108,"children":5109},{"style":1036},[5110],{"type":998,"value":4572},{"type":993,"tag":1021,"props":5112,"children":5113},{"class":1023,"line":45},[5114,5118,5123,5127],{"type":993,"tag":1021,"props":5115,"children":5116},{"style":1042},[5117],{"type":998,"value":4580},{"type":993,"tag":1021,"props":5119,"children":5120},{"style":1053},[5121],{"type":998,"value":5122}," None",{"type":993,"tag":1021,"props":5124,"children":5125},{"style":1036},[5126],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5128,"children":5129},{"style":1115},[5130],{"type":998,"value":5131},"\"Division by zero\"\n",{"type":993,"tag":1021,"props":5133,"children":5134},{"class":1023,"line":54},[5135,5140,5144,5149],{"type":993,"tag":1021,"props":5136,"children":5137},{"style":1036},[5138],{"type":998,"value":5139},"    quotient, remainder ",{"type":993,"tag":1021,"props":5141,"children":5142},{"style":1042},[5143],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5145,"children":5146},{"style":1053},[5147],{"type":998,"value":5148}," divmod",{"type":993,"tag":1021,"props":5150,"children":5151},{"style":1036},[5152],{"type":998,"value":5153},"(a, b)\n",{"type":993,"tag":1021,"props":5155,"children":5156},{"class":1023,"line":63},[5157,5161,5166],{"type":993,"tag":1021,"props":5158,"children":5159},{"style":1042},[5160],{"type":998,"value":4621},{"type":993,"tag":1021,"props":5162,"children":5163},{"style":1036},[5164],{"type":998,"value":5165}," (quotient, remainder), ",{"type":993,"tag":1021,"props":5167,"children":5168},{"style":1115},[5169],{"type":998,"value":5170},"\"Success\"\n",{"type":993,"tag":1021,"props":5172,"children":5173},{"class":1023,"line":72},[5174],{"type":993,"tag":1021,"props":5175,"children":5176},{"emptyLinePlaceholder":13},[5177],{"type":998,"value":1096},{"type":993,"tag":1021,"props":5179,"children":5180},{"class":1023,"line":81},[5181,5185,5190],{"type":993,"tag":1021,"props":5182,"children":5183},{"style":1042},[5184],{"type":998,"value":4511},{"type":993,"tag":1021,"props":5186,"children":5187},{"style":4514},[5188],{"type":998,"value":5189}," parse_coordinate",{"type":993,"tag":1021,"props":5191,"children":5192},{"style":1036},[5193],{"type":998,"value":5194},"(coord_string):\n",{"type":993,"tag":1021,"props":5196,"children":5197},{"class":1023,"line":91},[5198,5203],{"type":993,"tag":1021,"props":5199,"children":5200},{"style":1042},[5201],{"type":998,"value":5202},"    try",{"type":993,"tag":1021,"props":5204,"children":5205},{"style":1036},[5206],{"type":998,"value":4572},{"type":993,"tag":1021,"props":5208,"children":5209},{"class":1023,"line":100},[5210,5215,5219,5224,5229],{"type":993,"tag":1021,"props":5211,"children":5212},{"style":1036},[5213],{"type":998,"value":5214},"        parts ",{"type":993,"tag":1021,"props":5216,"children":5217},{"style":1042},[5218],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5220,"children":5221},{"style":1036},[5222],{"type":998,"value":5223}," coord_string.split(",{"type":993,"tag":1021,"props":5225,"children":5226},{"style":1115},[5227],{"type":998,"value":5228},"','",{"type":993,"tag":1021,"props":5230,"children":5231},{"style":1036},[5232],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5234,"children":5235},{"class":1023,"line":109},[5236,5241,5245,5250,5255,5259,5264,5269,5273,5277],{"type":993,"tag":1021,"props":5237,"children":5238},{"style":1036},[5239],{"type":998,"value":5240},"        x, y ",{"type":993,"tag":1021,"props":5242,"children":5243},{"style":1042},[5244],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5246,"children":5247},{"style":1053},[5248],{"type":998,"value":5249}," float",{"type":993,"tag":1021,"props":5251,"children":5252},{"style":1036},[5253],{"type":998,"value":5254},"(parts[",{"type":993,"tag":1021,"props":5256,"children":5257},{"style":1053},[5258],{"type":998,"value":1676},{"type":993,"tag":1021,"props":5260,"children":5261},{"style":1036},[5262],{"type":998,"value":5263},"]), ",{"type":993,"tag":1021,"props":5265,"children":5266},{"style":1053},[5267],{"type":998,"value":5268},"float",{"type":993,"tag":1021,"props":5270,"children":5271},{"style":1036},[5272],{"type":998,"value":5254},{"type":993,"tag":1021,"props":5274,"children":5275},{"style":1053},[5276],{"type":998,"value":3009},{"type":993,"tag":1021,"props":5278,"children":5279},{"style":1036},[5280],{"type":998,"value":4263},{"type":993,"tag":1021,"props":5282,"children":5283},{"class":1023,"line":118},[5284,5288,5293],{"type":993,"tag":1021,"props":5285,"children":5286},{"style":1042},[5287],{"type":998,"value":4580},{"type":993,"tag":1021,"props":5289,"children":5290},{"style":1036},[5291],{"type":998,"value":5292}," x, y, ",{"type":993,"tag":1021,"props":5294,"children":5295},{"style":1053},[5296],{"type":998,"value":5297},"True\n",{"type":993,"tag":1021,"props":5299,"children":5300},{"class":1023,"line":127},[5301,5306,5310,5315,5319,5324],{"type":993,"tag":1021,"props":5302,"children":5303},{"style":1042},[5304],{"type":998,"value":5305},"    except",{"type":993,"tag":1021,"props":5307,"children":5308},{"style":1036},[5309],{"type":998,"value":1050},{"type":993,"tag":1021,"props":5311,"children":5312},{"style":1053},[5313],{"type":998,"value":5314},"ValueError",{"type":993,"tag":1021,"props":5316,"children":5317},{"style":1036},[5318],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5320,"children":5321},{"style":1053},[5322],{"type":998,"value":5323},"IndexError",{"type":993,"tag":1021,"props":5325,"children":5326},{"style":1036},[5327],{"type":998,"value":5328},"):\n",{"type":993,"tag":1021,"props":5330,"children":5331},{"class":1023,"line":136},[5332,5336,5340,5344,5348,5352],{"type":993,"tag":1021,"props":5333,"children":5334},{"style":1042},[5335],{"type":998,"value":4580},{"type":993,"tag":1021,"props":5337,"children":5338},{"style":1053},[5339],{"type":998,"value":4697},{"type":993,"tag":1021,"props":5341,"children":5342},{"style":1036},[5343],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5345,"children":5346},{"style":1053},[5347],{"type":998,"value":1676},{"type":993,"tag":1021,"props":5349,"children":5350},{"style":1036},[5351],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5353,"children":5354},{"style":1053},[5355],{"type":998,"value":5356},"False\n",{"type":993,"tag":1021,"props":5358,"children":5359},{"class":1023,"line":146},[5360],{"type":993,"tag":1021,"props":5361,"children":5362},{"emptyLinePlaceholder":13},[5363],{"type":998,"value":1096},{"type":993,"tag":1021,"props":5365,"children":5366},{"class":1023,"line":155},[5367],{"type":993,"tag":1021,"props":5368,"children":5369},{"style":1027},[5370],{"type":998,"value":5371},"# Safe unpacking\n",{"type":993,"tag":1021,"props":5373,"children":5374},{"class":1023,"line":164},[5375,5380,5384,5389,5393,5397,5401],{"type":993,"tag":1021,"props":5376,"children":5377},{"style":1036},[5378],{"type":998,"value":5379},"result, message ",{"type":993,"tag":1021,"props":5381,"children":5382},{"style":1042},[5383],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5385,"children":5386},{"style":1036},[5387],{"type":998,"value":5388}," divide_with_remainder(",{"type":993,"tag":1021,"props":5390,"children":5391},{"style":1053},[5392],{"type":998,"value":1056},{"type":993,"tag":1021,"props":5394,"children":5395},{"style":1036},[5396],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5398,"children":5399},{"style":1053},[5400],{"type":998,"value":3026},{"type":993,"tag":1021,"props":5402,"children":5403},{"style":1036},[5404],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5406,"children":5407},{"class":1023,"line":173},[5408,5413],{"type":993,"tag":1021,"props":5409,"children":5410},{"style":1042},[5411],{"type":998,"value":5412},"if",{"type":993,"tag":1021,"props":5414,"children":5415},{"style":1036},[5416],{"type":998,"value":5417}," result:\n",{"type":993,"tag":1021,"props":5419,"children":5420},{"class":1023,"line":182},[5421,5425,5429],{"type":993,"tag":1021,"props":5422,"children":5423},{"style":1036},[5424],{"type":998,"value":5139},{"type":993,"tag":1021,"props":5426,"children":5427},{"style":1042},[5428],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5430,"children":5431},{"style":1036},[5432],{"type":998,"value":5433}," result\n",{"type":993,"tag":1021,"props":5435,"children":5436},{"class":1023,"line":191},[5437,5442,5446,5450,5455,5459,5464,5468,5473,5477,5482,5486,5490],{"type":993,"tag":1021,"props":5438,"children":5439},{"style":1053},[5440],{"type":998,"value":5441},"    print",{"type":993,"tag":1021,"props":5443,"children":5444},{"style":1036},[5445],{"type":998,"value":1177},{"type":993,"tag":1021,"props":5447,"children":5448},{"style":1042},[5449],{"type":998,"value":1182},{"type":993,"tag":1021,"props":5451,"children":5452},{"style":1115},[5453],{"type":998,"value":5454},"\"10 ÷ 3 = ",{"type":993,"tag":1021,"props":5456,"children":5457},{"style":1053},[5458],{"type":998,"value":1192},{"type":993,"tag":1021,"props":5460,"children":5461},{"style":1036},[5462],{"type":998,"value":5463},"quotient",{"type":993,"tag":1021,"props":5465,"children":5466},{"style":1053},[5467],{"type":998,"value":1202},{"type":993,"tag":1021,"props":5469,"children":5470},{"style":1115},[5471],{"type":998,"value":5472}," remainder ",{"type":993,"tag":1021,"props":5474,"children":5475},{"style":1053},[5476],{"type":998,"value":1192},{"type":993,"tag":1021,"props":5478,"children":5479},{"style":1036},[5480],{"type":998,"value":5481},"remainder",{"type":993,"tag":1021,"props":5483,"children":5484},{"style":1053},[5485],{"type":998,"value":1202},{"type":993,"tag":1021,"props":5487,"children":5488},{"style":1115},[5489],{"type":998,"value":1225},{"type":993,"tag":1021,"props":5491,"children":5492},{"style":1036},[5493],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5495,"children":5496},{"class":1023,"line":201},[5497,5502],{"type":993,"tag":1021,"props":5498,"children":5499},{"style":1042},[5500],{"type":998,"value":5501},"else",{"type":993,"tag":1021,"props":5503,"children":5504},{"style":1036},[5505],{"type":998,"value":4572},{"type":993,"tag":1021,"props":5507,"children":5508},{"class":1023,"line":210},[5509,5513,5517,5521,5526,5530,5534,5538,5542],{"type":993,"tag":1021,"props":5510,"children":5511},{"style":1053},[5512],{"type":998,"value":5441},{"type":993,"tag":1021,"props":5514,"children":5515},{"style":1036},[5516],{"type":998,"value":1177},{"type":993,"tag":1021,"props":5518,"children":5519},{"style":1042},[5520],{"type":998,"value":1182},{"type":993,"tag":1021,"props":5522,"children":5523},{"style":1115},[5524],{"type":998,"value":5525},"\"Error: ",{"type":993,"tag":1021,"props":5527,"children":5528},{"style":1053},[5529],{"type":998,"value":1192},{"type":993,"tag":1021,"props":5531,"children":5532},{"style":1036},[5533],{"type":998,"value":3620},{"type":993,"tag":1021,"props":5535,"children":5536},{"style":1053},[5537],{"type":998,"value":1202},{"type":993,"tag":1021,"props":5539,"children":5540},{"style":1115},[5541],{"type":998,"value":1225},{"type":993,"tag":1021,"props":5543,"children":5544},{"style":1036},[5545],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5547,"children":5548},{"class":1023,"line":219},[5549],{"type":993,"tag":1021,"props":5550,"children":5551},{"emptyLinePlaceholder":13},[5552],{"type":998,"value":1096},{"type":993,"tag":1021,"props":5554,"children":5555},{"class":1023,"line":228},[5556,5561,5565,5570,5575],{"type":993,"tag":1021,"props":5557,"children":5558},{"style":1036},[5559],{"type":998,"value":5560},"x, y, success ",{"type":993,"tag":1021,"props":5562,"children":5563},{"style":1042},[5564],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5566,"children":5567},{"style":1036},[5568],{"type":998,"value":5569}," parse_coordinate(",{"type":993,"tag":1021,"props":5571,"children":5572},{"style":1115},[5573],{"type":998,"value":5574},"\"10.5,20.3\"",{"type":993,"tag":1021,"props":5576,"children":5577},{"style":1036},[5578],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5580,"children":5581},{"class":1023,"line":238},[5582,5586],{"type":993,"tag":1021,"props":5583,"children":5584},{"style":1042},[5585],{"type":998,"value":5412},{"type":993,"tag":1021,"props":5587,"children":5588},{"style":1036},[5589],{"type":998,"value":5590}," success:\n",{"type":993,"tag":1021,"props":5592,"children":5593},{"class":1023,"line":247},[5594,5598,5602,5606,5611,5615,5619,5623,5627,5631,5635,5639,5643],{"type":993,"tag":1021,"props":5595,"children":5596},{"style":1053},[5597],{"type":998,"value":5441},{"type":993,"tag":1021,"props":5599,"children":5600},{"style":1036},[5601],{"type":998,"value":1177},{"type":993,"tag":1021,"props":5603,"children":5604},{"style":1042},[5605],{"type":998,"value":1182},{"type":993,"tag":1021,"props":5607,"children":5608},{"style":1115},[5609],{"type":998,"value":5610},"\"Coordinates: (",{"type":993,"tag":1021,"props":5612,"children":5613},{"style":1053},[5614],{"type":998,"value":1192},{"type":993,"tag":1021,"props":5616,"children":5617},{"style":1036},[5618],{"type":998,"value":1197},{"type":993,"tag":1021,"props":5620,"children":5621},{"style":1053},[5622],{"type":998,"value":1202},{"type":993,"tag":1021,"props":5624,"children":5625},{"style":1115},[5626],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5628,"children":5629},{"style":1053},[5630],{"type":998,"value":1192},{"type":993,"tag":1021,"props":5632,"children":5633},{"style":1036},[5634],{"type":998,"value":1216},{"type":993,"tag":1021,"props":5636,"children":5637},{"style":1053},[5638],{"type":998,"value":1202},{"type":993,"tag":1021,"props":5640,"children":5641},{"style":1115},[5642],{"type":998,"value":1957},{"type":993,"tag":1021,"props":5644,"children":5645},{"style":1036},[5646],{"type":998,"value":1071},{"type":993,"tag":1609,"props":5648,"children":5650},{"id":5649},"status-and-result-patterns",[5651],{"type":998,"value":5652},"Status and Result Patterns",{"type":993,"tag":1001,"props":5654,"children":5655},{},[5656],{"type":998,"value":5657},"Common patterns for functions returning both results and status information.",{"type":993,"tag":1007,"props":5659,"children":5660},{},[5661],{"type":993,"tag":1011,"props":5662,"children":5664},{"className":1013,"code":5663,"language":6,"meta":8,"style":8},"# Status and result patterns\ndef validate_user_data(name, age, email):\n    errors = []\n    if not name:\n        errors.append(\"Name required\")\n    if age \u003C 0 or age > 150:\n        errors.append(\"Invalid age\")\n    if \"@\" not in email:\n        errors.append(\"Invalid email\")\n    \n    is_valid = len(errors) == 0\n    return is_valid, errors\n\ndef fetch_user_profile(user_id):\n    # Simulate database lookup\n    if user_id == 1:\n        profile = {\"name\": \"Alice\", \"age\": 25, \"role\": \"Engineer\"}\n        return profile, True, \"Success\"\n    else:\n        return None, False, \"User not found\"\n\n# Using status patterns\nvalid, errors = validate_user_data(\"Alice\", 25, \"alice@email.com\")\nif valid:\n    print(\"User data is valid\")\nelse:\n    print(f\"Validation errors: {errors}\")\n\nprofile, found, message = fetch_user_profile(1)\nif found:\n    name, age, role = profile[\"name\"], profile[\"age\"], profile[\"role\"]\n    print(f\"Profile: {name}, {age}, {role}\")\n",[5665],{"type":993,"tag":1017,"props":5666,"children":5667},{"__ignoreMap":8},[5668,5676,5693,5710,5726,5743,5787,5803,5829,5845,5853,5883,5895,5902,5919,5927,5951,6020,6044,6056,6085,6092,6100,6142,6154,6174,6185,6226,6233,6258,6270,6313],{"type":993,"tag":1021,"props":5669,"children":5670},{"class":1023,"line":12},[5671],{"type":993,"tag":1021,"props":5672,"children":5673},{"style":1027},[5674],{"type":998,"value":5675},"# Status and result patterns\n",{"type":993,"tag":1021,"props":5677,"children":5678},{"class":1023,"line":27},[5679,5683,5688],{"type":993,"tag":1021,"props":5680,"children":5681},{"style":1042},[5682],{"type":998,"value":4511},{"type":993,"tag":1021,"props":5684,"children":5685},{"style":4514},[5686],{"type":998,"value":5687}," validate_user_data",{"type":993,"tag":1021,"props":5689,"children":5690},{"style":1036},[5691],{"type":998,"value":5692},"(name, age, email):\n",{"type":993,"tag":1021,"props":5694,"children":5695},{"class":1023,"line":36},[5696,5701,5705],{"type":993,"tag":1021,"props":5697,"children":5698},{"style":1036},[5699],{"type":998,"value":5700},"    errors ",{"type":993,"tag":1021,"props":5702,"children":5703},{"style":1042},[5704],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5706,"children":5707},{"style":1036},[5708],{"type":998,"value":5709}," []\n",{"type":993,"tag":1021,"props":5711,"children":5712},{"class":1023,"line":45},[5713,5717,5721],{"type":993,"tag":1021,"props":5714,"children":5715},{"style":1042},[5716],{"type":998,"value":4547},{"type":993,"tag":1021,"props":5718,"children":5719},{"style":1042},[5720],{"type":998,"value":4680},{"type":993,"tag":1021,"props":5722,"children":5723},{"style":1036},[5724],{"type":998,"value":5725}," name:\n",{"type":993,"tag":1021,"props":5727,"children":5728},{"class":1023,"line":54},[5729,5734,5739],{"type":993,"tag":1021,"props":5730,"children":5731},{"style":1036},[5732],{"type":998,"value":5733},"        errors.append(",{"type":993,"tag":1021,"props":5735,"children":5736},{"style":1115},[5737],{"type":998,"value":5738},"\"Name required\"",{"type":993,"tag":1021,"props":5740,"children":5741},{"style":1036},[5742],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5744,"children":5745},{"class":1023,"line":63},[5746,5750,5755,5760,5764,5769,5773,5778,5783],{"type":993,"tag":1021,"props":5747,"children":5748},{"style":1042},[5749],{"type":998,"value":4547},{"type":993,"tag":1021,"props":5751,"children":5752},{"style":1036},[5753],{"type":998,"value":5754}," age ",{"type":993,"tag":1021,"props":5756,"children":5757},{"style":1042},[5758],{"type":998,"value":5759},"\u003C",{"type":993,"tag":1021,"props":5761,"children":5762},{"style":1053},[5763],{"type":998,"value":4697},{"type":993,"tag":1021,"props":5765,"children":5766},{"style":1042},[5767],{"type":998,"value":5768}," or",{"type":993,"tag":1021,"props":5770,"children":5771},{"style":1036},[5772],{"type":998,"value":5754},{"type":993,"tag":1021,"props":5774,"children":5775},{"style":1042},[5776],{"type":998,"value":5777},">",{"type":993,"tag":1021,"props":5779,"children":5780},{"style":1053},[5781],{"type":998,"value":5782}," 150",{"type":993,"tag":1021,"props":5784,"children":5785},{"style":1036},[5786],{"type":998,"value":4572},{"type":993,"tag":1021,"props":5788,"children":5789},{"class":1023,"line":72},[5790,5794,5799],{"type":993,"tag":1021,"props":5791,"children":5792},{"style":1036},[5793],{"type":998,"value":5733},{"type":993,"tag":1021,"props":5795,"children":5796},{"style":1115},[5797],{"type":998,"value":5798},"\"Invalid age\"",{"type":993,"tag":1021,"props":5800,"children":5801},{"style":1036},[5802],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5804,"children":5805},{"class":1023,"line":81},[5806,5810,5815,5819,5824],{"type":993,"tag":1021,"props":5807,"children":5808},{"style":1042},[5809],{"type":998,"value":4547},{"type":993,"tag":1021,"props":5811,"children":5812},{"style":1115},[5813],{"type":998,"value":5814}," \"@\"",{"type":993,"tag":1021,"props":5816,"children":5817},{"style":1042},[5818],{"type":998,"value":4680},{"type":993,"tag":1021,"props":5820,"children":5821},{"style":1042},[5822],{"type":998,"value":5823}," in",{"type":993,"tag":1021,"props":5825,"children":5826},{"style":1036},[5827],{"type":998,"value":5828}," email:\n",{"type":993,"tag":1021,"props":5830,"children":5831},{"class":1023,"line":91},[5832,5836,5841],{"type":993,"tag":1021,"props":5833,"children":5834},{"style":1036},[5835],{"type":998,"value":5733},{"type":993,"tag":1021,"props":5837,"children":5838},{"style":1115},[5839],{"type":998,"value":5840},"\"Invalid email\"",{"type":993,"tag":1021,"props":5842,"children":5843},{"style":1036},[5844],{"type":998,"value":1071},{"type":993,"tag":1021,"props":5846,"children":5847},{"class":1023,"line":100},[5848],{"type":993,"tag":1021,"props":5849,"children":5850},{"style":1036},[5851],{"type":998,"value":5852},"    \n",{"type":993,"tag":1021,"props":5854,"children":5855},{"class":1023,"line":109},[5856,5861,5865,5869,5874,5878],{"type":993,"tag":1021,"props":5857,"children":5858},{"style":1036},[5859],{"type":998,"value":5860},"    is_valid ",{"type":993,"tag":1021,"props":5862,"children":5863},{"style":1042},[5864],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5866,"children":5867},{"style":1053},[5868],{"type":998,"value":4552},{"type":993,"tag":1021,"props":5870,"children":5871},{"style":1036},[5872],{"type":998,"value":5873},"(errors) ",{"type":993,"tag":1021,"props":5875,"children":5876},{"style":1042},[5877],{"type":998,"value":5102},{"type":993,"tag":1021,"props":5879,"children":5880},{"style":1053},[5881],{"type":998,"value":5882}," 0\n",{"type":993,"tag":1021,"props":5884,"children":5885},{"class":1023,"line":118},[5886,5890],{"type":993,"tag":1021,"props":5887,"children":5888},{"style":1042},[5889],{"type":998,"value":4621},{"type":993,"tag":1021,"props":5891,"children":5892},{"style":1036},[5893],{"type":998,"value":5894}," is_valid, errors\n",{"type":993,"tag":1021,"props":5896,"children":5897},{"class":1023,"line":127},[5898],{"type":993,"tag":1021,"props":5899,"children":5900},{"emptyLinePlaceholder":13},[5901],{"type":998,"value":1096},{"type":993,"tag":1021,"props":5903,"children":5904},{"class":1023,"line":136},[5905,5909,5914],{"type":993,"tag":1021,"props":5906,"children":5907},{"style":1042},[5908],{"type":998,"value":4511},{"type":993,"tag":1021,"props":5910,"children":5911},{"style":4514},[5912],{"type":998,"value":5913}," fetch_user_profile",{"type":993,"tag":1021,"props":5915,"children":5916},{"style":1036},[5917],{"type":998,"value":5918},"(user_id):\n",{"type":993,"tag":1021,"props":5920,"children":5921},{"class":1023,"line":146},[5922],{"type":993,"tag":1021,"props":5923,"children":5924},{"style":1027},[5925],{"type":998,"value":5926},"    # Simulate database lookup\n",{"type":993,"tag":1021,"props":5928,"children":5929},{"class":1023,"line":155},[5930,5934,5939,5943,5947],{"type":993,"tag":1021,"props":5931,"children":5932},{"style":1042},[5933],{"type":998,"value":4547},{"type":993,"tag":1021,"props":5935,"children":5936},{"style":1036},[5937],{"type":998,"value":5938}," user_id ",{"type":993,"tag":1021,"props":5940,"children":5941},{"style":1042},[5942],{"type":998,"value":5102},{"type":993,"tag":1021,"props":5944,"children":5945},{"style":1053},[5946],{"type":998,"value":2089},{"type":993,"tag":1021,"props":5948,"children":5949},{"style":1036},[5950],{"type":998,"value":4572},{"type":993,"tag":1021,"props":5952,"children":5953},{"class":1023,"line":164},[5954,5959,5963,5967,5972,5977,5981,5985,5990,5994,5998,6002,6007,6011,6015],{"type":993,"tag":1021,"props":5955,"children":5956},{"style":1036},[5957],{"type":998,"value":5958},"        profile ",{"type":993,"tag":1021,"props":5960,"children":5961},{"style":1042},[5962],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5964,"children":5965},{"style":1036},[5966],{"type":998,"value":4940},{"type":993,"tag":1021,"props":5968,"children":5969},{"style":1115},[5970],{"type":998,"value":5971},"\"name\"",{"type":993,"tag":1021,"props":5973,"children":5974},{"style":1036},[5975],{"type":998,"value":5976},": ",{"type":993,"tag":1021,"props":5978,"children":5979},{"style":1115},[5980],{"type":998,"value":1118},{"type":993,"tag":1021,"props":5982,"children":5983},{"style":1036},[5984],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5986,"children":5987},{"style":1115},[5988],{"type":998,"value":5989},"\"age\"",{"type":993,"tag":1021,"props":5991,"children":5992},{"style":1036},[5993],{"type":998,"value":5976},{"type":993,"tag":1021,"props":5995,"children":5996},{"style":1053},[5997],{"type":998,"value":1127},{"type":993,"tag":1021,"props":5999,"children":6000},{"style":1036},[6001],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6003,"children":6004},{"style":1115},[6005],{"type":998,"value":6006},"\"role\"",{"type":993,"tag":1021,"props":6008,"children":6009},{"style":1036},[6010],{"type":998,"value":5976},{"type":993,"tag":1021,"props":6012,"children":6013},{"style":1115},[6014],{"type":998,"value":1136},{"type":993,"tag":1021,"props":6016,"children":6017},{"style":1036},[6018],{"type":998,"value":6019},"}\n",{"type":993,"tag":1021,"props":6021,"children":6022},{"class":1023,"line":173},[6023,6027,6032,6036,6040],{"type":993,"tag":1021,"props":6024,"children":6025},{"style":1042},[6026],{"type":998,"value":4580},{"type":993,"tag":1021,"props":6028,"children":6029},{"style":1036},[6030],{"type":998,"value":6031}," profile, ",{"type":993,"tag":1021,"props":6033,"children":6034},{"style":1053},[6035],{"type":998,"value":3763},{"type":993,"tag":1021,"props":6037,"children":6038},{"style":1036},[6039],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6041,"children":6042},{"style":1115},[6043],{"type":998,"value":5170},{"type":993,"tag":1021,"props":6045,"children":6046},{"class":1023,"line":182},[6047,6052],{"type":993,"tag":1021,"props":6048,"children":6049},{"style":1042},[6050],{"type":998,"value":6051},"    else",{"type":993,"tag":1021,"props":6053,"children":6054},{"style":1036},[6055],{"type":998,"value":4572},{"type":993,"tag":1021,"props":6057,"children":6058},{"class":1023,"line":191},[6059,6063,6067,6071,6076,6080],{"type":993,"tag":1021,"props":6060,"children":6061},{"style":1042},[6062],{"type":998,"value":4580},{"type":993,"tag":1021,"props":6064,"children":6065},{"style":1053},[6066],{"type":998,"value":5122},{"type":993,"tag":1021,"props":6068,"children":6069},{"style":1036},[6070],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6072,"children":6073},{"style":1053},[6074],{"type":998,"value":6075},"False",{"type":993,"tag":1021,"props":6077,"children":6078},{"style":1036},[6079],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6081,"children":6082},{"style":1115},[6083],{"type":998,"value":6084},"\"User not found\"\n",{"type":993,"tag":1021,"props":6086,"children":6087},{"class":1023,"line":201},[6088],{"type":993,"tag":1021,"props":6089,"children":6090},{"emptyLinePlaceholder":13},[6091],{"type":998,"value":1096},{"type":993,"tag":1021,"props":6093,"children":6094},{"class":1023,"line":210},[6095],{"type":993,"tag":1021,"props":6096,"children":6097},{"style":1027},[6098],{"type":998,"value":6099},"# Using status patterns\n",{"type":993,"tag":1021,"props":6101,"children":6102},{"class":1023,"line":219},[6103,6108,6112,6117,6121,6125,6129,6133,6138],{"type":993,"tag":1021,"props":6104,"children":6105},{"style":1036},[6106],{"type":998,"value":6107},"valid, errors ",{"type":993,"tag":1021,"props":6109,"children":6110},{"style":1042},[6111],{"type":998,"value":1045},{"type":993,"tag":1021,"props":6113,"children":6114},{"style":1036},[6115],{"type":998,"value":6116}," validate_user_data(",{"type":993,"tag":1021,"props":6118,"children":6119},{"style":1115},[6120],{"type":998,"value":1118},{"type":993,"tag":1021,"props":6122,"children":6123},{"style":1036},[6124],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6126,"children":6127},{"style":1053},[6128],{"type":998,"value":1127},{"type":993,"tag":1021,"props":6130,"children":6131},{"style":1036},[6132],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6134,"children":6135},{"style":1115},[6136],{"type":998,"value":6137},"\"alice@email.com\"",{"type":993,"tag":1021,"props":6139,"children":6140},{"style":1036},[6141],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6143,"children":6144},{"class":1023,"line":228},[6145,6149],{"type":993,"tag":1021,"props":6146,"children":6147},{"style":1042},[6148],{"type":998,"value":5412},{"type":993,"tag":1021,"props":6150,"children":6151},{"style":1036},[6152],{"type":998,"value":6153}," valid:\n",{"type":993,"tag":1021,"props":6155,"children":6156},{"class":1023,"line":238},[6157,6161,6165,6170],{"type":993,"tag":1021,"props":6158,"children":6159},{"style":1053},[6160],{"type":998,"value":5441},{"type":993,"tag":1021,"props":6162,"children":6163},{"style":1036},[6164],{"type":998,"value":1177},{"type":993,"tag":1021,"props":6166,"children":6167},{"style":1115},[6168],{"type":998,"value":6169},"\"User data is valid\"",{"type":993,"tag":1021,"props":6171,"children":6172},{"style":1036},[6173],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6175,"children":6176},{"class":1023,"line":247},[6177,6181],{"type":993,"tag":1021,"props":6178,"children":6179},{"style":1042},[6180],{"type":998,"value":5501},{"type":993,"tag":1021,"props":6182,"children":6183},{"style":1036},[6184],{"type":998,"value":4572},{"type":993,"tag":1021,"props":6186,"children":6187},{"class":1023,"line":256},[6188,6192,6196,6200,6205,6209,6214,6218,6222],{"type":993,"tag":1021,"props":6189,"children":6190},{"style":1053},[6191],{"type":998,"value":5441},{"type":993,"tag":1021,"props":6193,"children":6194},{"style":1036},[6195],{"type":998,"value":1177},{"type":993,"tag":1021,"props":6197,"children":6198},{"style":1042},[6199],{"type":998,"value":1182},{"type":993,"tag":1021,"props":6201,"children":6202},{"style":1115},[6203],{"type":998,"value":6204},"\"Validation errors: ",{"type":993,"tag":1021,"props":6206,"children":6207},{"style":1053},[6208],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6210,"children":6211},{"style":1036},[6212],{"type":998,"value":6213},"errors",{"type":993,"tag":1021,"props":6215,"children":6216},{"style":1053},[6217],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6219,"children":6220},{"style":1115},[6221],{"type":998,"value":1225},{"type":993,"tag":1021,"props":6223,"children":6224},{"style":1036},[6225],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6227,"children":6228},{"class":1023,"line":265},[6229],{"type":993,"tag":1021,"props":6230,"children":6231},{"emptyLinePlaceholder":13},[6232],{"type":998,"value":1096},{"type":993,"tag":1021,"props":6234,"children":6235},{"class":1023,"line":274},[6236,6241,6245,6250,6254],{"type":993,"tag":1021,"props":6237,"children":6238},{"style":1036},[6239],{"type":998,"value":6240},"profile, found, message ",{"type":993,"tag":1021,"props":6242,"children":6243},{"style":1042},[6244],{"type":998,"value":1045},{"type":993,"tag":1021,"props":6246,"children":6247},{"style":1036},[6248],{"type":998,"value":6249}," fetch_user_profile(",{"type":993,"tag":1021,"props":6251,"children":6252},{"style":1053},[6253],{"type":998,"value":3009},{"type":993,"tag":1021,"props":6255,"children":6256},{"style":1036},[6257],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6259,"children":6260},{"class":1023,"line":284},[6261,6265],{"type":993,"tag":1021,"props":6262,"children":6263},{"style":1042},[6264],{"type":998,"value":5412},{"type":993,"tag":1021,"props":6266,"children":6267},{"style":1036},[6268],{"type":998,"value":6269}," found:\n",{"type":993,"tag":1021,"props":6271,"children":6272},{"class":1023,"line":293},[6273,6278,6282,6287,6291,6296,6300,6304,6308],{"type":993,"tag":1021,"props":6274,"children":6275},{"style":1036},[6276],{"type":998,"value":6277},"    name, age, role ",{"type":993,"tag":1021,"props":6279,"children":6280},{"style":1042},[6281],{"type":998,"value":1045},{"type":993,"tag":1021,"props":6283,"children":6284},{"style":1036},[6285],{"type":998,"value":6286}," profile[",{"type":993,"tag":1021,"props":6288,"children":6289},{"style":1115},[6290],{"type":998,"value":5971},{"type":993,"tag":1021,"props":6292,"children":6293},{"style":1036},[6294],{"type":998,"value":6295},"], profile[",{"type":993,"tag":1021,"props":6297,"children":6298},{"style":1115},[6299],{"type":998,"value":5989},{"type":993,"tag":1021,"props":6301,"children":6302},{"style":1036},[6303],{"type":998,"value":6295},{"type":993,"tag":1021,"props":6305,"children":6306},{"style":1115},[6307],{"type":998,"value":6006},{"type":993,"tag":1021,"props":6309,"children":6310},{"style":1036},[6311],{"type":998,"value":6312},"]\n",{"type":993,"tag":1021,"props":6314,"children":6315},{"class":1023,"line":302},[6316,6320,6324,6328,6333,6337,6341,6345,6349,6353,6357,6361,6365,6369,6374,6378,6382],{"type":993,"tag":1021,"props":6317,"children":6318},{"style":1053},[6319],{"type":998,"value":5441},{"type":993,"tag":1021,"props":6321,"children":6322},{"style":1036},[6323],{"type":998,"value":1177},{"type":993,"tag":1021,"props":6325,"children":6326},{"style":1042},[6327],{"type":998,"value":1182},{"type":993,"tag":1021,"props":6329,"children":6330},{"style":1115},[6331],{"type":998,"value":6332},"\"Profile: ",{"type":993,"tag":1021,"props":6334,"children":6335},{"style":1053},[6336],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6338,"children":6339},{"style":1036},[6340],{"type":998,"value":1258},{"type":993,"tag":1021,"props":6342,"children":6343},{"style":1053},[6344],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6346,"children":6347},{"style":1115},[6348],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6350,"children":6351},{"style":1053},[6352],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6354,"children":6355},{"style":1036},[6356],{"type":998,"value":1276},{"type":993,"tag":1021,"props":6358,"children":6359},{"style":1053},[6360],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6362,"children":6363},{"style":1115},[6364],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6366,"children":6367},{"style":1053},[6368],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6370,"children":6371},{"style":1036},[6372],{"type":998,"value":6373},"role",{"type":993,"tag":1021,"props":6375,"children":6376},{"style":1053},[6377],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6379,"children":6380},{"style":1115},[6381],{"type":998,"value":1225},{"type":993,"tag":1021,"props":6383,"children":6384},{"style":1036},[6385],{"type":998,"value":1071},{"type":993,"tag":1480,"props":6387,"children":6389},{"id":6388},"unpacking-in-loops",[6390],{"type":998,"value":6391},"🔄 Unpacking in Loops",{"type":993,"tag":1001,"props":6393,"children":6394},{},[6395],{"type":998,"value":6396},"Tuple unpacking works seamlessly with loops, enabling elegant iteration over structured data like coordinate lists, database records, and key-value pairs.",{"type":993,"tag":1492,"props":6398,"children":6400},{"emoji":4389,"title":6399,"type":2857},"Loop Unpacking Advantages",[6401,6409,6432,6440],{"type":993,"tag":1001,"props":6402,"children":6403},{},[6404],{"type":993,"tag":1502,"props":6405,"children":6406},{},[6407],{"type":998,"value":6408},"Structured Data Iteration:",{"type":993,"tag":1508,"props":6410,"children":6411},{},[6412,6417,6422,6427],{"type":993,"tag":1512,"props":6413,"children":6414},{},[6415],{"type":998,"value":6416},"Direct access to tuple elements in loops",{"type":993,"tag":1512,"props":6418,"children":6419},{},[6420],{"type":998,"value":6421},"Cleaner code than index-based access",{"type":993,"tag":1512,"props":6423,"children":6424},{},[6425],{"type":998,"value":6426},"Works with enumerate() for position tracking",{"type":993,"tag":1512,"props":6428,"children":6429},{},[6430],{"type":998,"value":6431},"Natural pattern for key-value iteration",{"type":993,"tag":1001,"props":6433,"children":6434},{},[6435],{"type":993,"tag":1502,"props":6436,"children":6437},{},[6438],{"type":998,"value":6439},"Common Patterns:",{"type":993,"tag":1508,"props":6441,"children":6442},{},[6443,6454,6465],{"type":993,"tag":1512,"props":6444,"children":6445},{},[6446,6448],{"type":998,"value":6447},"Coordinate processing: ",{"type":993,"tag":1017,"props":6449,"children":6451},{"className":6450},[],[6452],{"type":998,"value":6453},"for x, y in points:",{"type":993,"tag":1512,"props":6455,"children":6456},{},[6457,6459],{"type":998,"value":6458},"Record iteration: ",{"type":993,"tag":1017,"props":6460,"children":6462},{"className":6461},[],[6463],{"type":998,"value":6464},"for name, age, job in records:",{"type":993,"tag":1512,"props":6466,"children":6467},{},[6468,6470],{"type":998,"value":6469},"Dictionary items: ",{"type":993,"tag":1017,"props":6471,"children":6473},{"className":6472},[],[6474],{"type":998,"value":6475},"for key, value in dict.items():",{"type":993,"tag":1609,"props":6477,"children":6479},{"id":6478},"iterating-tuple-collections",[6480],{"type":998,"value":6481},"Iterating Tuple Collections",{"type":993,"tag":1001,"props":6483,"children":6484},{},[6485],{"type":998,"value":6486},"Direct unpacking of tuple elements during iteration for clean data processing.",{"type":993,"tag":1007,"props":6488,"children":6489},{},[6490],{"type":993,"tag":1011,"props":6491,"children":6493},{"className":1013,"code":6492,"language":6,"meta":8,"style":8},"# Unpacking in loops\npoints = [(10, 20), (30, 40), (50, 60)]\nstudents = [(\"Alice\", 85), (\"Bob\", 92), (\"Carol\", 78)]\n\nprint(\"Points:\")\nfor x, y in points:\n    print(f\"Point at ({x}, {y})\")\n\nprint(\"\\nStudent grades:\")\nfor name, grade in students:\n    status = \"Pass\" if grade >= 80 else \"Needs improvement\"\n    print(f\"{name}: {grade} - {status}\")\n\n# Nested tuple unpacking in loops\nlines = [((0, 0), (10, 10)), ((5, 5), (15, 15))]\nfor (x1, y1), (x2, y2) in lines:\n    length = ((x2-x1)**2 + (y2-y1)**2)**0.5\n    print(f\"Line from ({x1},{y1}) to ({x2},{y2}), length: {length:.1f}\")\n",[6494],{"type":993,"tag":1017,"props":6495,"children":6496},{"__ignoreMap":8},[6497,6505,6574,6639,6646,6666,6689,6745,6752,6781,6802,6848,6921,6928,6936,7020,7041,7117],{"type":993,"tag":1021,"props":6498,"children":6499},{"class":1023,"line":12},[6500],{"type":993,"tag":1021,"props":6501,"children":6502},{"style":1027},[6503],{"type":998,"value":6504},"# Unpacking in loops\n",{"type":993,"tag":1021,"props":6506,"children":6507},{"class":1023,"line":27},[6508,6513,6517,6522,6526,6530,6534,6538,6542,6546,6551,6555,6560,6564,6569],{"type":993,"tag":1021,"props":6509,"children":6510},{"style":1036},[6511],{"type":998,"value":6512},"points ",{"type":993,"tag":1021,"props":6514,"children":6515},{"style":1042},[6516],{"type":998,"value":1045},{"type":993,"tag":1021,"props":6518,"children":6519},{"style":1036},[6520],{"type":998,"value":6521}," [(",{"type":993,"tag":1021,"props":6523,"children":6524},{"style":1053},[6525],{"type":998,"value":1056},{"type":993,"tag":1021,"props":6527,"children":6528},{"style":1036},[6529],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6531,"children":6532},{"style":1053},[6533],{"type":998,"value":1066},{"type":993,"tag":1021,"props":6535,"children":6536},{"style":1036},[6537],{"type":998,"value":2321},{"type":993,"tag":1021,"props":6539,"children":6540},{"style":1053},[6541],{"type":998,"value":2334},{"type":993,"tag":1021,"props":6543,"children":6544},{"style":1036},[6545],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6547,"children":6548},{"style":1053},[6549],{"type":998,"value":6550},"40",{"type":993,"tag":1021,"props":6552,"children":6553},{"style":1036},[6554],{"type":998,"value":2321},{"type":993,"tag":1021,"props":6556,"children":6557},{"style":1053},[6558],{"type":998,"value":6559},"50",{"type":993,"tag":1021,"props":6561,"children":6562},{"style":1036},[6563],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6565,"children":6566},{"style":1053},[6567],{"type":998,"value":6568},"60",{"type":993,"tag":1021,"props":6570,"children":6571},{"style":1036},[6572],{"type":998,"value":6573},")]\n",{"type":993,"tag":1021,"props":6575,"children":6576},{"class":1023,"line":36},[6577,6582,6586,6590,6594,6598,6602,6606,6610,6614,6618,6622,6627,6631,6635],{"type":993,"tag":1021,"props":6578,"children":6579},{"style":1036},[6580],{"type":998,"value":6581},"students ",{"type":993,"tag":1021,"props":6583,"children":6584},{"style":1042},[6585],{"type":998,"value":1045},{"type":993,"tag":1021,"props":6587,"children":6588},{"style":1036},[6589],{"type":998,"value":6521},{"type":993,"tag":1021,"props":6591,"children":6592},{"style":1115},[6593],{"type":998,"value":1118},{"type":993,"tag":1021,"props":6595,"children":6596},{"style":1036},[6597],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6599,"children":6600},{"style":1053},[6601],{"type":998,"value":4858},{"type":993,"tag":1021,"props":6603,"children":6604},{"style":1036},[6605],{"type":998,"value":2321},{"type":993,"tag":1021,"props":6607,"children":6608},{"style":1115},[6609],{"type":998,"value":1782},{"type":993,"tag":1021,"props":6611,"children":6612},{"style":1036},[6613],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6615,"children":6616},{"style":1053},[6617],{"type":998,"value":3686},{"type":993,"tag":1021,"props":6619,"children":6620},{"style":1036},[6621],{"type":998,"value":2321},{"type":993,"tag":1021,"props":6623,"children":6624},{"style":1115},[6625],{"type":998,"value":6626},"\"Carol\"",{"type":993,"tag":1021,"props":6628,"children":6629},{"style":1036},[6630],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6632,"children":6633},{"style":1053},[6634],{"type":998,"value":3695},{"type":993,"tag":1021,"props":6636,"children":6637},{"style":1036},[6638],{"type":998,"value":6573},{"type":993,"tag":1021,"props":6640,"children":6641},{"class":1023,"line":45},[6642],{"type":993,"tag":1021,"props":6643,"children":6644},{"emptyLinePlaceholder":13},[6645],{"type":998,"value":1096},{"type":993,"tag":1021,"props":6647,"children":6648},{"class":1023,"line":54},[6649,6653,6657,6662],{"type":993,"tag":1021,"props":6650,"children":6651},{"style":1053},[6652],{"type":998,"value":1172},{"type":993,"tag":1021,"props":6654,"children":6655},{"style":1036},[6656],{"type":998,"value":1177},{"type":993,"tag":1021,"props":6658,"children":6659},{"style":1115},[6660],{"type":998,"value":6661},"\"Points:\"",{"type":993,"tag":1021,"props":6663,"children":6664},{"style":1036},[6665],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6667,"children":6668},{"class":1023,"line":63},[6669,6674,6679,6684],{"type":993,"tag":1021,"props":6670,"children":6671},{"style":1042},[6672],{"type":998,"value":6673},"for",{"type":993,"tag":1021,"props":6675,"children":6676},{"style":1036},[6677],{"type":998,"value":6678}," x, y ",{"type":993,"tag":1021,"props":6680,"children":6681},{"style":1042},[6682],{"type":998,"value":6683},"in",{"type":993,"tag":1021,"props":6685,"children":6686},{"style":1036},[6687],{"type":998,"value":6688}," points:\n",{"type":993,"tag":1021,"props":6690,"children":6691},{"class":1023,"line":72},[6692,6696,6700,6704,6709,6713,6717,6721,6725,6729,6733,6737,6741],{"type":993,"tag":1021,"props":6693,"children":6694},{"style":1053},[6695],{"type":998,"value":5441},{"type":993,"tag":1021,"props":6697,"children":6698},{"style":1036},[6699],{"type":998,"value":1177},{"type":993,"tag":1021,"props":6701,"children":6702},{"style":1042},[6703],{"type":998,"value":1182},{"type":993,"tag":1021,"props":6705,"children":6706},{"style":1115},[6707],{"type":998,"value":6708},"\"Point at (",{"type":993,"tag":1021,"props":6710,"children":6711},{"style":1053},[6712],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6714,"children":6715},{"style":1036},[6716],{"type":998,"value":1197},{"type":993,"tag":1021,"props":6718,"children":6719},{"style":1053},[6720],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6722,"children":6723},{"style":1115},[6724],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6726,"children":6727},{"style":1053},[6728],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6730,"children":6731},{"style":1036},[6732],{"type":998,"value":1216},{"type":993,"tag":1021,"props":6734,"children":6735},{"style":1053},[6736],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6738,"children":6739},{"style":1115},[6740],{"type":998,"value":1957},{"type":993,"tag":1021,"props":6742,"children":6743},{"style":1036},[6744],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6746,"children":6747},{"class":1023,"line":81},[6748],{"type":993,"tag":1021,"props":6749,"children":6750},{"emptyLinePlaceholder":13},[6751],{"type":998,"value":1096},{"type":993,"tag":1021,"props":6753,"children":6754},{"class":1023,"line":91},[6755,6759,6763,6767,6772,6777],{"type":993,"tag":1021,"props":6756,"children":6757},{"style":1053},[6758],{"type":998,"value":1172},{"type":993,"tag":1021,"props":6760,"children":6761},{"style":1036},[6762],{"type":998,"value":1177},{"type":993,"tag":1021,"props":6764,"children":6765},{"style":1115},[6766],{"type":998,"value":1225},{"type":993,"tag":1021,"props":6768,"children":6769},{"style":1053},[6770],{"type":998,"value":6771},"\\n",{"type":993,"tag":1021,"props":6773,"children":6774},{"style":1115},[6775],{"type":998,"value":6776},"Student grades:\"",{"type":993,"tag":1021,"props":6778,"children":6779},{"style":1036},[6780],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6782,"children":6783},{"class":1023,"line":100},[6784,6788,6793,6797],{"type":993,"tag":1021,"props":6785,"children":6786},{"style":1042},[6787],{"type":998,"value":6673},{"type":993,"tag":1021,"props":6789,"children":6790},{"style":1036},[6791],{"type":998,"value":6792}," name, grade ",{"type":993,"tag":1021,"props":6794,"children":6795},{"style":1042},[6796],{"type":998,"value":6683},{"type":993,"tag":1021,"props":6798,"children":6799},{"style":1036},[6800],{"type":998,"value":6801}," students:\n",{"type":993,"tag":1021,"props":6803,"children":6804},{"class":1023,"line":109},[6805,6810,6814,6819,6824,6829,6833,6838,6843],{"type":993,"tag":1021,"props":6806,"children":6807},{"style":1036},[6808],{"type":998,"value":6809},"    status ",{"type":993,"tag":1021,"props":6811,"children":6812},{"style":1042},[6813],{"type":998,"value":1045},{"type":993,"tag":1021,"props":6815,"children":6816},{"style":1115},[6817],{"type":998,"value":6818}," \"Pass\"",{"type":993,"tag":1021,"props":6820,"children":6821},{"style":1042},[6822],{"type":998,"value":6823}," if",{"type":993,"tag":1021,"props":6825,"children":6826},{"style":1036},[6827],{"type":998,"value":6828}," grade ",{"type":993,"tag":1021,"props":6830,"children":6831},{"style":1042},[6832],{"type":998,"value":4562},{"type":993,"tag":1021,"props":6834,"children":6835},{"style":1053},[6836],{"type":998,"value":6837}," 80",{"type":993,"tag":1021,"props":6839,"children":6840},{"style":1042},[6841],{"type":998,"value":6842}," else",{"type":993,"tag":1021,"props":6844,"children":6845},{"style":1115},[6846],{"type":998,"value":6847}," \"Needs improvement\"\n",{"type":993,"tag":1021,"props":6849,"children":6850},{"class":1023,"line":118},[6851,6855,6859,6863,6867,6871,6875,6879,6883,6887,6892,6896,6900,6904,6909,6913,6917],{"type":993,"tag":1021,"props":6852,"children":6853},{"style":1053},[6854],{"type":998,"value":5441},{"type":993,"tag":1021,"props":6856,"children":6857},{"style":1036},[6858],{"type":998,"value":1177},{"type":993,"tag":1021,"props":6860,"children":6861},{"style":1042},[6862],{"type":998,"value":1182},{"type":993,"tag":1021,"props":6864,"children":6865},{"style":1115},[6866],{"type":998,"value":1225},{"type":993,"tag":1021,"props":6868,"children":6869},{"style":1053},[6870],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6872,"children":6873},{"style":1036},[6874],{"type":998,"value":1258},{"type":993,"tag":1021,"props":6876,"children":6877},{"style":1053},[6878],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6880,"children":6881},{"style":1115},[6882],{"type":998,"value":5976},{"type":993,"tag":1021,"props":6884,"children":6885},{"style":1053},[6886],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6888,"children":6889},{"style":1036},[6890],{"type":998,"value":6891},"grade",{"type":993,"tag":1021,"props":6893,"children":6894},{"style":1053},[6895],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6897,"children":6898},{"style":1115},[6899],{"type":998,"value":2252},{"type":993,"tag":1021,"props":6901,"children":6902},{"style":1053},[6903],{"type":998,"value":1192},{"type":993,"tag":1021,"props":6905,"children":6906},{"style":1036},[6907],{"type":998,"value":6908},"status",{"type":993,"tag":1021,"props":6910,"children":6911},{"style":1053},[6912],{"type":998,"value":1202},{"type":993,"tag":1021,"props":6914,"children":6915},{"style":1115},[6916],{"type":998,"value":1225},{"type":993,"tag":1021,"props":6918,"children":6919},{"style":1036},[6920],{"type":998,"value":1071},{"type":993,"tag":1021,"props":6922,"children":6923},{"class":1023,"line":127},[6924],{"type":993,"tag":1021,"props":6925,"children":6926},{"emptyLinePlaceholder":13},[6927],{"type":998,"value":1096},{"type":993,"tag":1021,"props":6929,"children":6930},{"class":1023,"line":136},[6931],{"type":993,"tag":1021,"props":6932,"children":6933},{"style":1027},[6934],{"type":998,"value":6935},"# Nested tuple unpacking in loops\n",{"type":993,"tag":1021,"props":6937,"children":6938},{"class":1023,"line":146},[6939,6944,6948,6953,6957,6961,6965,6969,6973,6977,6981,6986,6990,6994,6998,7002,7007,7011,7015],{"type":993,"tag":1021,"props":6940,"children":6941},{"style":1036},[6942],{"type":998,"value":6943},"lines ",{"type":993,"tag":1021,"props":6945,"children":6946},{"style":1042},[6947],{"type":998,"value":1045},{"type":993,"tag":1021,"props":6949,"children":6950},{"style":1036},[6951],{"type":998,"value":6952}," [((",{"type":993,"tag":1021,"props":6954,"children":6955},{"style":1053},[6956],{"type":998,"value":1676},{"type":993,"tag":1021,"props":6958,"children":6959},{"style":1036},[6960],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6962,"children":6963},{"style":1053},[6964],{"type":998,"value":1676},{"type":993,"tag":1021,"props":6966,"children":6967},{"style":1036},[6968],{"type":998,"value":2321},{"type":993,"tag":1021,"props":6970,"children":6971},{"style":1053},[6972],{"type":998,"value":1056},{"type":993,"tag":1021,"props":6974,"children":6975},{"style":1036},[6976],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6978,"children":6979},{"style":1053},[6980],{"type":998,"value":1056},{"type":993,"tag":1021,"props":6982,"children":6983},{"style":1036},[6984],{"type":998,"value":6985},")), ((",{"type":993,"tag":1021,"props":6987,"children":6988},{"style":1053},[6989],{"type":998,"value":3044},{"type":993,"tag":1021,"props":6991,"children":6992},{"style":1036},[6993],{"type":998,"value":1061},{"type":993,"tag":1021,"props":6995,"children":6996},{"style":1053},[6997],{"type":998,"value":3044},{"type":993,"tag":1021,"props":6999,"children":7000},{"style":1036},[7001],{"type":998,"value":2321},{"type":993,"tag":1021,"props":7003,"children":7004},{"style":1053},[7005],{"type":998,"value":7006},"15",{"type":993,"tag":1021,"props":7008,"children":7009},{"style":1036},[7010],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7012,"children":7013},{"style":1053},[7014],{"type":998,"value":7006},{"type":993,"tag":1021,"props":7016,"children":7017},{"style":1036},[7018],{"type":998,"value":7019},"))]\n",{"type":993,"tag":1021,"props":7021,"children":7022},{"class":1023,"line":155},[7023,7027,7032,7036],{"type":993,"tag":1021,"props":7024,"children":7025},{"style":1042},[7026],{"type":998,"value":6673},{"type":993,"tag":1021,"props":7028,"children":7029},{"style":1036},[7030],{"type":998,"value":7031}," (x1, y1), (x2, y2) ",{"type":993,"tag":1021,"props":7033,"children":7034},{"style":1042},[7035],{"type":998,"value":6683},{"type":993,"tag":1021,"props":7037,"children":7038},{"style":1036},[7039],{"type":998,"value":7040}," lines:\n",{"type":993,"tag":1021,"props":7042,"children":7043},{"class":1023,"line":164},[7044,7049,7053,7058,7062,7067,7072,7076,7081,7086,7090,7095,7099,7103,7108,7112],{"type":993,"tag":1021,"props":7045,"children":7046},{"style":1036},[7047],{"type":998,"value":7048},"    length ",{"type":993,"tag":1021,"props":7050,"children":7051},{"style":1042},[7052],{"type":998,"value":1045},{"type":993,"tag":1021,"props":7054,"children":7055},{"style":1036},[7056],{"type":998,"value":7057}," ((x2",{"type":993,"tag":1021,"props":7059,"children":7060},{"style":1042},[7061],{"type":998,"value":4599},{"type":993,"tag":1021,"props":7063,"children":7064},{"style":1036},[7065],{"type":998,"value":7066},"x1)",{"type":993,"tag":1021,"props":7068,"children":7069},{"style":1042},[7070],{"type":998,"value":7071},"**",{"type":993,"tag":1021,"props":7073,"children":7074},{"style":1053},[7075],{"type":998,"value":2098},{"type":993,"tag":1021,"props":7077,"children":7078},{"style":1042},[7079],{"type":998,"value":7080}," +",{"type":993,"tag":1021,"props":7082,"children":7083},{"style":1036},[7084],{"type":998,"value":7085}," (y2",{"type":993,"tag":1021,"props":7087,"children":7088},{"style":1042},[7089],{"type":998,"value":4599},{"type":993,"tag":1021,"props":7091,"children":7092},{"style":1036},[7093],{"type":998,"value":7094},"y1)",{"type":993,"tag":1021,"props":7096,"children":7097},{"style":1042},[7098],{"type":998,"value":7071},{"type":993,"tag":1021,"props":7100,"children":7101},{"style":1053},[7102],{"type":998,"value":2098},{"type":993,"tag":1021,"props":7104,"children":7105},{"style":1036},[7106],{"type":998,"value":7107},")",{"type":993,"tag":1021,"props":7109,"children":7110},{"style":1042},[7111],{"type":998,"value":7071},{"type":993,"tag":1021,"props":7113,"children":7114},{"style":1053},[7115],{"type":998,"value":7116},"0.5\n",{"type":993,"tag":1021,"props":7118,"children":7119},{"class":1023,"line":173},[7120,7124,7128,7132,7137,7141,7145,7149,7154,7158,7162,7166,7170,7174,7178,7182,7186,7190,7194,7198,7203,7207,7212,7216,7220,7224],{"type":993,"tag":1021,"props":7121,"children":7122},{"style":1053},[7123],{"type":998,"value":5441},{"type":993,"tag":1021,"props":7125,"children":7126},{"style":1036},[7127],{"type":998,"value":1177},{"type":993,"tag":1021,"props":7129,"children":7130},{"style":1042},[7131],{"type":998,"value":1182},{"type":993,"tag":1021,"props":7133,"children":7134},{"style":1115},[7135],{"type":998,"value":7136},"\"Line from (",{"type":993,"tag":1021,"props":7138,"children":7139},{"style":1053},[7140],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7142,"children":7143},{"style":1036},[7144],{"type":998,"value":4048},{"type":993,"tag":1021,"props":7146,"children":7147},{"style":1053},[7148],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7150,"children":7151},{"style":1115},[7152],{"type":998,"value":7153},",",{"type":993,"tag":1021,"props":7155,"children":7156},{"style":1053},[7157],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7159,"children":7160},{"style":1036},[7161],{"type":998,"value":4065},{"type":993,"tag":1021,"props":7163,"children":7164},{"style":1053},[7165],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7167,"children":7168},{"style":1115},[7169],{"type":998,"value":4074},{"type":993,"tag":1021,"props":7171,"children":7172},{"style":1053},[7173],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7175,"children":7176},{"style":1036},[7177],{"type":998,"value":4083},{"type":993,"tag":1021,"props":7179,"children":7180},{"style":1053},[7181],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7183,"children":7184},{"style":1115},[7185],{"type":998,"value":7153},{"type":993,"tag":1021,"props":7187,"children":7188},{"style":1053},[7189],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7191,"children":7192},{"style":1036},[7193],{"type":998,"value":4100},{"type":993,"tag":1021,"props":7195,"children":7196},{"style":1053},[7197],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7199,"children":7200},{"style":1115},[7201],{"type":998,"value":7202},"), length: ",{"type":993,"tag":1021,"props":7204,"children":7205},{"style":1053},[7206],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7208,"children":7209},{"style":1036},[7210],{"type":998,"value":7211},"length",{"type":993,"tag":1021,"props":7213,"children":7214},{"style":1042},[7215],{"type":998,"value":5027},{"type":993,"tag":1021,"props":7217,"children":7218},{"style":1053},[7219],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7221,"children":7222},{"style":1115},[7223],{"type":998,"value":1225},{"type":993,"tag":1021,"props":7225,"children":7226},{"style":1036},[7227],{"type":998,"value":1071},{"type":993,"tag":1609,"props":7229,"children":7231},{"id":7230},"enumerate-with-unpacking",[7232],{"type":998,"value":7233},"Enumerate with Unpacking",{"type":993,"tag":1001,"props":7235,"children":7236},{},[7237],{"type":998,"value":7238},"Combining enumerate() with tuple unpacking for position-aware structured data iteration.",{"type":993,"tag":1007,"props":7240,"children":7241},{},[7242],{"type":993,"tag":1011,"props":7243,"children":7245},{"className":1013,"code":7244,"language":6,"meta":8,"style":8},"# Enumerate with unpacking\ncolors = [(\"red\", 255, 0, 0), (\"green\", 0, 255, 0), (\"blue\", 0, 0, 255)]\n\nprint(\"Color definitions:\")\nfor index, (name, r, g, b) in enumerate(colors):\n    print(f\"{index + 1}. {name}: RGB({r}, {g}, {b})\")\n\n# Processing with positions\ncoordinates = [(10, 20), (30, 40), (50, 60)]\nfor i, (x, y) in enumerate(coordinates):\n    print(f\"Point {i}: coordinates ({x}, {y}), distance from origin: {(x**2 + y**2)**0.5:.1f}\")\n",[7246],{"type":993,"tag":1017,"props":7247,"children":7248},{"__ignoreMap":8},[7249,7257,7372,7379,7399,7425,7539,7546,7554,7617,7642],{"type":993,"tag":1021,"props":7250,"children":7251},{"class":1023,"line":12},[7252],{"type":993,"tag":1021,"props":7253,"children":7254},{"style":1027},[7255],{"type":998,"value":7256},"# Enumerate with unpacking\n",{"type":993,"tag":1021,"props":7258,"children":7259},{"class":1023,"line":27},[7260,7265,7269,7273,7278,7282,7286,7290,7294,7298,7302,7306,7311,7315,7319,7323,7327,7331,7335,7339,7344,7348,7352,7356,7360,7364,7368],{"type":993,"tag":1021,"props":7261,"children":7262},{"style":1036},[7263],{"type":998,"value":7264},"colors ",{"type":993,"tag":1021,"props":7266,"children":7267},{"style":1042},[7268],{"type":998,"value":1045},{"type":993,"tag":1021,"props":7270,"children":7271},{"style":1036},[7272],{"type":998,"value":6521},{"type":993,"tag":1021,"props":7274,"children":7275},{"style":1115},[7276],{"type":998,"value":7277},"\"red\"",{"type":993,"tag":1021,"props":7279,"children":7280},{"style":1036},[7281],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7283,"children":7284},{"style":1053},[7285],{"type":998,"value":1658},{"type":993,"tag":1021,"props":7287,"children":7288},{"style":1036},[7289],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7291,"children":7292},{"style":1053},[7293],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7295,"children":7296},{"style":1036},[7297],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7299,"children":7300},{"style":1053},[7301],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7303,"children":7304},{"style":1036},[7305],{"type":998,"value":2321},{"type":993,"tag":1021,"props":7307,"children":7308},{"style":1115},[7309],{"type":998,"value":7310},"\"green\"",{"type":993,"tag":1021,"props":7312,"children":7313},{"style":1036},[7314],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7316,"children":7317},{"style":1053},[7318],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7320,"children":7321},{"style":1036},[7322],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7324,"children":7325},{"style":1053},[7326],{"type":998,"value":1658},{"type":993,"tag":1021,"props":7328,"children":7329},{"style":1036},[7330],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7332,"children":7333},{"style":1053},[7334],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7336,"children":7337},{"style":1036},[7338],{"type":998,"value":2321},{"type":993,"tag":1021,"props":7340,"children":7341},{"style":1115},[7342],{"type":998,"value":7343},"\"blue\"",{"type":993,"tag":1021,"props":7345,"children":7346},{"style":1036},[7347],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7349,"children":7350},{"style":1053},[7351],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7353,"children":7354},{"style":1036},[7355],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7357,"children":7358},{"style":1053},[7359],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7361,"children":7362},{"style":1036},[7363],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7365,"children":7366},{"style":1053},[7367],{"type":998,"value":1658},{"type":993,"tag":1021,"props":7369,"children":7370},{"style":1036},[7371],{"type":998,"value":6573},{"type":993,"tag":1021,"props":7373,"children":7374},{"class":1023,"line":36},[7375],{"type":993,"tag":1021,"props":7376,"children":7377},{"emptyLinePlaceholder":13},[7378],{"type":998,"value":1096},{"type":993,"tag":1021,"props":7380,"children":7381},{"class":1023,"line":45},[7382,7386,7390,7395],{"type":993,"tag":1021,"props":7383,"children":7384},{"style":1053},[7385],{"type":998,"value":1172},{"type":993,"tag":1021,"props":7387,"children":7388},{"style":1036},[7389],{"type":998,"value":1177},{"type":993,"tag":1021,"props":7391,"children":7392},{"style":1115},[7393],{"type":998,"value":7394},"\"Color definitions:\"",{"type":993,"tag":1021,"props":7396,"children":7397},{"style":1036},[7398],{"type":998,"value":1071},{"type":993,"tag":1021,"props":7400,"children":7401},{"class":1023,"line":54},[7402,7406,7411,7415,7420],{"type":993,"tag":1021,"props":7403,"children":7404},{"style":1042},[7405],{"type":998,"value":6673},{"type":993,"tag":1021,"props":7407,"children":7408},{"style":1036},[7409],{"type":998,"value":7410}," index, (name, r, g, b) ",{"type":993,"tag":1021,"props":7412,"children":7413},{"style":1042},[7414],{"type":998,"value":6683},{"type":993,"tag":1021,"props":7416,"children":7417},{"style":1053},[7418],{"type":998,"value":7419}," enumerate",{"type":993,"tag":1021,"props":7421,"children":7422},{"style":1036},[7423],{"type":998,"value":7424},"(colors):\n",{"type":993,"tag":1021,"props":7426,"children":7427},{"class":1023,"line":63},[7428,7432,7436,7440,7444,7448,7453,7458,7463,7468,7472,7476,7480,7485,7489,7494,7498,7502,7506,7511,7515,7519,7523,7527,7531,7535],{"type":993,"tag":1021,"props":7429,"children":7430},{"style":1053},[7431],{"type":998,"value":5441},{"type":993,"tag":1021,"props":7433,"children":7434},{"style":1036},[7435],{"type":998,"value":1177},{"type":993,"tag":1021,"props":7437,"children":7438},{"style":1042},[7439],{"type":998,"value":1182},{"type":993,"tag":1021,"props":7441,"children":7442},{"style":1115},[7443],{"type":998,"value":1225},{"type":993,"tag":1021,"props":7445,"children":7446},{"style":1053},[7447],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7449,"children":7450},{"style":1036},[7451],{"type":998,"value":7452},"index ",{"type":993,"tag":1021,"props":7454,"children":7455},{"style":1042},[7456],{"type":998,"value":7457},"+",{"type":993,"tag":1021,"props":7459,"children":7460},{"style":1053},[7461],{"type":998,"value":7462}," 1}",{"type":993,"tag":1021,"props":7464,"children":7465},{"style":1115},[7466],{"type":998,"value":7467},". ",{"type":993,"tag":1021,"props":7469,"children":7470},{"style":1053},[7471],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7473,"children":7474},{"style":1036},[7475],{"type":998,"value":1258},{"type":993,"tag":1021,"props":7477,"children":7478},{"style":1053},[7479],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7481,"children":7482},{"style":1115},[7483],{"type":998,"value":7484},": RGB(",{"type":993,"tag":1021,"props":7486,"children":7487},{"style":1053},[7488],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7490,"children":7491},{"style":1036},[7492],{"type":998,"value":7493},"r",{"type":993,"tag":1021,"props":7495,"children":7496},{"style":1053},[7497],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7499,"children":7500},{"style":1115},[7501],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7503,"children":7504},{"style":1053},[7505],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7507,"children":7508},{"style":1036},[7509],{"type":998,"value":7510},"g",{"type":993,"tag":1021,"props":7512,"children":7513},{"style":1053},[7514],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7516,"children":7517},{"style":1115},[7518],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7520,"children":7521},{"style":1053},[7522],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7524,"children":7525},{"style":1036},[7526],{"type":998,"value":1394},{"type":993,"tag":1021,"props":7528,"children":7529},{"style":1053},[7530],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7532,"children":7533},{"style":1115},[7534],{"type":998,"value":1957},{"type":993,"tag":1021,"props":7536,"children":7537},{"style":1036},[7538],{"type":998,"value":1071},{"type":993,"tag":1021,"props":7540,"children":7541},{"class":1023,"line":72},[7542],{"type":993,"tag":1021,"props":7543,"children":7544},{"emptyLinePlaceholder":13},[7545],{"type":998,"value":1096},{"type":993,"tag":1021,"props":7547,"children":7548},{"class":1023,"line":81},[7549],{"type":993,"tag":1021,"props":7550,"children":7551},{"style":1027},[7552],{"type":998,"value":7553},"# Processing with positions\n",{"type":993,"tag":1021,"props":7555,"children":7556},{"class":1023,"line":91},[7557,7561,7565,7569,7573,7577,7581,7585,7589,7593,7597,7601,7605,7609,7613],{"type":993,"tag":1021,"props":7558,"children":7559},{"style":1036},[7560],{"type":998,"value":1712},{"type":993,"tag":1021,"props":7562,"children":7563},{"style":1042},[7564],{"type":998,"value":1045},{"type":993,"tag":1021,"props":7566,"children":7567},{"style":1036},[7568],{"type":998,"value":6521},{"type":993,"tag":1021,"props":7570,"children":7571},{"style":1053},[7572],{"type":998,"value":1056},{"type":993,"tag":1021,"props":7574,"children":7575},{"style":1036},[7576],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7578,"children":7579},{"style":1053},[7580],{"type":998,"value":1066},{"type":993,"tag":1021,"props":7582,"children":7583},{"style":1036},[7584],{"type":998,"value":2321},{"type":993,"tag":1021,"props":7586,"children":7587},{"style":1053},[7588],{"type":998,"value":2334},{"type":993,"tag":1021,"props":7590,"children":7591},{"style":1036},[7592],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7594,"children":7595},{"style":1053},[7596],{"type":998,"value":6550},{"type":993,"tag":1021,"props":7598,"children":7599},{"style":1036},[7600],{"type":998,"value":2321},{"type":993,"tag":1021,"props":7602,"children":7603},{"style":1053},[7604],{"type":998,"value":6559},{"type":993,"tag":1021,"props":7606,"children":7607},{"style":1036},[7608],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7610,"children":7611},{"style":1053},[7612],{"type":998,"value":6568},{"type":993,"tag":1021,"props":7614,"children":7615},{"style":1036},[7616],{"type":998,"value":6573},{"type":993,"tag":1021,"props":7618,"children":7619},{"class":1023,"line":100},[7620,7624,7629,7633,7637],{"type":993,"tag":1021,"props":7621,"children":7622},{"style":1042},[7623],{"type":998,"value":6673},{"type":993,"tag":1021,"props":7625,"children":7626},{"style":1036},[7627],{"type":998,"value":7628}," i, (x, y) ",{"type":993,"tag":1021,"props":7630,"children":7631},{"style":1042},[7632],{"type":998,"value":6683},{"type":993,"tag":1021,"props":7634,"children":7635},{"style":1053},[7636],{"type":998,"value":7419},{"type":993,"tag":1021,"props":7638,"children":7639},{"style":1036},[7640],{"type":998,"value":7641},"(coordinates):\n",{"type":993,"tag":1021,"props":7643,"children":7644},{"class":1023,"line":109},[7645,7649,7653,7657,7662,7666,7671,7675,7680,7684,7688,7692,7696,7700,7704,7708,7713,7717,7722,7726,7730,7734,7739,7743,7747,7751,7755,7760,7764,7768,7772],{"type":993,"tag":1021,"props":7646,"children":7647},{"style":1053},[7648],{"type":998,"value":5441},{"type":993,"tag":1021,"props":7650,"children":7651},{"style":1036},[7652],{"type":998,"value":1177},{"type":993,"tag":1021,"props":7654,"children":7655},{"style":1042},[7656],{"type":998,"value":1182},{"type":993,"tag":1021,"props":7658,"children":7659},{"style":1115},[7660],{"type":998,"value":7661},"\"Point ",{"type":993,"tag":1021,"props":7663,"children":7664},{"style":1053},[7665],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7667,"children":7668},{"style":1036},[7669],{"type":998,"value":7670},"i",{"type":993,"tag":1021,"props":7672,"children":7673},{"style":1053},[7674],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7676,"children":7677},{"style":1115},[7678],{"type":998,"value":7679},": coordinates (",{"type":993,"tag":1021,"props":7681,"children":7682},{"style":1053},[7683],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7685,"children":7686},{"style":1036},[7687],{"type":998,"value":1197},{"type":993,"tag":1021,"props":7689,"children":7690},{"style":1053},[7691],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7693,"children":7694},{"style":1115},[7695],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7697,"children":7698},{"style":1053},[7699],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7701,"children":7702},{"style":1036},[7703],{"type":998,"value":1216},{"type":993,"tag":1021,"props":7705,"children":7706},{"style":1053},[7707],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7709,"children":7710},{"style":1115},[7711],{"type":998,"value":7712},"), distance from origin: ",{"type":993,"tag":1021,"props":7714,"children":7715},{"style":1053},[7716],{"type":998,"value":1192},{"type":993,"tag":1021,"props":7718,"children":7719},{"style":1036},[7720],{"type":998,"value":7721},"(x",{"type":993,"tag":1021,"props":7723,"children":7724},{"style":1042},[7725],{"type":998,"value":7071},{"type":993,"tag":1021,"props":7727,"children":7728},{"style":1053},[7729],{"type":998,"value":2098},{"type":993,"tag":1021,"props":7731,"children":7732},{"style":1042},[7733],{"type":998,"value":7080},{"type":993,"tag":1021,"props":7735,"children":7736},{"style":1036},[7737],{"type":998,"value":7738}," y",{"type":993,"tag":1021,"props":7740,"children":7741},{"style":1042},[7742],{"type":998,"value":7071},{"type":993,"tag":1021,"props":7744,"children":7745},{"style":1053},[7746],{"type":998,"value":2098},{"type":993,"tag":1021,"props":7748,"children":7749},{"style":1036},[7750],{"type":998,"value":7107},{"type":993,"tag":1021,"props":7752,"children":7753},{"style":1042},[7754],{"type":998,"value":7071},{"type":993,"tag":1021,"props":7756,"children":7757},{"style":1053},[7758],{"type":998,"value":7759},"0.5",{"type":993,"tag":1021,"props":7761,"children":7762},{"style":1042},[7763],{"type":998,"value":5027},{"type":993,"tag":1021,"props":7765,"children":7766},{"style":1053},[7767],{"type":998,"value":1202},{"type":993,"tag":1021,"props":7769,"children":7770},{"style":1115},[7771],{"type":998,"value":1225},{"type":993,"tag":1021,"props":7773,"children":7774},{"style":1036},[7775],{"type":998,"value":1071},{"type":993,"tag":1609,"props":7777,"children":7779},{"id":7778},"dictionary-items-unpacking",[7780],{"type":998,"value":7781},"Dictionary Items Unpacking",{"type":993,"tag":1001,"props":7783,"children":7784},{},[7785],{"type":998,"value":7786},"Elegant key-value pair iteration using tuple unpacking with dictionary methods.",{"type":993,"tag":1007,"props":7788,"children":7789},{},[7790],{"type":993,"tag":1011,"props":7791,"children":7793},{"className":1013,"code":7792,"language":6,"meta":8,"style":8},"# Dictionary unpacking\nuser_scores = {\"Alice\": 95, \"Bob\": 87, \"Carol\": 92}\ncoordinates = {\"origin\": (0, 0), \"center\": (50, 50), \"corner\": (100, 100)}\n\nprint(\"User scores:\")\nfor name, score in user_scores.items():\n    grade = \"A\" if score >= 90 else \"B\" if score >= 80 else \"C\"\n    print(f\"{name}: {score} (Grade {grade})\")\n\nprint(\"\\nCoordinates:\")\nfor location, (x, y) in coordinates.items():\n    print(f\"{location}: ({x}, {y})\")\n",[7794],{"type":993,"tag":1017,"props":7795,"children":7796},{"__ignoreMap":8},[7797,7805,7869,7962,7969,7989,8010,8079,8152,8159,8187,8208],{"type":993,"tag":1021,"props":7798,"children":7799},{"class":1023,"line":12},[7800],{"type":993,"tag":1021,"props":7801,"children":7802},{"style":1027},[7803],{"type":998,"value":7804},"# Dictionary unpacking\n",{"type":993,"tag":1021,"props":7806,"children":7807},{"class":1023,"line":27},[7808,7813,7817,7821,7825,7829,7833,7837,7841,7845,7849,7853,7857,7861,7865],{"type":993,"tag":1021,"props":7809,"children":7810},{"style":1036},[7811],{"type":998,"value":7812},"user_scores ",{"type":993,"tag":1021,"props":7814,"children":7815},{"style":1042},[7816],{"type":998,"value":1045},{"type":993,"tag":1021,"props":7818,"children":7819},{"style":1036},[7820],{"type":998,"value":4940},{"type":993,"tag":1021,"props":7822,"children":7823},{"style":1115},[7824],{"type":998,"value":1118},{"type":993,"tag":1021,"props":7826,"children":7827},{"style":1036},[7828],{"type":998,"value":5976},{"type":993,"tag":1021,"props":7830,"children":7831},{"style":1053},[7832],{"type":998,"value":3668},{"type":993,"tag":1021,"props":7834,"children":7835},{"style":1036},[7836],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7838,"children":7839},{"style":1115},[7840],{"type":998,"value":1782},{"type":993,"tag":1021,"props":7842,"children":7843},{"style":1036},[7844],{"type":998,"value":5976},{"type":993,"tag":1021,"props":7846,"children":7847},{"style":1053},[7848],{"type":998,"value":3677},{"type":993,"tag":1021,"props":7850,"children":7851},{"style":1036},[7852],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7854,"children":7855},{"style":1115},[7856],{"type":998,"value":6626},{"type":993,"tag":1021,"props":7858,"children":7859},{"style":1036},[7860],{"type":998,"value":5976},{"type":993,"tag":1021,"props":7862,"children":7863},{"style":1053},[7864],{"type":998,"value":3686},{"type":993,"tag":1021,"props":7866,"children":7867},{"style":1036},[7868],{"type":998,"value":6019},{"type":993,"tag":1021,"props":7870,"children":7871},{"class":1023,"line":36},[7872,7876,7880,7884,7889,7894,7898,7902,7906,7911,7916,7920,7924,7928,7932,7936,7941,7945,7949,7953,7957],{"type":993,"tag":1021,"props":7873,"children":7874},{"style":1036},[7875],{"type":998,"value":1712},{"type":993,"tag":1021,"props":7877,"children":7878},{"style":1042},[7879],{"type":998,"value":1045},{"type":993,"tag":1021,"props":7881,"children":7882},{"style":1036},[7883],{"type":998,"value":4940},{"type":993,"tag":1021,"props":7885,"children":7886},{"style":1115},[7887],{"type":998,"value":7888},"\"origin\"",{"type":993,"tag":1021,"props":7890,"children":7891},{"style":1036},[7892],{"type":998,"value":7893},": (",{"type":993,"tag":1021,"props":7895,"children":7896},{"style":1053},[7897],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7899,"children":7900},{"style":1036},[7901],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7903,"children":7904},{"style":1053},[7905],{"type":998,"value":1676},{"type":993,"tag":1021,"props":7907,"children":7908},{"style":1036},[7909],{"type":998,"value":7910},"), ",{"type":993,"tag":1021,"props":7912,"children":7913},{"style":1115},[7914],{"type":998,"value":7915},"\"center\"",{"type":993,"tag":1021,"props":7917,"children":7918},{"style":1036},[7919],{"type":998,"value":7893},{"type":993,"tag":1021,"props":7921,"children":7922},{"style":1053},[7923],{"type":998,"value":6559},{"type":993,"tag":1021,"props":7925,"children":7926},{"style":1036},[7927],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7929,"children":7930},{"style":1053},[7931],{"type":998,"value":6559},{"type":993,"tag":1021,"props":7933,"children":7934},{"style":1036},[7935],{"type":998,"value":7910},{"type":993,"tag":1021,"props":7937,"children":7938},{"style":1115},[7939],{"type":998,"value":7940},"\"corner\"",{"type":993,"tag":1021,"props":7942,"children":7943},{"style":1036},[7944],{"type":998,"value":7893},{"type":993,"tag":1021,"props":7946,"children":7947},{"style":1053},[7948],{"type":998,"value":1725},{"type":993,"tag":1021,"props":7950,"children":7951},{"style":1036},[7952],{"type":998,"value":1061},{"type":993,"tag":1021,"props":7954,"children":7955},{"style":1053},[7956],{"type":998,"value":1725},{"type":993,"tag":1021,"props":7958,"children":7959},{"style":1036},[7960],{"type":998,"value":7961},")}\n",{"type":993,"tag":1021,"props":7963,"children":7964},{"class":1023,"line":45},[7965],{"type":993,"tag":1021,"props":7966,"children":7967},{"emptyLinePlaceholder":13},[7968],{"type":998,"value":1096},{"type":993,"tag":1021,"props":7970,"children":7971},{"class":1023,"line":54},[7972,7976,7980,7985],{"type":993,"tag":1021,"props":7973,"children":7974},{"style":1053},[7975],{"type":998,"value":1172},{"type":993,"tag":1021,"props":7977,"children":7978},{"style":1036},[7979],{"type":998,"value":1177},{"type":993,"tag":1021,"props":7981,"children":7982},{"style":1115},[7983],{"type":998,"value":7984},"\"User scores:\"",{"type":993,"tag":1021,"props":7986,"children":7987},{"style":1036},[7988],{"type":998,"value":1071},{"type":993,"tag":1021,"props":7990,"children":7991},{"class":1023,"line":63},[7992,7996,8001,8005],{"type":993,"tag":1021,"props":7993,"children":7994},{"style":1042},[7995],{"type":998,"value":6673},{"type":993,"tag":1021,"props":7997,"children":7998},{"style":1036},[7999],{"type":998,"value":8000}," name, score ",{"type":993,"tag":1021,"props":8002,"children":8003},{"style":1042},[8004],{"type":998,"value":6683},{"type":993,"tag":1021,"props":8006,"children":8007},{"style":1036},[8008],{"type":998,"value":8009}," user_scores.items():\n",{"type":993,"tag":1021,"props":8011,"children":8012},{"class":1023,"line":72},[8013,8018,8022,8027,8031,8036,8040,8045,8049,8054,8058,8062,8066,8070,8074],{"type":993,"tag":1021,"props":8014,"children":8015},{"style":1036},[8016],{"type":998,"value":8017},"    grade ",{"type":993,"tag":1021,"props":8019,"children":8020},{"style":1042},[8021],{"type":998,"value":1045},{"type":993,"tag":1021,"props":8023,"children":8024},{"style":1115},[8025],{"type":998,"value":8026}," \"A\"",{"type":993,"tag":1021,"props":8028,"children":8029},{"style":1042},[8030],{"type":998,"value":6823},{"type":993,"tag":1021,"props":8032,"children":8033},{"style":1036},[8034],{"type":998,"value":8035}," score ",{"type":993,"tag":1021,"props":8037,"children":8038},{"style":1042},[8039],{"type":998,"value":4562},{"type":993,"tag":1021,"props":8041,"children":8042},{"style":1053},[8043],{"type":998,"value":8044}," 90",{"type":993,"tag":1021,"props":8046,"children":8047},{"style":1042},[8048],{"type":998,"value":6842},{"type":993,"tag":1021,"props":8050,"children":8051},{"style":1115},[8052],{"type":998,"value":8053}," \"B\"",{"type":993,"tag":1021,"props":8055,"children":8056},{"style":1042},[8057],{"type":998,"value":6823},{"type":993,"tag":1021,"props":8059,"children":8060},{"style":1036},[8061],{"type":998,"value":8035},{"type":993,"tag":1021,"props":8063,"children":8064},{"style":1042},[8065],{"type":998,"value":4562},{"type":993,"tag":1021,"props":8067,"children":8068},{"style":1053},[8069],{"type":998,"value":6837},{"type":993,"tag":1021,"props":8071,"children":8072},{"style":1042},[8073],{"type":998,"value":6842},{"type":993,"tag":1021,"props":8075,"children":8076},{"style":1115},[8077],{"type":998,"value":8078}," \"C\"\n",{"type":993,"tag":1021,"props":8080,"children":8081},{"class":1023,"line":81},[8082,8086,8090,8094,8098,8102,8106,8110,8114,8118,8123,8127,8132,8136,8140,8144,8148],{"type":993,"tag":1021,"props":8083,"children":8084},{"style":1053},[8085],{"type":998,"value":5441},{"type":993,"tag":1021,"props":8087,"children":8088},{"style":1036},[8089],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8091,"children":8092},{"style":1042},[8093],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8095,"children":8096},{"style":1115},[8097],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8099,"children":8100},{"style":1053},[8101],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8103,"children":8104},{"style":1036},[8105],{"type":998,"value":1258},{"type":993,"tag":1021,"props":8107,"children":8108},{"style":1053},[8109],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8111,"children":8112},{"style":1115},[8113],{"type":998,"value":5976},{"type":993,"tag":1021,"props":8115,"children":8116},{"style":1053},[8117],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8119,"children":8120},{"style":1036},[8121],{"type":998,"value":8122},"score",{"type":993,"tag":1021,"props":8124,"children":8125},{"style":1053},[8126],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8128,"children":8129},{"style":1115},[8130],{"type":998,"value":8131}," (Grade ",{"type":993,"tag":1021,"props":8133,"children":8134},{"style":1053},[8135],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8137,"children":8138},{"style":1036},[8139],{"type":998,"value":6891},{"type":993,"tag":1021,"props":8141,"children":8142},{"style":1053},[8143],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8145,"children":8146},{"style":1115},[8147],{"type":998,"value":1957},{"type":993,"tag":1021,"props":8149,"children":8150},{"style":1036},[8151],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8153,"children":8154},{"class":1023,"line":91},[8155],{"type":993,"tag":1021,"props":8156,"children":8157},{"emptyLinePlaceholder":13},[8158],{"type":998,"value":1096},{"type":993,"tag":1021,"props":8160,"children":8161},{"class":1023,"line":100},[8162,8166,8170,8174,8178,8183],{"type":993,"tag":1021,"props":8163,"children":8164},{"style":1053},[8165],{"type":998,"value":1172},{"type":993,"tag":1021,"props":8167,"children":8168},{"style":1036},[8169],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8171,"children":8172},{"style":1115},[8173],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8175,"children":8176},{"style":1053},[8177],{"type":998,"value":6771},{"type":993,"tag":1021,"props":8179,"children":8180},{"style":1115},[8181],{"type":998,"value":8182},"Coordinates:\"",{"type":993,"tag":1021,"props":8184,"children":8185},{"style":1036},[8186],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8188,"children":8189},{"class":1023,"line":109},[8190,8194,8199,8203],{"type":993,"tag":1021,"props":8191,"children":8192},{"style":1042},[8193],{"type":998,"value":6673},{"type":993,"tag":1021,"props":8195,"children":8196},{"style":1036},[8197],{"type":998,"value":8198}," location, (x, y) ",{"type":993,"tag":1021,"props":8200,"children":8201},{"style":1042},[8202],{"type":998,"value":6683},{"type":993,"tag":1021,"props":8204,"children":8205},{"style":1036},[8206],{"type":998,"value":8207}," coordinates.items():\n",{"type":993,"tag":1021,"props":8209,"children":8210},{"class":1023,"line":118},[8211,8215,8219,8223,8227,8231,8236,8240,8244,8248,8252,8256,8260,8264,8268,8272,8276],{"type":993,"tag":1021,"props":8212,"children":8213},{"style":1053},[8214],{"type":998,"value":5441},{"type":993,"tag":1021,"props":8216,"children":8217},{"style":1036},[8218],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8220,"children":8221},{"style":1042},[8222],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8224,"children":8225},{"style":1115},[8226],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8228,"children":8229},{"style":1053},[8230],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8232,"children":8233},{"style":1036},[8234],{"type":998,"value":8235},"location",{"type":993,"tag":1021,"props":8237,"children":8238},{"style":1053},[8239],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8241,"children":8242},{"style":1115},[8243],{"type":998,"value":7893},{"type":993,"tag":1021,"props":8245,"children":8246},{"style":1053},[8247],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8249,"children":8250},{"style":1036},[8251],{"type":998,"value":1197},{"type":993,"tag":1021,"props":8253,"children":8254},{"style":1053},[8255],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8257,"children":8258},{"style":1115},[8259],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8261,"children":8262},{"style":1053},[8263],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8265,"children":8266},{"style":1036},[8267],{"type":998,"value":1216},{"type":993,"tag":1021,"props":8269,"children":8270},{"style":1053},[8271],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8273,"children":8274},{"style":1115},[8275],{"type":998,"value":1957},{"type":993,"tag":1021,"props":8277,"children":8278},{"style":1036},[8279],{"type":998,"value":1071},{"type":993,"tag":1480,"props":8281,"children":8283},{"id":8282},"best-practices",[8284],{"type":998,"value":8285},"📋 Best Practices",{"type":993,"tag":1001,"props":8287,"children":8288},{},[8289],{"type":998,"value":8290},"Following best practices ensures your unpacking code is readable, maintainable, and robust.",{"type":993,"tag":1492,"props":8292,"children":8296},{"emoji":8293,"title":8294,"type":8295},"⚠️","Unpacking Guidelines","warning",[8297,8305,8327,8334],{"type":993,"tag":1001,"props":8298,"children":8299},{},[8300],{"type":993,"tag":1502,"props":8301,"children":8302},{},[8303],{"type":998,"value":8304},"Code Quality:",{"type":993,"tag":1508,"props":8306,"children":8307},{},[8308,8313,8318,8322],{"type":993,"tag":1512,"props":8309,"children":8310},{},[8311],{"type":998,"value":8312},"Use descriptive variable names that match data meaning",{"type":993,"tag":1512,"props":8314,"children":8315},{},[8316],{"type":998,"value":8317},"Avoid unpacking too many elements (keep under 5-6)",{"type":993,"tag":1512,"props":8319,"children":8320},{},[8321],{"type":998,"value":1607},{"type":993,"tag":1512,"props":8323,"children":8324},{},[8325],{"type":998,"value":8326},"Consider named tuples for complex structures",{"type":993,"tag":1001,"props":8328,"children":8329},{},[8330],{"type":993,"tag":1502,"props":8331,"children":8332},{},[8333],{"type":998,"value":1594},{"type":993,"tag":1508,"props":8335,"children":8336},{},[8337,8342,8347],{"type":993,"tag":1512,"props":8338,"children":8339},{},[8340],{"type":998,"value":8341},"Validate tuple length before unpacking when uncertain",{"type":993,"tag":1512,"props":8343,"children":8344},{},[8345],{"type":998,"value":8346},"Use try-except for unpacking operations that might fail",{"type":993,"tag":1512,"props":8348,"children":8349},{},[8350],{"type":998,"value":8351},"Provide defaults for optional elements",{"type":993,"tag":1609,"props":8353,"children":8355},{"id":8354},"readable-unpacking-patterns",[8356],{"type":998,"value":8357},"Readable Unpacking Patterns",{"type":993,"tag":1001,"props":8359,"children":8360},{},[8361],{"type":998,"value":8362},"Clear, self-documenting unpacking that expresses intent through variable names.",{"type":993,"tag":1007,"props":8364,"children":8365},{},[8366],{"type":993,"tag":1011,"props":8367,"children":8369},{"className":1013,"code":8368,"language":6,"meta":8,"style":8},"# Good unpacking practices\ndef process_order():\n    return \"ORD123\", \"Alice\", [\"laptop\", \"mouse\"], 1299.99, \"pending\"\n\n# Descriptive variable names\norder_id, customer_name, items, total_amount, status = process_order()\n\nprint(f\"Order {order_id}\")\nprint(f\"Customer: {customer_name}\")\nprint(f\"Items: {', '.join(items)}\")\nprint(f\"Total: ${total_amount:.2f}\")\nprint(f\"Status: {status}\")\n\n# For complex data, consider named tuples\nfrom collections import namedtuple\nOrder = namedtuple('Order', ['id', 'customer', 'items', 'total', 'status'])\norder = Order(\"ORD124\", \"Bob\", [\"keyboard\"], 75.99, \"shipped\")\nprint(f\"Named tuple order: {order.customer} - ${order.total:.2f}\")\n",[8370],{"type":993,"tag":1017,"props":8371,"children":8372},{"__ignoreMap":8},[8373,8381,8398,8455,8462,8470,8487,8494,8535,8576,8621,8667,8707,8714,8722,8745,8816,8877],{"type":993,"tag":1021,"props":8374,"children":8375},{"class":1023,"line":12},[8376],{"type":993,"tag":1021,"props":8377,"children":8378},{"style":1027},[8379],{"type":998,"value":8380},"# Good unpacking practices\n",{"type":993,"tag":1021,"props":8382,"children":8383},{"class":1023,"line":27},[8384,8388,8393],{"type":993,"tag":1021,"props":8385,"children":8386},{"style":1042},[8387],{"type":998,"value":4511},{"type":993,"tag":1021,"props":8389,"children":8390},{"style":4514},[8391],{"type":998,"value":8392}," process_order",{"type":993,"tag":1021,"props":8394,"children":8395},{"style":1036},[8396],{"type":998,"value":8397},"():\n",{"type":993,"tag":1021,"props":8399,"children":8400},{"class":1023,"line":36},[8401,8405,8410,8414,8418,8423,8428,8432,8437,8441,8446,8450],{"type":993,"tag":1021,"props":8402,"children":8403},{"style":1042},[8404],{"type":998,"value":4621},{"type":993,"tag":1021,"props":8406,"children":8407},{"style":1115},[8408],{"type":998,"value":8409}," \"ORD123\"",{"type":993,"tag":1021,"props":8411,"children":8412},{"style":1036},[8413],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8415,"children":8416},{"style":1115},[8417],{"type":998,"value":1118},{"type":993,"tag":1021,"props":8419,"children":8420},{"style":1036},[8421],{"type":998,"value":8422},", [",{"type":993,"tag":1021,"props":8424,"children":8425},{"style":1115},[8426],{"type":998,"value":8427},"\"laptop\"",{"type":993,"tag":1021,"props":8429,"children":8430},{"style":1036},[8431],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8433,"children":8434},{"style":1115},[8435],{"type":998,"value":8436},"\"mouse\"",{"type":993,"tag":1021,"props":8438,"children":8439},{"style":1036},[8440],{"type":998,"value":4634},{"type":993,"tag":1021,"props":8442,"children":8443},{"style":1053},[8444],{"type":998,"value":8445},"1299.99",{"type":993,"tag":1021,"props":8447,"children":8448},{"style":1036},[8449],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8451,"children":8452},{"style":1115},[8453],{"type":998,"value":8454},"\"pending\"\n",{"type":993,"tag":1021,"props":8456,"children":8457},{"class":1023,"line":45},[8458],{"type":993,"tag":1021,"props":8459,"children":8460},{"emptyLinePlaceholder":13},[8461],{"type":998,"value":1096},{"type":993,"tag":1021,"props":8463,"children":8464},{"class":1023,"line":54},[8465],{"type":993,"tag":1021,"props":8466,"children":8467},{"style":1027},[8468],{"type":998,"value":8469},"# Descriptive variable names\n",{"type":993,"tag":1021,"props":8471,"children":8472},{"class":1023,"line":63},[8473,8478,8482],{"type":993,"tag":1021,"props":8474,"children":8475},{"style":1036},[8476],{"type":998,"value":8477},"order_id, customer_name, items, total_amount, status ",{"type":993,"tag":1021,"props":8479,"children":8480},{"style":1042},[8481],{"type":998,"value":1045},{"type":993,"tag":1021,"props":8483,"children":8484},{"style":1036},[8485],{"type":998,"value":8486}," process_order()\n",{"type":993,"tag":1021,"props":8488,"children":8489},{"class":1023,"line":72},[8490],{"type":993,"tag":1021,"props":8491,"children":8492},{"emptyLinePlaceholder":13},[8493],{"type":998,"value":1096},{"type":993,"tag":1021,"props":8495,"children":8496},{"class":1023,"line":81},[8497,8501,8505,8509,8514,8518,8523,8527,8531],{"type":993,"tag":1021,"props":8498,"children":8499},{"style":1053},[8500],{"type":998,"value":1172},{"type":993,"tag":1021,"props":8502,"children":8503},{"style":1036},[8504],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8506,"children":8507},{"style":1042},[8508],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8510,"children":8511},{"style":1115},[8512],{"type":998,"value":8513},"\"Order ",{"type":993,"tag":1021,"props":8515,"children":8516},{"style":1053},[8517],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8519,"children":8520},{"style":1036},[8521],{"type":998,"value":8522},"order_id",{"type":993,"tag":1021,"props":8524,"children":8525},{"style":1053},[8526],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8528,"children":8529},{"style":1115},[8530],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8532,"children":8533},{"style":1036},[8534],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8536,"children":8537},{"class":1023,"line":91},[8538,8542,8546,8550,8555,8559,8564,8568,8572],{"type":993,"tag":1021,"props":8539,"children":8540},{"style":1053},[8541],{"type":998,"value":1172},{"type":993,"tag":1021,"props":8543,"children":8544},{"style":1036},[8545],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8547,"children":8548},{"style":1042},[8549],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8551,"children":8552},{"style":1115},[8553],{"type":998,"value":8554},"\"Customer: ",{"type":993,"tag":1021,"props":8556,"children":8557},{"style":1053},[8558],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8560,"children":8561},{"style":1036},[8562],{"type":998,"value":8563},"customer_name",{"type":993,"tag":1021,"props":8565,"children":8566},{"style":1053},[8567],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8569,"children":8570},{"style":1115},[8571],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8573,"children":8574},{"style":1036},[8575],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8577,"children":8578},{"class":1023,"line":100},[8579,8583,8587,8591,8595,8599,8604,8609,8613,8617],{"type":993,"tag":1021,"props":8580,"children":8581},{"style":1053},[8582],{"type":998,"value":1172},{"type":993,"tag":1021,"props":8584,"children":8585},{"style":1036},[8586],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8588,"children":8589},{"style":1042},[8590],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8592,"children":8593},{"style":1115},[8594],{"type":998,"value":3328},{"type":993,"tag":1021,"props":8596,"children":8597},{"style":1053},[8598],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8600,"children":8601},{"style":1115},[8602],{"type":998,"value":8603},"', '",{"type":993,"tag":1021,"props":8605,"children":8606},{"style":1036},[8607],{"type":998,"value":8608},".join(items)",{"type":993,"tag":1021,"props":8610,"children":8611},{"style":1053},[8612],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8614,"children":8615},{"style":1115},[8616],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8618,"children":8619},{"style":1036},[8620],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8622,"children":8623},{"class":1023,"line":109},[8624,8628,8632,8636,8641,8645,8650,8655,8659,8663],{"type":993,"tag":1021,"props":8625,"children":8626},{"style":1053},[8627],{"type":998,"value":1172},{"type":993,"tag":1021,"props":8629,"children":8630},{"style":1036},[8631],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8633,"children":8634},{"style":1042},[8635],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8637,"children":8638},{"style":1115},[8639],{"type":998,"value":8640},"\"Total: $",{"type":993,"tag":1021,"props":8642,"children":8643},{"style":1053},[8644],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8646,"children":8647},{"style":1036},[8648],{"type":998,"value":8649},"total_amount",{"type":993,"tag":1021,"props":8651,"children":8652},{"style":1042},[8653],{"type":998,"value":8654},":.2f",{"type":993,"tag":1021,"props":8656,"children":8657},{"style":1053},[8658],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8660,"children":8661},{"style":1115},[8662],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8664,"children":8665},{"style":1036},[8666],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8668,"children":8669},{"class":1023,"line":118},[8670,8674,8678,8682,8687,8691,8695,8699,8703],{"type":993,"tag":1021,"props":8671,"children":8672},{"style":1053},[8673],{"type":998,"value":1172},{"type":993,"tag":1021,"props":8675,"children":8676},{"style":1036},[8677],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8679,"children":8680},{"style":1042},[8681],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8683,"children":8684},{"style":1115},[8685],{"type":998,"value":8686},"\"Status: ",{"type":993,"tag":1021,"props":8688,"children":8689},{"style":1053},[8690],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8692,"children":8693},{"style":1036},[8694],{"type":998,"value":6908},{"type":993,"tag":1021,"props":8696,"children":8697},{"style":1053},[8698],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8700,"children":8701},{"style":1115},[8702],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8704,"children":8705},{"style":1036},[8706],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8708,"children":8709},{"class":1023,"line":127},[8710],{"type":993,"tag":1021,"props":8711,"children":8712},{"emptyLinePlaceholder":13},[8713],{"type":998,"value":1096},{"type":993,"tag":1021,"props":8715,"children":8716},{"class":1023,"line":136},[8717],{"type":993,"tag":1021,"props":8718,"children":8719},{"style":1027},[8720],{"type":998,"value":8721},"# For complex data, consider named tuples\n",{"type":993,"tag":1021,"props":8723,"children":8724},{"class":1023,"line":146},[8725,8730,8735,8740],{"type":993,"tag":1021,"props":8726,"children":8727},{"style":1042},[8728],{"type":998,"value":8729},"from",{"type":993,"tag":1021,"props":8731,"children":8732},{"style":1036},[8733],{"type":998,"value":8734}," collections ",{"type":993,"tag":1021,"props":8736,"children":8737},{"style":1042},[8738],{"type":998,"value":8739},"import",{"type":993,"tag":1021,"props":8741,"children":8742},{"style":1036},[8743],{"type":998,"value":8744}," namedtuple\n",{"type":993,"tag":1021,"props":8746,"children":8747},{"class":1023,"line":155},[8748,8753,8757,8762,8767,8771,8776,8780,8785,8789,8794,8798,8803,8807,8812],{"type":993,"tag":1021,"props":8749,"children":8750},{"style":1036},[8751],{"type":998,"value":8752},"Order ",{"type":993,"tag":1021,"props":8754,"children":8755},{"style":1042},[8756],{"type":998,"value":1045},{"type":993,"tag":1021,"props":8758,"children":8759},{"style":1036},[8760],{"type":998,"value":8761}," namedtuple(",{"type":993,"tag":1021,"props":8763,"children":8764},{"style":1115},[8765],{"type":998,"value":8766},"'Order'",{"type":993,"tag":1021,"props":8768,"children":8769},{"style":1036},[8770],{"type":998,"value":8422},{"type":993,"tag":1021,"props":8772,"children":8773},{"style":1115},[8774],{"type":998,"value":8775},"'id'",{"type":993,"tag":1021,"props":8777,"children":8778},{"style":1036},[8779],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8781,"children":8782},{"style":1115},[8783],{"type":998,"value":8784},"'customer'",{"type":993,"tag":1021,"props":8786,"children":8787},{"style":1036},[8788],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8790,"children":8791},{"style":1115},[8792],{"type":998,"value":8793},"'items'",{"type":993,"tag":1021,"props":8795,"children":8796},{"style":1036},[8797],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8799,"children":8800},{"style":1115},[8801],{"type":998,"value":8802},"'total'",{"type":993,"tag":1021,"props":8804,"children":8805},{"style":1036},[8806],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8808,"children":8809},{"style":1115},[8810],{"type":998,"value":8811},"'status'",{"type":993,"tag":1021,"props":8813,"children":8814},{"style":1036},[8815],{"type":998,"value":4263},{"type":993,"tag":1021,"props":8817,"children":8818},{"class":1023,"line":164},[8819,8824,8828,8833,8838,8842,8846,8850,8855,8859,8864,8868,8873],{"type":993,"tag":1021,"props":8820,"children":8821},{"style":1036},[8822],{"type":998,"value":8823},"order ",{"type":993,"tag":1021,"props":8825,"children":8826},{"style":1042},[8827],{"type":998,"value":1045},{"type":993,"tag":1021,"props":8829,"children":8830},{"style":1036},[8831],{"type":998,"value":8832}," Order(",{"type":993,"tag":1021,"props":8834,"children":8835},{"style":1115},[8836],{"type":998,"value":8837},"\"ORD124\"",{"type":993,"tag":1021,"props":8839,"children":8840},{"style":1036},[8841],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8843,"children":8844},{"style":1115},[8845],{"type":998,"value":1782},{"type":993,"tag":1021,"props":8847,"children":8848},{"style":1036},[8849],{"type":998,"value":8422},{"type":993,"tag":1021,"props":8851,"children":8852},{"style":1115},[8853],{"type":998,"value":8854},"\"keyboard\"",{"type":993,"tag":1021,"props":8856,"children":8857},{"style":1036},[8858],{"type":998,"value":4634},{"type":993,"tag":1021,"props":8860,"children":8861},{"style":1053},[8862],{"type":998,"value":8863},"75.99",{"type":993,"tag":1021,"props":8865,"children":8866},{"style":1036},[8867],{"type":998,"value":1061},{"type":993,"tag":1021,"props":8869,"children":8870},{"style":1115},[8871],{"type":998,"value":8872},"\"shipped\"",{"type":993,"tag":1021,"props":8874,"children":8875},{"style":1036},[8876],{"type":998,"value":1071},{"type":993,"tag":1021,"props":8878,"children":8879},{"class":1023,"line":173},[8880,8884,8888,8892,8897,8901,8906,8910,8915,8919,8924,8928,8932,8936],{"type":993,"tag":1021,"props":8881,"children":8882},{"style":1053},[8883],{"type":998,"value":1172},{"type":993,"tag":1021,"props":8885,"children":8886},{"style":1036},[8887],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8889,"children":8890},{"style":1042},[8891],{"type":998,"value":1182},{"type":993,"tag":1021,"props":8893,"children":8894},{"style":1115},[8895],{"type":998,"value":8896},"\"Named tuple order: ",{"type":993,"tag":1021,"props":8898,"children":8899},{"style":1053},[8900],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8902,"children":8903},{"style":1036},[8904],{"type":998,"value":8905},"order.customer",{"type":993,"tag":1021,"props":8907,"children":8908},{"style":1053},[8909],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8911,"children":8912},{"style":1115},[8913],{"type":998,"value":8914}," - $",{"type":993,"tag":1021,"props":8916,"children":8917},{"style":1053},[8918],{"type":998,"value":1192},{"type":993,"tag":1021,"props":8920,"children":8921},{"style":1036},[8922],{"type":998,"value":8923},"order.total",{"type":993,"tag":1021,"props":8925,"children":8926},{"style":1042},[8927],{"type":998,"value":8654},{"type":993,"tag":1021,"props":8929,"children":8930},{"style":1053},[8931],{"type":998,"value":1202},{"type":993,"tag":1021,"props":8933,"children":8934},{"style":1115},[8935],{"type":998,"value":1225},{"type":993,"tag":1021,"props":8937,"children":8938},{"style":1036},[8939],{"type":998,"value":1071},{"type":993,"tag":1609,"props":8941,"children":8943},{"id":8942},"safe-unpacking-techniques",[8944],{"type":998,"value":8945},"Safe Unpacking Techniques",{"type":993,"tag":1001,"props":8947,"children":8948},{},[8949],{"type":998,"value":8950},"Error-resistant unpacking patterns for robust data handling.",{"type":993,"tag":1007,"props":8952,"children":8953},{},[8954],{"type":993,"tag":1011,"props":8955,"children":8957},{"className":1013,"code":8956,"language":6,"meta":8,"style":8},"# Safe unpacking techniques\ndef safe_unpack_coordinate(coord_tuple, default=(0, 0)):\n    \"\"\"Safely unpack coordinate tuple with defaults\"\"\"\n    try:\n        x, y = coord_tuple\n        return x, y\n    except (ValueError, TypeError):\n        return default\n\ndef safe_unpack_with_length(data_tuple, expected_length):\n    \"\"\"Safely unpack with length validation\"\"\"\n    if len(data_tuple) != expected_length:\n        raise ValueError(f\"Expected {expected_length} elements, got {len(data_tuple)}\")\n    return data_tuple\n\n# Using safe unpacking\ntest_data = [(10, 20), (30,), \"invalid\", (40, 50, 60)]\n\nfor data in test_data:\n    try:\n        x, y = safe_unpack_coordinate(data)\n        print(f\"Coordinate: ({x}, {y})\")\n    except:\n        print(f\"Failed to unpack: {data}\")\n",[8958],{"type":993,"tag":1017,"props":8959,"children":8960},{"__ignoreMap":8},[8961,8969,9011,9019,9030,9046,9058,9086,9098,9105,9122,9130,9156,9222,9234,9241,9249,9323,9330,9351,9362,9378,9435,9446],{"type":993,"tag":1021,"props":8962,"children":8963},{"class":1023,"line":12},[8964],{"type":993,"tag":1021,"props":8965,"children":8966},{"style":1027},[8967],{"type":998,"value":8968},"# Safe unpacking techniques\n",{"type":993,"tag":1021,"props":8970,"children":8971},{"class":1023,"line":27},[8972,8976,8981,8986,8990,8994,8998,9002,9006],{"type":993,"tag":1021,"props":8973,"children":8974},{"style":1042},[8975],{"type":998,"value":4511},{"type":993,"tag":1021,"props":8977,"children":8978},{"style":4514},[8979],{"type":998,"value":8980}," safe_unpack_coordinate",{"type":993,"tag":1021,"props":8982,"children":8983},{"style":1036},[8984],{"type":998,"value":8985},"(coord_tuple, default",{"type":993,"tag":1021,"props":8987,"children":8988},{"style":1042},[8989],{"type":998,"value":1045},{"type":993,"tag":1021,"props":8991,"children":8992},{"style":1036},[8993],{"type":998,"value":1177},{"type":993,"tag":1021,"props":8995,"children":8996},{"style":1053},[8997],{"type":998,"value":1676},{"type":993,"tag":1021,"props":8999,"children":9000},{"style":1036},[9001],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9003,"children":9004},{"style":1053},[9005],{"type":998,"value":1676},{"type":993,"tag":1021,"props":9007,"children":9008},{"style":1036},[9009],{"type":998,"value":9010},")):\n",{"type":993,"tag":1021,"props":9012,"children":9013},{"class":1023,"line":36},[9014],{"type":993,"tag":1021,"props":9015,"children":9016},{"style":1115},[9017],{"type":998,"value":9018},"    \"\"\"Safely unpack coordinate tuple with defaults\"\"\"\n",{"type":993,"tag":1021,"props":9020,"children":9021},{"class":1023,"line":45},[9022,9026],{"type":993,"tag":1021,"props":9023,"children":9024},{"style":1042},[9025],{"type":998,"value":5202},{"type":993,"tag":1021,"props":9027,"children":9028},{"style":1036},[9029],{"type":998,"value":4572},{"type":993,"tag":1021,"props":9031,"children":9032},{"class":1023,"line":54},[9033,9037,9041],{"type":993,"tag":1021,"props":9034,"children":9035},{"style":1036},[9036],{"type":998,"value":5240},{"type":993,"tag":1021,"props":9038,"children":9039},{"style":1042},[9040],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9042,"children":9043},{"style":1036},[9044],{"type":998,"value":9045}," coord_tuple\n",{"type":993,"tag":1021,"props":9047,"children":9048},{"class":1023,"line":63},[9049,9053],{"type":993,"tag":1021,"props":9050,"children":9051},{"style":1042},[9052],{"type":998,"value":4580},{"type":993,"tag":1021,"props":9054,"children":9055},{"style":1036},[9056],{"type":998,"value":9057}," x, y\n",{"type":993,"tag":1021,"props":9059,"children":9060},{"class":1023,"line":72},[9061,9065,9069,9073,9077,9082],{"type":993,"tag":1021,"props":9062,"children":9063},{"style":1042},[9064],{"type":998,"value":5305},{"type":993,"tag":1021,"props":9066,"children":9067},{"style":1036},[9068],{"type":998,"value":1050},{"type":993,"tag":1021,"props":9070,"children":9071},{"style":1053},[9072],{"type":998,"value":5314},{"type":993,"tag":1021,"props":9074,"children":9075},{"style":1036},[9076],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9078,"children":9079},{"style":1053},[9080],{"type":998,"value":9081},"TypeError",{"type":993,"tag":1021,"props":9083,"children":9084},{"style":1036},[9085],{"type":998,"value":5328},{"type":993,"tag":1021,"props":9087,"children":9088},{"class":1023,"line":81},[9089,9093],{"type":993,"tag":1021,"props":9090,"children":9091},{"style":1042},[9092],{"type":998,"value":4580},{"type":993,"tag":1021,"props":9094,"children":9095},{"style":1036},[9096],{"type":998,"value":9097}," default\n",{"type":993,"tag":1021,"props":9099,"children":9100},{"class":1023,"line":91},[9101],{"type":993,"tag":1021,"props":9102,"children":9103},{"emptyLinePlaceholder":13},[9104],{"type":998,"value":1096},{"type":993,"tag":1021,"props":9106,"children":9107},{"class":1023,"line":100},[9108,9112,9117],{"type":993,"tag":1021,"props":9109,"children":9110},{"style":1042},[9111],{"type":998,"value":4511},{"type":993,"tag":1021,"props":9113,"children":9114},{"style":4514},[9115],{"type":998,"value":9116}," safe_unpack_with_length",{"type":993,"tag":1021,"props":9118,"children":9119},{"style":1036},[9120],{"type":998,"value":9121},"(data_tuple, expected_length):\n",{"type":993,"tag":1021,"props":9123,"children":9124},{"class":1023,"line":109},[9125],{"type":993,"tag":1021,"props":9126,"children":9127},{"style":1115},[9128],{"type":998,"value":9129},"    \"\"\"Safely unpack with length validation\"\"\"\n",{"type":993,"tag":1021,"props":9131,"children":9132},{"class":1023,"line":118},[9133,9137,9141,9146,9151],{"type":993,"tag":1021,"props":9134,"children":9135},{"style":1042},[9136],{"type":998,"value":4547},{"type":993,"tag":1021,"props":9138,"children":9139},{"style":1053},[9140],{"type":998,"value":4552},{"type":993,"tag":1021,"props":9142,"children":9143},{"style":1036},[9144],{"type":998,"value":9145},"(data_tuple) ",{"type":993,"tag":1021,"props":9147,"children":9148},{"style":1042},[9149],{"type":998,"value":9150},"!=",{"type":993,"tag":1021,"props":9152,"children":9153},{"style":1036},[9154],{"type":998,"value":9155}," expected_length:\n",{"type":993,"tag":1021,"props":9157,"children":9158},{"class":1023,"line":127},[9159,9164,9169,9173,9177,9182,9186,9191,9195,9200,9205,9210,9214,9218],{"type":993,"tag":1021,"props":9160,"children":9161},{"style":1042},[9162],{"type":998,"value":9163},"        raise",{"type":993,"tag":1021,"props":9165,"children":9166},{"style":1053},[9167],{"type":998,"value":9168}," ValueError",{"type":993,"tag":1021,"props":9170,"children":9171},{"style":1036},[9172],{"type":998,"value":1177},{"type":993,"tag":1021,"props":9174,"children":9175},{"style":1042},[9176],{"type":998,"value":1182},{"type":993,"tag":1021,"props":9178,"children":9179},{"style":1115},[9180],{"type":998,"value":9181},"\"Expected ",{"type":993,"tag":1021,"props":9183,"children":9184},{"style":1053},[9185],{"type":998,"value":1192},{"type":993,"tag":1021,"props":9187,"children":9188},{"style":1036},[9189],{"type":998,"value":9190},"expected_length",{"type":993,"tag":1021,"props":9192,"children":9193},{"style":1053},[9194],{"type":998,"value":1202},{"type":993,"tag":1021,"props":9196,"children":9197},{"style":1115},[9198],{"type":998,"value":9199}," elements, got ",{"type":993,"tag":1021,"props":9201,"children":9202},{"style":1053},[9203],{"type":998,"value":9204},"{len",{"type":993,"tag":1021,"props":9206,"children":9207},{"style":1036},[9208],{"type":998,"value":9209},"(data_tuple)",{"type":993,"tag":1021,"props":9211,"children":9212},{"style":1053},[9213],{"type":998,"value":1202},{"type":993,"tag":1021,"props":9215,"children":9216},{"style":1115},[9217],{"type":998,"value":1225},{"type":993,"tag":1021,"props":9219,"children":9220},{"style":1036},[9221],{"type":998,"value":1071},{"type":993,"tag":1021,"props":9223,"children":9224},{"class":1023,"line":136},[9225,9229],{"type":993,"tag":1021,"props":9226,"children":9227},{"style":1042},[9228],{"type":998,"value":4621},{"type":993,"tag":1021,"props":9230,"children":9231},{"style":1036},[9232],{"type":998,"value":9233}," data_tuple\n",{"type":993,"tag":1021,"props":9235,"children":9236},{"class":1023,"line":146},[9237],{"type":993,"tag":1021,"props":9238,"children":9239},{"emptyLinePlaceholder":13},[9240],{"type":998,"value":1096},{"type":993,"tag":1021,"props":9242,"children":9243},{"class":1023,"line":155},[9244],{"type":993,"tag":1021,"props":9245,"children":9246},{"style":1027},[9247],{"type":998,"value":9248},"# Using safe unpacking\n",{"type":993,"tag":1021,"props":9250,"children":9251},{"class":1023,"line":164},[9252,9257,9261,9265,9269,9273,9277,9281,9285,9290,9295,9299,9303,9307,9311,9315,9319],{"type":993,"tag":1021,"props":9253,"children":9254},{"style":1036},[9255],{"type":998,"value":9256},"test_data ",{"type":993,"tag":1021,"props":9258,"children":9259},{"style":1042},[9260],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9262,"children":9263},{"style":1036},[9264],{"type":998,"value":6521},{"type":993,"tag":1021,"props":9266,"children":9267},{"style":1053},[9268],{"type":998,"value":1056},{"type":993,"tag":1021,"props":9270,"children":9271},{"style":1036},[9272],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9274,"children":9275},{"style":1053},[9276],{"type":998,"value":1066},{"type":993,"tag":1021,"props":9278,"children":9279},{"style":1036},[9280],{"type":998,"value":2321},{"type":993,"tag":1021,"props":9282,"children":9283},{"style":1053},[9284],{"type":998,"value":2334},{"type":993,"tag":1021,"props":9286,"children":9287},{"style":1036},[9288],{"type":998,"value":9289},",), ",{"type":993,"tag":1021,"props":9291,"children":9292},{"style":1115},[9293],{"type":998,"value":9294},"\"invalid\"",{"type":993,"tag":1021,"props":9296,"children":9297},{"style":1036},[9298],{"type":998,"value":4227},{"type":993,"tag":1021,"props":9300,"children":9301},{"style":1053},[9302],{"type":998,"value":6550},{"type":993,"tag":1021,"props":9304,"children":9305},{"style":1036},[9306],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9308,"children":9309},{"style":1053},[9310],{"type":998,"value":6559},{"type":993,"tag":1021,"props":9312,"children":9313},{"style":1036},[9314],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9316,"children":9317},{"style":1053},[9318],{"type":998,"value":6568},{"type":993,"tag":1021,"props":9320,"children":9321},{"style":1036},[9322],{"type":998,"value":6573},{"type":993,"tag":1021,"props":9324,"children":9325},{"class":1023,"line":173},[9326],{"type":993,"tag":1021,"props":9327,"children":9328},{"emptyLinePlaceholder":13},[9329],{"type":998,"value":1096},{"type":993,"tag":1021,"props":9331,"children":9332},{"class":1023,"line":182},[9333,9337,9342,9346],{"type":993,"tag":1021,"props":9334,"children":9335},{"style":1042},[9336],{"type":998,"value":6673},{"type":993,"tag":1021,"props":9338,"children":9339},{"style":1036},[9340],{"type":998,"value":9341}," data ",{"type":993,"tag":1021,"props":9343,"children":9344},{"style":1042},[9345],{"type":998,"value":6683},{"type":993,"tag":1021,"props":9347,"children":9348},{"style":1036},[9349],{"type":998,"value":9350}," test_data:\n",{"type":993,"tag":1021,"props":9352,"children":9353},{"class":1023,"line":191},[9354,9358],{"type":993,"tag":1021,"props":9355,"children":9356},{"style":1042},[9357],{"type":998,"value":5202},{"type":993,"tag":1021,"props":9359,"children":9360},{"style":1036},[9361],{"type":998,"value":4572},{"type":993,"tag":1021,"props":9363,"children":9364},{"class":1023,"line":201},[9365,9369,9373],{"type":993,"tag":1021,"props":9366,"children":9367},{"style":1036},[9368],{"type":998,"value":5240},{"type":993,"tag":1021,"props":9370,"children":9371},{"style":1042},[9372],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9374,"children":9375},{"style":1036},[9376],{"type":998,"value":9377}," safe_unpack_coordinate(data)\n",{"type":993,"tag":1021,"props":9379,"children":9380},{"class":1023,"line":210},[9381,9386,9390,9394,9399,9403,9407,9411,9415,9419,9423,9427,9431],{"type":993,"tag":1021,"props":9382,"children":9383},{"style":1053},[9384],{"type":998,"value":9385},"        print",{"type":993,"tag":1021,"props":9387,"children":9388},{"style":1036},[9389],{"type":998,"value":1177},{"type":993,"tag":1021,"props":9391,"children":9392},{"style":1042},[9393],{"type":998,"value":1182},{"type":993,"tag":1021,"props":9395,"children":9396},{"style":1115},[9397],{"type":998,"value":9398},"\"Coordinate: (",{"type":993,"tag":1021,"props":9400,"children":9401},{"style":1053},[9402],{"type":998,"value":1192},{"type":993,"tag":1021,"props":9404,"children":9405},{"style":1036},[9406],{"type":998,"value":1197},{"type":993,"tag":1021,"props":9408,"children":9409},{"style":1053},[9410],{"type":998,"value":1202},{"type":993,"tag":1021,"props":9412,"children":9413},{"style":1115},[9414],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9416,"children":9417},{"style":1053},[9418],{"type":998,"value":1192},{"type":993,"tag":1021,"props":9420,"children":9421},{"style":1036},[9422],{"type":998,"value":1216},{"type":993,"tag":1021,"props":9424,"children":9425},{"style":1053},[9426],{"type":998,"value":1202},{"type":993,"tag":1021,"props":9428,"children":9429},{"style":1115},[9430],{"type":998,"value":1957},{"type":993,"tag":1021,"props":9432,"children":9433},{"style":1036},[9434],{"type":998,"value":1071},{"type":993,"tag":1021,"props":9436,"children":9437},{"class":1023,"line":219},[9438,9442],{"type":993,"tag":1021,"props":9439,"children":9440},{"style":1042},[9441],{"type":998,"value":5305},{"type":993,"tag":1021,"props":9443,"children":9444},{"style":1036},[9445],{"type":998,"value":4572},{"type":993,"tag":1021,"props":9447,"children":9448},{"class":1023,"line":228},[9449,9453,9457,9461,9466,9470,9475,9479,9483],{"type":993,"tag":1021,"props":9450,"children":9451},{"style":1053},[9452],{"type":998,"value":9385},{"type":993,"tag":1021,"props":9454,"children":9455},{"style":1036},[9456],{"type":998,"value":1177},{"type":993,"tag":1021,"props":9458,"children":9459},{"style":1042},[9460],{"type":998,"value":1182},{"type":993,"tag":1021,"props":9462,"children":9463},{"style":1115},[9464],{"type":998,"value":9465},"\"Failed to unpack: ",{"type":993,"tag":1021,"props":9467,"children":9468},{"style":1053},[9469],{"type":998,"value":1192},{"type":993,"tag":1021,"props":9471,"children":9472},{"style":1036},[9473],{"type":998,"value":9474},"data",{"type":993,"tag":1021,"props":9476,"children":9477},{"style":1053},[9478],{"type":998,"value":1202},{"type":993,"tag":1021,"props":9480,"children":9481},{"style":1115},[9482],{"type":998,"value":1225},{"type":993,"tag":1021,"props":9484,"children":9485},{"style":1036},[9486],{"type":998,"value":1071},{"type":993,"tag":1609,"props":9488,"children":9490},{"id":9489},"performance-conscious-unpacking",[9491],{"type":998,"value":9492},"Performance-Conscious Unpacking",{"type":993,"tag":1001,"props":9494,"children":9495},{},[9496],{"type":998,"value":9497},"Efficient unpacking patterns for performance-critical code sections.",{"type":993,"tag":1007,"props":9499,"children":9500},{},[9501],{"type":993,"tag":1011,"props":9502,"children":9504},{"className":1013,"code":9503,"language":6,"meta":8,"style":8},"# Performance considerations\nlarge_dataset = [(i, i*2, i*3) for i in range(1000)]\n\n# Efficient unpacking in comprehensions\nsquared_sums = [x**2 + y**2 + z**2 for x, y, z in large_dataset[:5]]\nprint(f\"First 5 squared sums: {squared_sums}\")\n\n# Memory-efficient processing\ndef process_coordinates(coord_list):\n    \"\"\"Process coordinates efficiently\"\"\"\n    total_distance = 0\n    for x, y in coord_list:\n        distance = (x**2 + y**2)**0.5\n        total_distance += distance\n    return total_distance\n\nsample_coords = [(3, 4), (5, 12), (8, 15)]\ntotal = process_coordinates(sample_coords)\nprint(f\"Total distance: {total:.1f}\")\n",[9505],{"type":993,"tag":1017,"props":9506,"children":9507},{"__ignoreMap":8},[9508,9516,9590,9597,9605,9691,9732,9739,9747,9764,9772,9788,9809,9862,9880,9892,9899,9965,9982],{"type":993,"tag":1021,"props":9509,"children":9510},{"class":1023,"line":12},[9511],{"type":993,"tag":1021,"props":9512,"children":9513},{"style":1027},[9514],{"type":998,"value":9515},"# Performance considerations\n",{"type":993,"tag":1021,"props":9517,"children":9518},{"class":1023,"line":27},[9519,9524,9528,9533,9537,9541,9546,9550,9554,9559,9563,9568,9572,9577,9581,9586],{"type":993,"tag":1021,"props":9520,"children":9521},{"style":1036},[9522],{"type":998,"value":9523},"large_dataset ",{"type":993,"tag":1021,"props":9525,"children":9526},{"style":1042},[9527],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9529,"children":9530},{"style":1036},[9531],{"type":998,"value":9532}," [(i, i",{"type":993,"tag":1021,"props":9534,"children":9535},{"style":1042},[9536],{"type":998,"value":3070},{"type":993,"tag":1021,"props":9538,"children":9539},{"style":1053},[9540],{"type":998,"value":2098},{"type":993,"tag":1021,"props":9542,"children":9543},{"style":1036},[9544],{"type":998,"value":9545},", i",{"type":993,"tag":1021,"props":9547,"children":9548},{"style":1042},[9549],{"type":998,"value":3070},{"type":993,"tag":1021,"props":9551,"children":9552},{"style":1053},[9553],{"type":998,"value":3026},{"type":993,"tag":1021,"props":9555,"children":9556},{"style":1036},[9557],{"type":998,"value":9558},") ",{"type":993,"tag":1021,"props":9560,"children":9561},{"style":1042},[9562],{"type":998,"value":6673},{"type":993,"tag":1021,"props":9564,"children":9565},{"style":1036},[9566],{"type":998,"value":9567}," i ",{"type":993,"tag":1021,"props":9569,"children":9570},{"style":1042},[9571],{"type":998,"value":6683},{"type":993,"tag":1021,"props":9573,"children":9574},{"style":1053},[9575],{"type":998,"value":9576}," range",{"type":993,"tag":1021,"props":9578,"children":9579},{"style":1036},[9580],{"type":998,"value":1177},{"type":993,"tag":1021,"props":9582,"children":9583},{"style":1053},[9584],{"type":998,"value":9585},"1000",{"type":993,"tag":1021,"props":9587,"children":9588},{"style":1036},[9589],{"type":998,"value":6573},{"type":993,"tag":1021,"props":9591,"children":9592},{"class":1023,"line":36},[9593],{"type":993,"tag":1021,"props":9594,"children":9595},{"emptyLinePlaceholder":13},[9596],{"type":998,"value":1096},{"type":993,"tag":1021,"props":9598,"children":9599},{"class":1023,"line":45},[9600],{"type":993,"tag":1021,"props":9601,"children":9602},{"style":1027},[9603],{"type":998,"value":9604},"# Efficient unpacking in comprehensions\n",{"type":993,"tag":1021,"props":9606,"children":9607},{"class":1023,"line":54},[9608,9613,9617,9622,9626,9630,9634,9638,9642,9646,9650,9655,9659,9663,9668,9673,9677,9682,9686],{"type":993,"tag":1021,"props":9609,"children":9610},{"style":1036},[9611],{"type":998,"value":9612},"squared_sums ",{"type":993,"tag":1021,"props":9614,"children":9615},{"style":1042},[9616],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9618,"children":9619},{"style":1036},[9620],{"type":998,"value":9621}," [x",{"type":993,"tag":1021,"props":9623,"children":9624},{"style":1042},[9625],{"type":998,"value":7071},{"type":993,"tag":1021,"props":9627,"children":9628},{"style":1053},[9629],{"type":998,"value":2098},{"type":993,"tag":1021,"props":9631,"children":9632},{"style":1042},[9633],{"type":998,"value":7080},{"type":993,"tag":1021,"props":9635,"children":9636},{"style":1036},[9637],{"type":998,"value":7738},{"type":993,"tag":1021,"props":9639,"children":9640},{"style":1042},[9641],{"type":998,"value":7071},{"type":993,"tag":1021,"props":9643,"children":9644},{"style":1053},[9645],{"type":998,"value":2098},{"type":993,"tag":1021,"props":9647,"children":9648},{"style":1042},[9649],{"type":998,"value":7080},{"type":993,"tag":1021,"props":9651,"children":9652},{"style":1036},[9653],{"type":998,"value":9654}," z",{"type":993,"tag":1021,"props":9656,"children":9657},{"style":1042},[9658],{"type":998,"value":7071},{"type":993,"tag":1021,"props":9660,"children":9661},{"style":1053},[9662],{"type":998,"value":2098},{"type":993,"tag":1021,"props":9664,"children":9665},{"style":1042},[9666],{"type":998,"value":9667}," for",{"type":993,"tag":1021,"props":9669,"children":9670},{"style":1036},[9671],{"type":998,"value":9672}," x, y, z ",{"type":993,"tag":1021,"props":9674,"children":9675},{"style":1042},[9676],{"type":998,"value":6683},{"type":993,"tag":1021,"props":9678,"children":9679},{"style":1036},[9680],{"type":998,"value":9681}," large_dataset[:",{"type":993,"tag":1021,"props":9683,"children":9684},{"style":1053},[9685],{"type":998,"value":3044},{"type":993,"tag":1021,"props":9687,"children":9688},{"style":1036},[9689],{"type":998,"value":9690},"]]\n",{"type":993,"tag":1021,"props":9692,"children":9693},{"class":1023,"line":63},[9694,9698,9702,9706,9711,9715,9720,9724,9728],{"type":993,"tag":1021,"props":9695,"children":9696},{"style":1053},[9697],{"type":998,"value":1172},{"type":993,"tag":1021,"props":9699,"children":9700},{"style":1036},[9701],{"type":998,"value":1177},{"type":993,"tag":1021,"props":9703,"children":9704},{"style":1042},[9705],{"type":998,"value":1182},{"type":993,"tag":1021,"props":9707,"children":9708},{"style":1115},[9709],{"type":998,"value":9710},"\"First 5 squared sums: ",{"type":993,"tag":1021,"props":9712,"children":9713},{"style":1053},[9714],{"type":998,"value":1192},{"type":993,"tag":1021,"props":9716,"children":9717},{"style":1036},[9718],{"type":998,"value":9719},"squared_sums",{"type":993,"tag":1021,"props":9721,"children":9722},{"style":1053},[9723],{"type":998,"value":1202},{"type":993,"tag":1021,"props":9725,"children":9726},{"style":1115},[9727],{"type":998,"value":1225},{"type":993,"tag":1021,"props":9729,"children":9730},{"style":1036},[9731],{"type":998,"value":1071},{"type":993,"tag":1021,"props":9733,"children":9734},{"class":1023,"line":72},[9735],{"type":993,"tag":1021,"props":9736,"children":9737},{"emptyLinePlaceholder":13},[9738],{"type":998,"value":1096},{"type":993,"tag":1021,"props":9740,"children":9741},{"class":1023,"line":81},[9742],{"type":993,"tag":1021,"props":9743,"children":9744},{"style":1027},[9745],{"type":998,"value":9746},"# Memory-efficient processing\n",{"type":993,"tag":1021,"props":9748,"children":9749},{"class":1023,"line":91},[9750,9754,9759],{"type":993,"tag":1021,"props":9751,"children":9752},{"style":1042},[9753],{"type":998,"value":4511},{"type":993,"tag":1021,"props":9755,"children":9756},{"style":4514},[9757],{"type":998,"value":9758}," process_coordinates",{"type":993,"tag":1021,"props":9760,"children":9761},{"style":1036},[9762],{"type":998,"value":9763},"(coord_list):\n",{"type":993,"tag":1021,"props":9765,"children":9766},{"class":1023,"line":100},[9767],{"type":993,"tag":1021,"props":9768,"children":9769},{"style":1115},[9770],{"type":998,"value":9771},"    \"\"\"Process coordinates efficiently\"\"\"\n",{"type":993,"tag":1021,"props":9773,"children":9774},{"class":1023,"line":109},[9775,9780,9784],{"type":993,"tag":1021,"props":9776,"children":9777},{"style":1036},[9778],{"type":998,"value":9779},"    total_distance ",{"type":993,"tag":1021,"props":9781,"children":9782},{"style":1042},[9783],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9785,"children":9786},{"style":1053},[9787],{"type":998,"value":5882},{"type":993,"tag":1021,"props":9789,"children":9790},{"class":1023,"line":118},[9791,9796,9800,9804],{"type":993,"tag":1021,"props":9792,"children":9793},{"style":1042},[9794],{"type":998,"value":9795},"    for",{"type":993,"tag":1021,"props":9797,"children":9798},{"style":1036},[9799],{"type":998,"value":6678},{"type":993,"tag":1021,"props":9801,"children":9802},{"style":1042},[9803],{"type":998,"value":6683},{"type":993,"tag":1021,"props":9805,"children":9806},{"style":1036},[9807],{"type":998,"value":9808}," coord_list:\n",{"type":993,"tag":1021,"props":9810,"children":9811},{"class":1023,"line":127},[9812,9817,9821,9826,9830,9834,9838,9842,9846,9850,9854,9858],{"type":993,"tag":1021,"props":9813,"children":9814},{"style":1036},[9815],{"type":998,"value":9816},"        distance ",{"type":993,"tag":1021,"props":9818,"children":9819},{"style":1042},[9820],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9822,"children":9823},{"style":1036},[9824],{"type":998,"value":9825}," (x",{"type":993,"tag":1021,"props":9827,"children":9828},{"style":1042},[9829],{"type":998,"value":7071},{"type":993,"tag":1021,"props":9831,"children":9832},{"style":1053},[9833],{"type":998,"value":2098},{"type":993,"tag":1021,"props":9835,"children":9836},{"style":1042},[9837],{"type":998,"value":7080},{"type":993,"tag":1021,"props":9839,"children":9840},{"style":1036},[9841],{"type":998,"value":7738},{"type":993,"tag":1021,"props":9843,"children":9844},{"style":1042},[9845],{"type":998,"value":7071},{"type":993,"tag":1021,"props":9847,"children":9848},{"style":1053},[9849],{"type":998,"value":2098},{"type":993,"tag":1021,"props":9851,"children":9852},{"style":1036},[9853],{"type":998,"value":7107},{"type":993,"tag":1021,"props":9855,"children":9856},{"style":1042},[9857],{"type":998,"value":7071},{"type":993,"tag":1021,"props":9859,"children":9860},{"style":1053},[9861],{"type":998,"value":7116},{"type":993,"tag":1021,"props":9863,"children":9864},{"class":1023,"line":136},[9865,9870,9875],{"type":993,"tag":1021,"props":9866,"children":9867},{"style":1036},[9868],{"type":998,"value":9869},"        total_distance ",{"type":993,"tag":1021,"props":9871,"children":9872},{"style":1042},[9873],{"type":998,"value":9874},"+=",{"type":993,"tag":1021,"props":9876,"children":9877},{"style":1036},[9878],{"type":998,"value":9879}," distance\n",{"type":993,"tag":1021,"props":9881,"children":9882},{"class":1023,"line":146},[9883,9887],{"type":993,"tag":1021,"props":9884,"children":9885},{"style":1042},[9886],{"type":998,"value":4621},{"type":993,"tag":1021,"props":9888,"children":9889},{"style":1036},[9890],{"type":998,"value":9891}," total_distance\n",{"type":993,"tag":1021,"props":9893,"children":9894},{"class":1023,"line":155},[9895],{"type":993,"tag":1021,"props":9896,"children":9897},{"emptyLinePlaceholder":13},[9898],{"type":998,"value":1096},{"type":993,"tag":1021,"props":9900,"children":9901},{"class":1023,"line":164},[9902,9907,9911,9915,9919,9923,9927,9931,9935,9939,9944,9948,9953,9957,9961],{"type":993,"tag":1021,"props":9903,"children":9904},{"style":1036},[9905],{"type":998,"value":9906},"sample_coords ",{"type":993,"tag":1021,"props":9908,"children":9909},{"style":1042},[9910],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9912,"children":9913},{"style":1036},[9914],{"type":998,"value":6521},{"type":993,"tag":1021,"props":9916,"children":9917},{"style":1053},[9918],{"type":998,"value":3026},{"type":993,"tag":1021,"props":9920,"children":9921},{"style":1036},[9922],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9924,"children":9925},{"style":1053},[9926],{"type":998,"value":3035},{"type":993,"tag":1021,"props":9928,"children":9929},{"style":1036},[9930],{"type":998,"value":2321},{"type":993,"tag":1021,"props":9932,"children":9933},{"style":1053},[9934],{"type":998,"value":3044},{"type":993,"tag":1021,"props":9936,"children":9937},{"style":1036},[9938],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9940,"children":9941},{"style":1053},[9942],{"type":998,"value":9943},"12",{"type":993,"tag":1021,"props":9945,"children":9946},{"style":1036},[9947],{"type":998,"value":2321},{"type":993,"tag":1021,"props":9949,"children":9950},{"style":1053},[9951],{"type":998,"value":9952},"8",{"type":993,"tag":1021,"props":9954,"children":9955},{"style":1036},[9956],{"type":998,"value":1061},{"type":993,"tag":1021,"props":9958,"children":9959},{"style":1053},[9960],{"type":998,"value":7006},{"type":993,"tag":1021,"props":9962,"children":9963},{"style":1036},[9964],{"type":998,"value":6573},{"type":993,"tag":1021,"props":9966,"children":9967},{"class":1023,"line":173},[9968,9973,9977],{"type":993,"tag":1021,"props":9969,"children":9970},{"style":1036},[9971],{"type":998,"value":9972},"total ",{"type":993,"tag":1021,"props":9974,"children":9975},{"style":1042},[9976],{"type":998,"value":1045},{"type":993,"tag":1021,"props":9978,"children":9979},{"style":1036},[9980],{"type":998,"value":9981}," process_coordinates(sample_coords)\n",{"type":993,"tag":1021,"props":9983,"children":9984},{"class":1023,"line":182},[9985,9989,9993,9997,10002,10006,10010,10014,10018,10022],{"type":993,"tag":1021,"props":9986,"children":9987},{"style":1053},[9988],{"type":998,"value":1172},{"type":993,"tag":1021,"props":9990,"children":9991},{"style":1036},[9992],{"type":998,"value":1177},{"type":993,"tag":1021,"props":9994,"children":9995},{"style":1042},[9996],{"type":998,"value":1182},{"type":993,"tag":1021,"props":9998,"children":9999},{"style":1115},[10000],{"type":998,"value":10001},"\"Total distance: ",{"type":993,"tag":1021,"props":10003,"children":10004},{"style":1053},[10005],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10007,"children":10008},{"style":1036},[10009],{"type":998,"value":4986},{"type":993,"tag":1021,"props":10011,"children":10012},{"style":1042},[10013],{"type":998,"value":5027},{"type":993,"tag":1021,"props":10015,"children":10016},{"style":1053},[10017],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10019,"children":10020},{"style":1115},[10021],{"type":998,"value":1225},{"type":993,"tag":1021,"props":10023,"children":10024},{"style":1036},[10025],{"type":998,"value":1071},{"type":993,"tag":1480,"props":10027,"children":10029},{"id":10028},"tuple-unpacking-reference",[10030],{"type":998,"value":10031},"📚 Tuple Unpacking Reference",{"type":993,"tag":1001,"props":10033,"children":10034},{},[10035],{"type":998,"value":10036},"Common unpacking patterns and their applications:",{"type":993,"tag":10038,"props":10039,"children":10040},"table",{},[10041,10070],{"type":993,"tag":10042,"props":10043,"children":10044},"thead",{},[10045],{"type":993,"tag":10046,"props":10047,"children":10048},"tr",{},[10049,10055,10060,10065],{"type":993,"tag":10050,"props":10051,"children":10052},"th",{},[10053],{"type":998,"value":10054},"Pattern",{"type":993,"tag":10050,"props":10056,"children":10057},{},[10058],{"type":998,"value":10059},"Syntax",{"type":993,"tag":10050,"props":10061,"children":10062},{},[10063],{"type":998,"value":10064},"Use Case",{"type":993,"tag":10050,"props":10066,"children":10067},{},[10068],{"type":998,"value":10069},"Example",{"type":993,"tag":10071,"props":10072,"children":10073},"tbody",{},[10074,10108,10142,10175,10209,10243,10277],{"type":993,"tag":10046,"props":10075,"children":10076},{},[10077,10086,10095,10100],{"type":993,"tag":10078,"props":10079,"children":10080},"td",{},[10081],{"type":993,"tag":1502,"props":10082,"children":10083},{},[10084],{"type":998,"value":10085},"Basic",{"type":993,"tag":10078,"props":10087,"children":10088},{},[10089],{"type":993,"tag":1017,"props":10090,"children":10092},{"className":10091},[],[10093],{"type":998,"value":10094},"a, b = tuple",{"type":993,"tag":10078,"props":10096,"children":10097},{},[10098],{"type":998,"value":10099},"Simple assignment",{"type":993,"tag":10078,"props":10101,"children":10102},{},[10103],{"type":993,"tag":1017,"props":10104,"children":10106},{"className":10105},[],[10107],{"type":998,"value":1553},{"type":993,"tag":10046,"props":10109,"children":10110},{},[10111,10119,10128,10133],{"type":993,"tag":10078,"props":10112,"children":10113},{},[10114],{"type":993,"tag":1502,"props":10115,"children":10116},{},[10117],{"type":998,"value":10118},"Multiple",{"type":993,"tag":10078,"props":10120,"children":10121},{},[10122],{"type":993,"tag":1017,"props":10123,"children":10125},{"className":10124},[],[10126],{"type":998,"value":10127},"a, b, c = tuple",{"type":993,"tag":10078,"props":10129,"children":10130},{},[10131],{"type":998,"value":10132},"Multi-value assignment",{"type":993,"tag":10078,"props":10134,"children":10135},{},[10136],{"type":993,"tag":1017,"props":10137,"children":10139},{"className":10138},[],[10140],{"type":998,"value":10141},"name, age, job = person",{"type":993,"tag":10046,"props":10143,"children":10144},{},[10145,10153,10161,10166],{"type":993,"tag":10078,"props":10146,"children":10147},{},[10148],{"type":993,"tag":1502,"props":10149,"children":10150},{},[10151],{"type":998,"value":10152},"Rest",{"type":993,"tag":10078,"props":10154,"children":10155},{},[10156],{"type":993,"tag":1017,"props":10157,"children":10159},{"className":10158},[],[10160],{"type":998,"value":2880},{"type":993,"tag":10078,"props":10162,"children":10163},{},[10164],{"type":998,"value":10165},"Capture remaining",{"type":993,"tag":10078,"props":10167,"children":10168},{},[10169],{"type":993,"tag":1017,"props":10170,"children":10172},{"className":10171},[],[10173],{"type":998,"value":10174},"head, *tail = data",{"type":993,"tag":10046,"props":10176,"children":10177},{},[10178,10186,10195,10200],{"type":993,"tag":10078,"props":10179,"children":10180},{},[10181],{"type":993,"tag":1502,"props":10182,"children":10183},{},[10184],{"type":998,"value":10185},"Middle",{"type":993,"tag":10078,"props":10187,"children":10188},{},[10189],{"type":993,"tag":1017,"props":10190,"children":10192},{"className":10191},[],[10193],{"type":998,"value":10194},"first, *mid, last = tuple",{"type":993,"tag":10078,"props":10196,"children":10197},{},[10198],{"type":998,"value":10199},"Capture middle elements",{"type":993,"tag":10078,"props":10201,"children":10202},{},[10203],{"type":993,"tag":1017,"props":10204,"children":10206},{"className":10205},[],[10207],{"type":998,"value":10208},"start, *body, end = items",{"type":993,"tag":10046,"props":10210,"children":10211},{},[10212,10220,10229,10234],{"type":993,"tag":10078,"props":10213,"children":10214},{},[10215],{"type":993,"tag":1502,"props":10216,"children":10217},{},[10218],{"type":998,"value":10219},"Nested",{"type":993,"tag":10078,"props":10221,"children":10222},{},[10223],{"type":993,"tag":1017,"props":10224,"children":10226},{"className":10225},[],[10227],{"type":998,"value":10228},"(a, b), c = tuple",{"type":993,"tag":10078,"props":10230,"children":10231},{},[10232],{"type":998,"value":10233},"Nested structures",{"type":993,"tag":10078,"props":10235,"children":10236},{},[10237],{"type":993,"tag":1017,"props":10238,"children":10240},{"className":10239},[],[10241],{"type":998,"value":10242},"(x, y), z = point_3d",{"type":993,"tag":10046,"props":10244,"children":10245},{},[10246,10254,10263,10268],{"type":993,"tag":10078,"props":10247,"children":10248},{},[10249],{"type":993,"tag":1502,"props":10250,"children":10251},{},[10252],{"type":998,"value":10253},"Ignore",{"type":993,"tag":10078,"props":10255,"children":10256},{},[10257],{"type":993,"tag":1017,"props":10258,"children":10260},{"className":10259},[],[10261],{"type":998,"value":10262},"a, _, c = tuple",{"type":993,"tag":10078,"props":10264,"children":10265},{},[10266],{"type":998,"value":10267},"Skip unwanted elements",{"type":993,"tag":10078,"props":10269,"children":10270},{},[10271],{"type":993,"tag":1017,"props":10272,"children":10274},{"className":10273},[],[10275],{"type":998,"value":10276},"name, _, email = record",{"type":993,"tag":10046,"props":10278,"children":10279},{},[10280,10288,10297,10302],{"type":993,"tag":10078,"props":10281,"children":10282},{},[10283],{"type":993,"tag":1502,"props":10284,"children":10285},{},[10286],{"type":998,"value":10287},"Swap",{"type":993,"tag":10078,"props":10289,"children":10290},{},[10291],{"type":993,"tag":1017,"props":10292,"children":10294},{"className":10293},[],[10295],{"type":998,"value":10296},"a, b = b, a",{"type":993,"tag":10078,"props":10298,"children":10299},{},[10300],{"type":998,"value":10301},"Variable exchange",{"type":993,"tag":10078,"props":10303,"children":10304},{},[10305],{"type":993,"tag":1017,"props":10306,"children":10308},{"className":10307},[],[10309],{"type":998,"value":10310},"x, y = y, x",{"type":993,"tag":1001,"props":10312,"children":10313},{},[10314],{"type":998,"value":10315},"Choose the pattern that best matches your data structure and access needs.",{"type":993,"tag":1001,"props":10317,"children":10318},{},[10319,10321,10326,10328,10333],{"type":998,"value":10320},"Learn more about ",{"type":993,"tag":1376,"props":10322,"children":10323},{"href":416},[10324],{"type":998,"value":10325},"iterating tuples",{"type":998,"value":10327}," and ",{"type":993,"tag":1376,"props":10329,"children":10330},{"href":425},[10331],{"type":998,"value":10332},"merging tuples",{"type":998,"value":10334}," to expand your tuple manipulation skills.",{"type":993,"tag":10336,"props":10337,"children":10340},"exercise",{"hint":10338,"prompt":10339},"Use the pattern a, b = b, a to swap values in one line","Use tuple unpacking to swap the values of two variables without using a temporary variable.",[10341],{"type":993,"tag":1011,"props":10342,"children":10344},{"className":1013,"code":10343,"language":6,"meta":8,"style":8},"# TODO: Create two variables with initial values\nx = 10\ny = 20\n\nprint(f\"Before swap: x = {x}, y = {y}\")\n\n# TODO: Swap the values using tuple unpacking\n# TODO: Your swap code here\n\nprint(f\"After swap: x = {x}, y = {y}\")\n",[10345],{"type":993,"tag":1017,"props":10346,"children":10347},{"__ignoreMap":8},[10348,10366,10383,10400,10407,10464,10471,10487,10503,10510],{"type":993,"tag":1021,"props":10349,"children":10350},{"class":1023,"line":12},[10351,10356,10361],{"type":993,"tag":1021,"props":10352,"children":10353},{"style":1027},[10354],{"type":998,"value":10355},"# ",{"type":993,"tag":1021,"props":10357,"children":10358},{"style":1042},[10359],{"type":998,"value":10360},"TODO",{"type":993,"tag":1021,"props":10362,"children":10363},{"style":1027},[10364],{"type":998,"value":10365},": Create two variables with initial values\n",{"type":993,"tag":1021,"props":10367,"children":10368},{"class":1023,"line":27},[10369,10374,10378],{"type":993,"tag":1021,"props":10370,"children":10371},{"style":1036},[10372],{"type":998,"value":10373},"x ",{"type":993,"tag":1021,"props":10375,"children":10376},{"style":1042},[10377],{"type":998,"value":1045},{"type":993,"tag":1021,"props":10379,"children":10380},{"style":1053},[10381],{"type":998,"value":10382}," 10\n",{"type":993,"tag":1021,"props":10384,"children":10385},{"class":1023,"line":36},[10386,10391,10395],{"type":993,"tag":1021,"props":10387,"children":10388},{"style":1036},[10389],{"type":998,"value":10390},"y ",{"type":993,"tag":1021,"props":10392,"children":10393},{"style":1042},[10394],{"type":998,"value":1045},{"type":993,"tag":1021,"props":10396,"children":10397},{"style":1053},[10398],{"type":998,"value":10399}," 20\n",{"type":993,"tag":1021,"props":10401,"children":10402},{"class":1023,"line":45},[10403],{"type":993,"tag":1021,"props":10404,"children":10405},{"emptyLinePlaceholder":13},[10406],{"type":998,"value":1096},{"type":993,"tag":1021,"props":10408,"children":10409},{"class":1023,"line":54},[10410,10414,10418,10422,10427,10431,10435,10439,10444,10448,10452,10456,10460],{"type":993,"tag":1021,"props":10411,"children":10412},{"style":1053},[10413],{"type":998,"value":1172},{"type":993,"tag":1021,"props":10415,"children":10416},{"style":1036},[10417],{"type":998,"value":1177},{"type":993,"tag":1021,"props":10419,"children":10420},{"style":1042},[10421],{"type":998,"value":1182},{"type":993,"tag":1021,"props":10423,"children":10424},{"style":1115},[10425],{"type":998,"value":10426},"\"Before swap: x = ",{"type":993,"tag":1021,"props":10428,"children":10429},{"style":1053},[10430],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10432,"children":10433},{"style":1036},[10434],{"type":998,"value":1197},{"type":993,"tag":1021,"props":10436,"children":10437},{"style":1053},[10438],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10440,"children":10441},{"style":1115},[10442],{"type":998,"value":10443},", y = ",{"type":993,"tag":1021,"props":10445,"children":10446},{"style":1053},[10447],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10449,"children":10450},{"style":1036},[10451],{"type":998,"value":1216},{"type":993,"tag":1021,"props":10453,"children":10454},{"style":1053},[10455],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10457,"children":10458},{"style":1115},[10459],{"type":998,"value":1225},{"type":993,"tag":1021,"props":10461,"children":10462},{"style":1036},[10463],{"type":998,"value":1071},{"type":993,"tag":1021,"props":10465,"children":10466},{"class":1023,"line":63},[10467],{"type":993,"tag":1021,"props":10468,"children":10469},{"emptyLinePlaceholder":13},[10470],{"type":998,"value":1096},{"type":993,"tag":1021,"props":10472,"children":10473},{"class":1023,"line":72},[10474,10478,10482],{"type":993,"tag":1021,"props":10475,"children":10476},{"style":1027},[10477],{"type":998,"value":10355},{"type":993,"tag":1021,"props":10479,"children":10480},{"style":1042},[10481],{"type":998,"value":10360},{"type":993,"tag":1021,"props":10483,"children":10484},{"style":1027},[10485],{"type":998,"value":10486},": Swap the values using tuple unpacking\n",{"type":993,"tag":1021,"props":10488,"children":10489},{"class":1023,"line":81},[10490,10494,10498],{"type":993,"tag":1021,"props":10491,"children":10492},{"style":1027},[10493],{"type":998,"value":10355},{"type":993,"tag":1021,"props":10495,"children":10496},{"style":1042},[10497],{"type":998,"value":10360},{"type":993,"tag":1021,"props":10499,"children":10500},{"style":1027},[10501],{"type":998,"value":10502},": Your swap code here\n",{"type":993,"tag":1021,"props":10504,"children":10505},{"class":1023,"line":91},[10506],{"type":993,"tag":1021,"props":10507,"children":10508},{"emptyLinePlaceholder":13},[10509],{"type":998,"value":1096},{"type":993,"tag":1021,"props":10511,"children":10512},{"class":1023,"line":100},[10513,10517,10521,10525,10530,10534,10538,10542,10546,10550,10554,10558,10562],{"type":993,"tag":1021,"props":10514,"children":10515},{"style":1053},[10516],{"type":998,"value":1172},{"type":993,"tag":1021,"props":10518,"children":10519},{"style":1036},[10520],{"type":998,"value":1177},{"type":993,"tag":1021,"props":10522,"children":10523},{"style":1042},[10524],{"type":998,"value":1182},{"type":993,"tag":1021,"props":10526,"children":10527},{"style":1115},[10528],{"type":998,"value":10529},"\"After swap: x = ",{"type":993,"tag":1021,"props":10531,"children":10532},{"style":1053},[10533],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10535,"children":10536},{"style":1036},[10537],{"type":998,"value":1197},{"type":993,"tag":1021,"props":10539,"children":10540},{"style":1053},[10541],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10543,"children":10544},{"style":1115},[10545],{"type":998,"value":10443},{"type":993,"tag":1021,"props":10547,"children":10548},{"style":1053},[10549],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10551,"children":10552},{"style":1036},[10553],{"type":998,"value":1216},{"type":993,"tag":1021,"props":10555,"children":10556},{"style":1053},[10557],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10559,"children":10560},{"style":1115},[10561],{"type":998,"value":1225},{"type":993,"tag":1021,"props":10563,"children":10564},{"style":1036},[10565],{"type":998,"value":1071},{"type":993,"tag":1609,"props":10567,"children":10569},{"id":10568},"solution-and-explanation",[10570],{"type":998,"value":10571},"Solution and Explanation 💡",{"type":993,"tag":10573,"props":10574,"children":10575},"details",{},[10576,10584,10786,10794],{"type":993,"tag":10577,"props":10578,"children":10581},"summary",{"className":10579},[10580],"cursor-pointer",[10582],{"type":998,"value":10583},"Click to see the complete solution",{"type":993,"tag":1007,"props":10585,"children":10586},{},[10587],{"type":993,"tag":1011,"props":10588,"children":10590},{"className":1013,"code":10589,"language":6,"meta":8,"style":8},"# Create two variables with initial values\nx = 10\ny = 20\n\nprint(f\"Before swap: x = {x}, y = {y}\")\n\n# Swap the values using tuple unpacking\nx, y = y, x\n\nprint(f\"After swap: x = {x}, y = {y}\")\n",[10591],{"type":993,"tag":1017,"props":10592,"children":10593},{"__ignoreMap":8},[10594,10602,10617,10632,10639,10694,10701,10709,10724,10731],{"type":993,"tag":1021,"props":10595,"children":10596},{"class":1023,"line":12},[10597],{"type":993,"tag":1021,"props":10598,"children":10599},{"style":1027},[10600],{"type":998,"value":10601},"# Create two variables with initial values\n",{"type":993,"tag":1021,"props":10603,"children":10604},{"class":1023,"line":27},[10605,10609,10613],{"type":993,"tag":1021,"props":10606,"children":10607},{"style":1036},[10608],{"type":998,"value":10373},{"type":993,"tag":1021,"props":10610,"children":10611},{"style":1042},[10612],{"type":998,"value":1045},{"type":993,"tag":1021,"props":10614,"children":10615},{"style":1053},[10616],{"type":998,"value":10382},{"type":993,"tag":1021,"props":10618,"children":10619},{"class":1023,"line":36},[10620,10624,10628],{"type":993,"tag":1021,"props":10621,"children":10622},{"style":1036},[10623],{"type":998,"value":10390},{"type":993,"tag":1021,"props":10625,"children":10626},{"style":1042},[10627],{"type":998,"value":1045},{"type":993,"tag":1021,"props":10629,"children":10630},{"style":1053},[10631],{"type":998,"value":10399},{"type":993,"tag":1021,"props":10633,"children":10634},{"class":1023,"line":45},[10635],{"type":993,"tag":1021,"props":10636,"children":10637},{"emptyLinePlaceholder":13},[10638],{"type":998,"value":1096},{"type":993,"tag":1021,"props":10640,"children":10641},{"class":1023,"line":54},[10642,10646,10650,10654,10658,10662,10666,10670,10674,10678,10682,10686,10690],{"type":993,"tag":1021,"props":10643,"children":10644},{"style":1053},[10645],{"type":998,"value":1172},{"type":993,"tag":1021,"props":10647,"children":10648},{"style":1036},[10649],{"type":998,"value":1177},{"type":993,"tag":1021,"props":10651,"children":10652},{"style":1042},[10653],{"type":998,"value":1182},{"type":993,"tag":1021,"props":10655,"children":10656},{"style":1115},[10657],{"type":998,"value":10426},{"type":993,"tag":1021,"props":10659,"children":10660},{"style":1053},[10661],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10663,"children":10664},{"style":1036},[10665],{"type":998,"value":1197},{"type":993,"tag":1021,"props":10667,"children":10668},{"style":1053},[10669],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10671,"children":10672},{"style":1115},[10673],{"type":998,"value":10443},{"type":993,"tag":1021,"props":10675,"children":10676},{"style":1053},[10677],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10679,"children":10680},{"style":1036},[10681],{"type":998,"value":1216},{"type":993,"tag":1021,"props":10683,"children":10684},{"style":1053},[10685],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10687,"children":10688},{"style":1115},[10689],{"type":998,"value":1225},{"type":993,"tag":1021,"props":10691,"children":10692},{"style":1036},[10693],{"type":998,"value":1071},{"type":993,"tag":1021,"props":10695,"children":10696},{"class":1023,"line":63},[10697],{"type":993,"tag":1021,"props":10698,"children":10699},{"emptyLinePlaceholder":13},[10700],{"type":998,"value":1096},{"type":993,"tag":1021,"props":10702,"children":10703},{"class":1023,"line":72},[10704],{"type":993,"tag":1021,"props":10705,"children":10706},{"style":1027},[10707],{"type":998,"value":10708},"# Swap the values using tuple unpacking\n",{"type":993,"tag":1021,"props":10710,"children":10711},{"class":1023,"line":81},[10712,10716,10720],{"type":993,"tag":1021,"props":10713,"children":10714},{"style":1036},[10715],{"type":998,"value":1079},{"type":993,"tag":1021,"props":10717,"children":10718},{"style":1042},[10719],{"type":998,"value":1045},{"type":993,"tag":1021,"props":10721,"children":10722},{"style":1036},[10723],{"type":998,"value":2561},{"type":993,"tag":1021,"props":10725,"children":10726},{"class":1023,"line":91},[10727],{"type":993,"tag":1021,"props":10728,"children":10729},{"emptyLinePlaceholder":13},[10730],{"type":998,"value":1096},{"type":993,"tag":1021,"props":10732,"children":10733},{"class":1023,"line":100},[10734,10738,10742,10746,10750,10754,10758,10762,10766,10770,10774,10778,10782],{"type":993,"tag":1021,"props":10735,"children":10736},{"style":1053},[10737],{"type":998,"value":1172},{"type":993,"tag":1021,"props":10739,"children":10740},{"style":1036},[10741],{"type":998,"value":1177},{"type":993,"tag":1021,"props":10743,"children":10744},{"style":1042},[10745],{"type":998,"value":1182},{"type":993,"tag":1021,"props":10747,"children":10748},{"style":1115},[10749],{"type":998,"value":10529},{"type":993,"tag":1021,"props":10751,"children":10752},{"style":1053},[10753],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10755,"children":10756},{"style":1036},[10757],{"type":998,"value":1197},{"type":993,"tag":1021,"props":10759,"children":10760},{"style":1053},[10761],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10763,"children":10764},{"style":1115},[10765],{"type":998,"value":10443},{"type":993,"tag":1021,"props":10767,"children":10768},{"style":1053},[10769],{"type":998,"value":1192},{"type":993,"tag":1021,"props":10771,"children":10772},{"style":1036},[10773],{"type":998,"value":1216},{"type":993,"tag":1021,"props":10775,"children":10776},{"style":1053},[10777],{"type":998,"value":1202},{"type":993,"tag":1021,"props":10779,"children":10780},{"style":1115},[10781],{"type":998,"value":1225},{"type":993,"tag":1021,"props":10783,"children":10784},{"style":1036},[10785],{"type":998,"value":1071},{"type":993,"tag":1001,"props":10787,"children":10788},{},[10789],{"type":993,"tag":1502,"props":10790,"children":10791},{},[10792],{"type":998,"value":10793},"Key Learning Points:",{"type":993,"tag":1508,"props":10795,"children":10796},{},[10797,10817,10836,10847],{"type":993,"tag":1512,"props":10798,"children":10799},{},[10800,10802,10807,10809,10815],{"type":998,"value":10801},"📌 ",{"type":993,"tag":1502,"props":10803,"children":10804},{},[10805],{"type":998,"value":10806},"Tuple packing",{"type":998,"value":10808},": The right side ",{"type":993,"tag":1017,"props":10810,"children":10812},{"className":10811},[],[10813],{"type":998,"value":10814},"y, x",{"type":998,"value":10816}," creates a tuple automatically",{"type":993,"tag":1512,"props":10818,"children":10819},{},[10820,10821,10826,10828,10834],{"type":998,"value":10801},{"type":993,"tag":1502,"props":10822,"children":10823},{},[10824],{"type":998,"value":10825},"Tuple unpacking",{"type":998,"value":10827},": The left side ",{"type":993,"tag":1017,"props":10829,"children":10831},{"className":10830},[],[10832],{"type":998,"value":10833},"x, y =",{"type":998,"value":10835}," unpacks the tuple to variables",{"type":993,"tag":1512,"props":10837,"children":10838},{},[10839,10840,10845],{"type":998,"value":10801},{"type":993,"tag":1502,"props":10841,"children":10842},{},[10843],{"type":998,"value":10844},"One-line swap",{"type":998,"value":10846},": This elegant pattern swaps values without temporary variables",{"type":993,"tag":1512,"props":10848,"children":10849},{},[10850,10851,10856],{"type":998,"value":10801},{"type":993,"tag":1502,"props":10852,"children":10853},{},[10854],{"type":998,"value":10855},"Multiple assignment",{"type":998,"value":10857},": Python evaluates right side first, then assigns to left side",{"type":993,"tag":1480,"props":10859,"children":10861},{"id":10860},"test-your-knowledge",[10862],{"type":998,"value":10863},"Test Your Knowledge",{"type":993,"tag":1001,"props":10865,"children":10866},{},[10867],{"type":998,"value":10868},"Test what you've learned about tuple unpacking in Python:",{"type":993,"tag":10870,"props":10871,"children":10875},"redirect-button",{"icon":10872,"label":10873,"url":10874},"pi pi-send","Take Quiz","/tutorial-quiz/python/tuple-unpacking",[],{"type":993,"tag":1480,"props":10877,"children":10879},{"id":10878},"whats-next",[10880],{"type":998,"value":10881},"What's Next?",{"type":993,"tag":1001,"props":10883,"children":10884},{},[10885],{"type":998,"value":10886},"Now that you understand tuple unpacking, you're ready to learn about iterating through tuples systematically. Understanding iteration patterns will help you process tuple data efficiently in various scenarios.",{"type":993,"tag":1001,"props":10888,"children":10889},{},[10890,10892,10896],{"type":998,"value":10891},"Ready to continue? Check out our lesson on ",{"type":993,"tag":1376,"props":10893,"children":10894},{"href":416},[10895],{"type":998,"value":417},{"type":998,"value":10897},".",{"type":993,"tag":10899,"props":10900,"children":10901},"style",{},[10902],{"type":998,"value":10903},"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":10905},[10906,10911,10916,10921,10926,10931,10934,10935],{"id":1482,"depth":27,"text":1485,"children":10907},[10908,10909,10910],{"id":1611,"depth":36,"text":1614},{"id":2038,"depth":36,"text":2041},{"id":2423,"depth":36,"text":2426},{"id":2836,"depth":27,"text":2839,"children":10912},[10913,10914,10915],{"id":2962,"depth":36,"text":2965},{"id":3393,"depth":36,"text":3396},{"id":3829,"depth":36,"text":3832},{"id":4378,"depth":27,"text":4381,"children":10917},[10918,10919,10920],{"id":4477,"depth":36,"text":4480},{"id":5042,"depth":36,"text":5045},{"id":5649,"depth":36,"text":5652},{"id":6388,"depth":27,"text":6391,"children":10922},[10923,10924,10925],{"id":6478,"depth":36,"text":6481},{"id":7230,"depth":36,"text":7233},{"id":7778,"depth":36,"text":7781},{"id":8282,"depth":27,"text":8285,"children":10927},[10928,10929,10930],{"id":8354,"depth":36,"text":8357},{"id":8942,"depth":36,"text":8945},{"id":9489,"depth":36,"text":9492},{"id":10028,"depth":27,"text":10031,"children":10932},[10933],{"id":10568,"depth":36,"text":10571},{"id":10860,"depth":27,"text":10863},{"id":10878,"depth":27,"text":10881},1782373739304]