[{"data":1,"prerenderedAt":8310},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/changing-tuples":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",[397],{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"body":989,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},{"type":990,"children":991,"toc":8280},"root",[992,1000,1006,1011,1392,1399,1404,1496,1503,1893,1899,2210,2216,2221,2333,2339,2802,2808,3330,3336,3815,3820,3826,3831,3927,3933,4306,4312,4561,4567,4847,4853,4858,4944,4950,5459,5465,6025,6031,6465,6471,6558,6564,7065,7071,7448,7454,7459,7675,7680,7700,7829,7835,8235,8241,8246,8252,8258,8263,8274],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":401},[997],{"type":998,"value":999},"text","🔄 Changing Tuples",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Tuples are immutable, meaning you cannot change their contents after creation. This fundamental characteristic protects your data from accidental modification but requires different approaches when you need to work with modified versions. Understanding immutability and learning workaround techniques is essential for effective tuple usage.",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"While you can't change tuples directly, Python provides elegant ways to create new tuples with modified data, convert between mutable and immutable types, and work within immutability constraints.",{"type":993,"tag":1012,"props":1013,"children":1014},"code-try",{},[1015],{"type":993,"tag":1016,"props":1017,"children":1020},"pre",{"className":1018,"code":1019,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Tuple immutability demonstration\noriginal = (1, 2, 3, 4, 5)\nprint(f\"Original tuple: {original}\")\n\n# This would cause an error:\n# original[0] = 10  # TypeError: 'tuple' object does not support item assignment\n\n# Instead, create a new tuple\nmodified = (10,) + original[1:]\nprint(f\"Modified tuple: {modified}\")\n\n# Or use slicing and concatenation\nupdated = original[:2] + (99,) + original[3:]\nprint(f\"Updated tuple: {updated}\")\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1104,1152,1160,1168,1176,1183,1191,1236,1277,1284,1292,1351],{"type":993,"tag":1026,"props":1027,"children":1029},"span",{"class":1028,"line":12},"line",[1030],{"type":993,"tag":1026,"props":1031,"children":1033},{"style":1032},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1034],{"type":998,"value":1035},"# Tuple immutability demonstration\n",{"type":993,"tag":1026,"props":1037,"children":1038},{"class":1028,"line":27},[1039,1045,1051,1056,1062,1067,1072,1076,1081,1085,1090,1094,1099],{"type":993,"tag":1026,"props":1040,"children":1042},{"style":1041},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1043],{"type":998,"value":1044},"original ",{"type":993,"tag":1026,"props":1046,"children":1048},{"style":1047},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1049],{"type":998,"value":1050},"=",{"type":993,"tag":1026,"props":1052,"children":1053},{"style":1041},[1054],{"type":998,"value":1055}," (",{"type":993,"tag":1026,"props":1057,"children":1059},{"style":1058},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1060],{"type":998,"value":1061},"1",{"type":993,"tag":1026,"props":1063,"children":1064},{"style":1041},[1065],{"type":998,"value":1066},", ",{"type":993,"tag":1026,"props":1068,"children":1069},{"style":1058},[1070],{"type":998,"value":1071},"2",{"type":993,"tag":1026,"props":1073,"children":1074},{"style":1041},[1075],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1077,"children":1078},{"style":1058},[1079],{"type":998,"value":1080},"3",{"type":993,"tag":1026,"props":1082,"children":1083},{"style":1041},[1084],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1086,"children":1087},{"style":1058},[1088],{"type":998,"value":1089},"4",{"type":993,"tag":1026,"props":1091,"children":1092},{"style":1041},[1093],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1095,"children":1096},{"style":1058},[1097],{"type":998,"value":1098},"5",{"type":993,"tag":1026,"props":1100,"children":1101},{"style":1041},[1102],{"type":998,"value":1103},")\n",{"type":993,"tag":1026,"props":1105,"children":1106},{"class":1028,"line":36},[1107,1112,1117,1122,1128,1133,1138,1143,1148],{"type":993,"tag":1026,"props":1108,"children":1109},{"style":1058},[1110],{"type":998,"value":1111},"print",{"type":993,"tag":1026,"props":1113,"children":1114},{"style":1041},[1115],{"type":998,"value":1116},"(",{"type":993,"tag":1026,"props":1118,"children":1119},{"style":1047},[1120],{"type":998,"value":1121},"f",{"type":993,"tag":1026,"props":1123,"children":1125},{"style":1124},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1126],{"type":998,"value":1127},"\"Original tuple: ",{"type":993,"tag":1026,"props":1129,"children":1130},{"style":1058},[1131],{"type":998,"value":1132},"{",{"type":993,"tag":1026,"props":1134,"children":1135},{"style":1041},[1136],{"type":998,"value":1137},"original",{"type":993,"tag":1026,"props":1139,"children":1140},{"style":1058},[1141],{"type":998,"value":1142},"}",{"type":993,"tag":1026,"props":1144,"children":1145},{"style":1124},[1146],{"type":998,"value":1147},"\"",{"type":993,"tag":1026,"props":1149,"children":1150},{"style":1041},[1151],{"type":998,"value":1103},{"type":993,"tag":1026,"props":1153,"children":1154},{"class":1028,"line":45},[1155],{"type":993,"tag":1026,"props":1156,"children":1157},{"emptyLinePlaceholder":13},[1158],{"type":998,"value":1159},"\n",{"type":993,"tag":1026,"props":1161,"children":1162},{"class":1028,"line":54},[1163],{"type":993,"tag":1026,"props":1164,"children":1165},{"style":1032},[1166],{"type":998,"value":1167},"# This would cause an error:\n",{"type":993,"tag":1026,"props":1169,"children":1170},{"class":1028,"line":63},[1171],{"type":993,"tag":1026,"props":1172,"children":1173},{"style":1032},[1174],{"type":998,"value":1175},"# original[0] = 10  # TypeError: 'tuple' object does not support item assignment\n",{"type":993,"tag":1026,"props":1177,"children":1178},{"class":1028,"line":72},[1179],{"type":993,"tag":1026,"props":1180,"children":1181},{"emptyLinePlaceholder":13},[1182],{"type":998,"value":1159},{"type":993,"tag":1026,"props":1184,"children":1185},{"class":1028,"line":81},[1186],{"type":993,"tag":1026,"props":1187,"children":1188},{"style":1032},[1189],{"type":998,"value":1190},"# Instead, create a new tuple\n",{"type":993,"tag":1026,"props":1192,"children":1193},{"class":1028,"line":91},[1194,1199,1203,1207,1212,1217,1222,1227,1231],{"type":993,"tag":1026,"props":1195,"children":1196},{"style":1041},[1197],{"type":998,"value":1198},"modified ",{"type":993,"tag":1026,"props":1200,"children":1201},{"style":1047},[1202],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1204,"children":1205},{"style":1041},[1206],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1208,"children":1209},{"style":1058},[1210],{"type":998,"value":1211},"10",{"type":993,"tag":1026,"props":1213,"children":1214},{"style":1041},[1215],{"type":998,"value":1216},",) ",{"type":993,"tag":1026,"props":1218,"children":1219},{"style":1047},[1220],{"type":998,"value":1221},"+",{"type":993,"tag":1026,"props":1223,"children":1224},{"style":1041},[1225],{"type":998,"value":1226}," original[",{"type":993,"tag":1026,"props":1228,"children":1229},{"style":1058},[1230],{"type":998,"value":1061},{"type":993,"tag":1026,"props":1232,"children":1233},{"style":1041},[1234],{"type":998,"value":1235},":]\n",{"type":993,"tag":1026,"props":1237,"children":1238},{"class":1028,"line":100},[1239,1243,1247,1251,1256,1260,1265,1269,1273],{"type":993,"tag":1026,"props":1240,"children":1241},{"style":1058},[1242],{"type":998,"value":1111},{"type":993,"tag":1026,"props":1244,"children":1245},{"style":1041},[1246],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1248,"children":1249},{"style":1047},[1250],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1252,"children":1253},{"style":1124},[1254],{"type":998,"value":1255},"\"Modified tuple: ",{"type":993,"tag":1026,"props":1257,"children":1258},{"style":1058},[1259],{"type":998,"value":1132},{"type":993,"tag":1026,"props":1261,"children":1262},{"style":1041},[1263],{"type":998,"value":1264},"modified",{"type":993,"tag":1026,"props":1266,"children":1267},{"style":1058},[1268],{"type":998,"value":1142},{"type":993,"tag":1026,"props":1270,"children":1271},{"style":1124},[1272],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1274,"children":1275},{"style":1041},[1276],{"type":998,"value":1103},{"type":993,"tag":1026,"props":1278,"children":1279},{"class":1028,"line":109},[1280],{"type":993,"tag":1026,"props":1281,"children":1282},{"emptyLinePlaceholder":13},[1283],{"type":998,"value":1159},{"type":993,"tag":1026,"props":1285,"children":1286},{"class":1028,"line":118},[1287],{"type":993,"tag":1026,"props":1288,"children":1289},{"style":1032},[1290],{"type":998,"value":1291},"# Or use slicing and concatenation\n",{"type":993,"tag":1026,"props":1293,"children":1294},{"class":1028,"line":127},[1295,1300,1304,1309,1313,1318,1322,1326,1331,1335,1339,1343,1347],{"type":993,"tag":1026,"props":1296,"children":1297},{"style":1041},[1298],{"type":998,"value":1299},"updated ",{"type":993,"tag":1026,"props":1301,"children":1302},{"style":1047},[1303],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1305,"children":1306},{"style":1041},[1307],{"type":998,"value":1308}," original[:",{"type":993,"tag":1026,"props":1310,"children":1311},{"style":1058},[1312],{"type":998,"value":1071},{"type":993,"tag":1026,"props":1314,"children":1315},{"style":1041},[1316],{"type":998,"value":1317},"] ",{"type":993,"tag":1026,"props":1319,"children":1320},{"style":1047},[1321],{"type":998,"value":1221},{"type":993,"tag":1026,"props":1323,"children":1324},{"style":1041},[1325],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1327,"children":1328},{"style":1058},[1329],{"type":998,"value":1330},"99",{"type":993,"tag":1026,"props":1332,"children":1333},{"style":1041},[1334],{"type":998,"value":1216},{"type":993,"tag":1026,"props":1336,"children":1337},{"style":1047},[1338],{"type":998,"value":1221},{"type":993,"tag":1026,"props":1340,"children":1341},{"style":1041},[1342],{"type":998,"value":1226},{"type":993,"tag":1026,"props":1344,"children":1345},{"style":1058},[1346],{"type":998,"value":1080},{"type":993,"tag":1026,"props":1348,"children":1349},{"style":1041},[1350],{"type":998,"value":1235},{"type":993,"tag":1026,"props":1352,"children":1353},{"class":1028,"line":136},[1354,1358,1362,1366,1371,1375,1380,1384,1388],{"type":993,"tag":1026,"props":1355,"children":1356},{"style":1058},[1357],{"type":998,"value":1111},{"type":993,"tag":1026,"props":1359,"children":1360},{"style":1041},[1361],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1363,"children":1364},{"style":1047},[1365],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1367,"children":1368},{"style":1124},[1369],{"type":998,"value":1370},"\"Updated tuple: ",{"type":993,"tag":1026,"props":1372,"children":1373},{"style":1058},[1374],{"type":998,"value":1132},{"type":993,"tag":1026,"props":1376,"children":1377},{"style":1041},[1378],{"type":998,"value":1379},"updated",{"type":993,"tag":1026,"props":1381,"children":1382},{"style":1058},[1383],{"type":998,"value":1142},{"type":993,"tag":1026,"props":1385,"children":1386},{"style":1124},[1387],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1389,"children":1390},{"style":1041},[1391],{"type":998,"value":1103},{"type":993,"tag":1393,"props":1394,"children":1396},"h2",{"id":1395},"understanding-tuple-immutability",[1397],{"type":998,"value":1398},"🔒 Understanding Tuple Immutability",{"type":993,"tag":1001,"props":1400,"children":1401},{},[1402],{"type":998,"value":1403},"Tuple immutability means that once created, you cannot add, remove, or change elements. This design choice provides data integrity, thread safety, and enables tuples to be used as dictionary keys.",{"type":993,"tag":1405,"props":1406,"children":1410},"info-box",{"emoji":1407,"title":1408,"type":1409},"🔒","Immutability Fundamentals","warning",[1411,1420,1445,1453,1476,1486],{"type":993,"tag":1001,"props":1412,"children":1413},{},[1414],{"type":993,"tag":1415,"props":1416,"children":1417},"strong",{},[1418],{"type":998,"value":1419},"Core Concepts:",{"type":993,"tag":1421,"props":1422,"children":1423},"ul",{},[1424,1430,1435,1440],{"type":993,"tag":1425,"props":1426,"children":1427},"li",{},[1428],{"type":998,"value":1429},"Elements cannot be modified after creation",{"type":993,"tag":1425,"props":1431,"children":1432},{},[1433],{"type":998,"value":1434},"No methods for adding or removing elements",{"type":993,"tag":1425,"props":1436,"children":1437},{},[1438],{"type":998,"value":1439},"Attempting modification raises TypeError",{"type":993,"tag":1425,"props":1441,"children":1442},{},[1443],{"type":998,"value":1444},"Immutability applies to tuple structure, not necessarily contents",{"type":993,"tag":1001,"props":1446,"children":1447},{},[1448],{"type":993,"tag":1415,"props":1449,"children":1450},{},[1451],{"type":998,"value":1452},"Benefits of Immutability:",{"type":993,"tag":1421,"props":1454,"children":1455},{},[1456,1461,1466,1471],{"type":993,"tag":1425,"props":1457,"children":1458},{},[1459],{"type":998,"value":1460},"Data integrity and protection from accidental changes",{"type":993,"tag":1425,"props":1462,"children":1463},{},[1464],{"type":998,"value":1465},"Thread-safe for concurrent programming",{"type":993,"tag":1425,"props":1467,"children":1468},{},[1469],{"type":998,"value":1470},"Hashable (can be dictionary keys)",{"type":993,"tag":1425,"props":1472,"children":1473},{},[1474],{"type":998,"value":1475},"Predictable behavior in function parameters",{"type":993,"tag":1001,"props":1477,"children":1478},{},[1479,1484],{"type":993,"tag":1415,"props":1480,"children":1481},{},[1482],{"type":998,"value":1483},"Limitations:",{"type":998,"value":1485}," Requires creating new tuples for modifications",{"type":993,"tag":1001,"props":1487,"children":1488},{},[1489,1494],{"type":993,"tag":1415,"props":1490,"children":1491},{},[1492],{"type":998,"value":1493},"Workarounds:",{"type":998,"value":1495}," Convert to list, modify, convert back to tuple",{"type":993,"tag":1497,"props":1498,"children":1500},"h3",{"id":1499},"immutability-error-examples",[1501],{"type":998,"value":1502},"Immutability Error Examples",{"type":993,"tag":1012,"props":1504,"children":1505},{},[1506],{"type":993,"tag":1016,"props":1507,"children":1509},{"className":1018,"code":1508,"language":6,"meta":8,"style":8},"# Immutability demonstrations\ncolors = (\"red\", \"green\", \"blue\")\n\n# These operations will fail:\ntry:\n    colors[0] = \"yellow\"  # Item assignment\nexcept TypeError as e:\n    print(f\"Item assignment error: {e}\")\n\ntry:\n    colors.append(\"purple\")  # No append method\nexcept AttributeError as e:\n    print(f\"Append error: {e}\")\n\ntry:\n    del colors[1]  # Item deletion\nexcept TypeError as e:\n    print(f\"Deletion error: {e}\")\n",[1510],{"type":993,"tag":1022,"props":1511,"children":1512},{"__ignoreMap":8},[1513,1521,1564,1571,1579,1592,1623,1646,1688,1695,1706,1729,1749,1789,1796,1807,1834,1853],{"type":993,"tag":1026,"props":1514,"children":1515},{"class":1028,"line":12},[1516],{"type":993,"tag":1026,"props":1517,"children":1518},{"style":1032},[1519],{"type":998,"value":1520},"# Immutability demonstrations\n",{"type":993,"tag":1026,"props":1522,"children":1523},{"class":1028,"line":27},[1524,1529,1533,1537,1542,1546,1551,1555,1560],{"type":993,"tag":1026,"props":1525,"children":1526},{"style":1041},[1527],{"type":998,"value":1528},"colors ",{"type":993,"tag":1026,"props":1530,"children":1531},{"style":1047},[1532],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1534,"children":1535},{"style":1041},[1536],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1538,"children":1539},{"style":1124},[1540],{"type":998,"value":1541},"\"red\"",{"type":993,"tag":1026,"props":1543,"children":1544},{"style":1041},[1545],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1547,"children":1548},{"style":1124},[1549],{"type":998,"value":1550},"\"green\"",{"type":993,"tag":1026,"props":1552,"children":1553},{"style":1041},[1554],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1556,"children":1557},{"style":1124},[1558],{"type":998,"value":1559},"\"blue\"",{"type":993,"tag":1026,"props":1561,"children":1562},{"style":1041},[1563],{"type":998,"value":1103},{"type":993,"tag":1026,"props":1565,"children":1566},{"class":1028,"line":36},[1567],{"type":993,"tag":1026,"props":1568,"children":1569},{"emptyLinePlaceholder":13},[1570],{"type":998,"value":1159},{"type":993,"tag":1026,"props":1572,"children":1573},{"class":1028,"line":45},[1574],{"type":993,"tag":1026,"props":1575,"children":1576},{"style":1032},[1577],{"type":998,"value":1578},"# These operations will fail:\n",{"type":993,"tag":1026,"props":1580,"children":1581},{"class":1028,"line":54},[1582,1587],{"type":993,"tag":1026,"props":1583,"children":1584},{"style":1047},[1585],{"type":998,"value":1586},"try",{"type":993,"tag":1026,"props":1588,"children":1589},{"style":1041},[1590],{"type":998,"value":1591},":\n",{"type":993,"tag":1026,"props":1593,"children":1594},{"class":1028,"line":63},[1595,1600,1605,1609,1613,1618],{"type":993,"tag":1026,"props":1596,"children":1597},{"style":1041},[1598],{"type":998,"value":1599},"    colors[",{"type":993,"tag":1026,"props":1601,"children":1602},{"style":1058},[1603],{"type":998,"value":1604},"0",{"type":993,"tag":1026,"props":1606,"children":1607},{"style":1041},[1608],{"type":998,"value":1317},{"type":993,"tag":1026,"props":1610,"children":1611},{"style":1047},[1612],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1614,"children":1615},{"style":1124},[1616],{"type":998,"value":1617}," \"yellow\"",{"type":993,"tag":1026,"props":1619,"children":1620},{"style":1032},[1621],{"type":998,"value":1622},"  # Item assignment\n",{"type":993,"tag":1026,"props":1624,"children":1625},{"class":1028,"line":72},[1626,1631,1636,1641],{"type":993,"tag":1026,"props":1627,"children":1628},{"style":1047},[1629],{"type":998,"value":1630},"except",{"type":993,"tag":1026,"props":1632,"children":1633},{"style":1058},[1634],{"type":998,"value":1635}," TypeError",{"type":993,"tag":1026,"props":1637,"children":1638},{"style":1047},[1639],{"type":998,"value":1640}," as",{"type":993,"tag":1026,"props":1642,"children":1643},{"style":1041},[1644],{"type":998,"value":1645}," e:\n",{"type":993,"tag":1026,"props":1647,"children":1648},{"class":1028,"line":81},[1649,1654,1658,1662,1667,1671,1676,1680,1684],{"type":993,"tag":1026,"props":1650,"children":1651},{"style":1058},[1652],{"type":998,"value":1653},"    print",{"type":993,"tag":1026,"props":1655,"children":1656},{"style":1041},[1657],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1659,"children":1660},{"style":1047},[1661],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1663,"children":1664},{"style":1124},[1665],{"type":998,"value":1666},"\"Item assignment error: ",{"type":993,"tag":1026,"props":1668,"children":1669},{"style":1058},[1670],{"type":998,"value":1132},{"type":993,"tag":1026,"props":1672,"children":1673},{"style":1041},[1674],{"type":998,"value":1675},"e",{"type":993,"tag":1026,"props":1677,"children":1678},{"style":1058},[1679],{"type":998,"value":1142},{"type":993,"tag":1026,"props":1681,"children":1682},{"style":1124},[1683],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1685,"children":1686},{"style":1041},[1687],{"type":998,"value":1103},{"type":993,"tag":1026,"props":1689,"children":1690},{"class":1028,"line":91},[1691],{"type":993,"tag":1026,"props":1692,"children":1693},{"emptyLinePlaceholder":13},[1694],{"type":998,"value":1159},{"type":993,"tag":1026,"props":1696,"children":1697},{"class":1028,"line":100},[1698,1702],{"type":993,"tag":1026,"props":1699,"children":1700},{"style":1047},[1701],{"type":998,"value":1586},{"type":993,"tag":1026,"props":1703,"children":1704},{"style":1041},[1705],{"type":998,"value":1591},{"type":993,"tag":1026,"props":1707,"children":1708},{"class":1028,"line":109},[1709,1714,1719,1724],{"type":993,"tag":1026,"props":1710,"children":1711},{"style":1041},[1712],{"type":998,"value":1713},"    colors.append(",{"type":993,"tag":1026,"props":1715,"children":1716},{"style":1124},[1717],{"type":998,"value":1718},"\"purple\"",{"type":993,"tag":1026,"props":1720,"children":1721},{"style":1041},[1722],{"type":998,"value":1723},")  ",{"type":993,"tag":1026,"props":1725,"children":1726},{"style":1032},[1727],{"type":998,"value":1728},"# No append method\n",{"type":993,"tag":1026,"props":1730,"children":1731},{"class":1028,"line":118},[1732,1736,1741,1745],{"type":993,"tag":1026,"props":1733,"children":1734},{"style":1047},[1735],{"type":998,"value":1630},{"type":993,"tag":1026,"props":1737,"children":1738},{"style":1058},[1739],{"type":998,"value":1740}," AttributeError",{"type":993,"tag":1026,"props":1742,"children":1743},{"style":1047},[1744],{"type":998,"value":1640},{"type":993,"tag":1026,"props":1746,"children":1747},{"style":1041},[1748],{"type":998,"value":1645},{"type":993,"tag":1026,"props":1750,"children":1751},{"class":1028,"line":127},[1752,1756,1760,1764,1769,1773,1777,1781,1785],{"type":993,"tag":1026,"props":1753,"children":1754},{"style":1058},[1755],{"type":998,"value":1653},{"type":993,"tag":1026,"props":1757,"children":1758},{"style":1041},[1759],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1761,"children":1762},{"style":1047},[1763],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1765,"children":1766},{"style":1124},[1767],{"type":998,"value":1768},"\"Append error: ",{"type":993,"tag":1026,"props":1770,"children":1771},{"style":1058},[1772],{"type":998,"value":1132},{"type":993,"tag":1026,"props":1774,"children":1775},{"style":1041},[1776],{"type":998,"value":1675},{"type":993,"tag":1026,"props":1778,"children":1779},{"style":1058},[1780],{"type":998,"value":1142},{"type":993,"tag":1026,"props":1782,"children":1783},{"style":1124},[1784],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1786,"children":1787},{"style":1041},[1788],{"type":998,"value":1103},{"type":993,"tag":1026,"props":1790,"children":1791},{"class":1028,"line":136},[1792],{"type":993,"tag":1026,"props":1793,"children":1794},{"emptyLinePlaceholder":13},[1795],{"type":998,"value":1159},{"type":993,"tag":1026,"props":1797,"children":1798},{"class":1028,"line":146},[1799,1803],{"type":993,"tag":1026,"props":1800,"children":1801},{"style":1047},[1802],{"type":998,"value":1586},{"type":993,"tag":1026,"props":1804,"children":1805},{"style":1041},[1806],{"type":998,"value":1591},{"type":993,"tag":1026,"props":1808,"children":1809},{"class":1028,"line":155},[1810,1815,1820,1824,1829],{"type":993,"tag":1026,"props":1811,"children":1812},{"style":1047},[1813],{"type":998,"value":1814},"    del",{"type":993,"tag":1026,"props":1816,"children":1817},{"style":1041},[1818],{"type":998,"value":1819}," colors[",{"type":993,"tag":1026,"props":1821,"children":1822},{"style":1058},[1823],{"type":998,"value":1061},{"type":993,"tag":1026,"props":1825,"children":1826},{"style":1041},[1827],{"type":998,"value":1828},"]  ",{"type":993,"tag":1026,"props":1830,"children":1831},{"style":1032},[1832],{"type":998,"value":1833},"# Item deletion\n",{"type":993,"tag":1026,"props":1835,"children":1836},{"class":1028,"line":164},[1837,1841,1845,1849],{"type":993,"tag":1026,"props":1838,"children":1839},{"style":1047},[1840],{"type":998,"value":1630},{"type":993,"tag":1026,"props":1842,"children":1843},{"style":1058},[1844],{"type":998,"value":1635},{"type":993,"tag":1026,"props":1846,"children":1847},{"style":1047},[1848],{"type":998,"value":1640},{"type":993,"tag":1026,"props":1850,"children":1851},{"style":1041},[1852],{"type":998,"value":1645},{"type":993,"tag":1026,"props":1854,"children":1855},{"class":1028,"line":173},[1856,1860,1864,1868,1873,1877,1881,1885,1889],{"type":993,"tag":1026,"props":1857,"children":1858},{"style":1058},[1859],{"type":998,"value":1653},{"type":993,"tag":1026,"props":1861,"children":1862},{"style":1041},[1863],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1865,"children":1866},{"style":1047},[1867],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1869,"children":1870},{"style":1124},[1871],{"type":998,"value":1872},"\"Deletion error: ",{"type":993,"tag":1026,"props":1874,"children":1875},{"style":1058},[1876],{"type":998,"value":1132},{"type":993,"tag":1026,"props":1878,"children":1879},{"style":1041},[1880],{"type":998,"value":1675},{"type":993,"tag":1026,"props":1882,"children":1883},{"style":1058},[1884],{"type":998,"value":1142},{"type":993,"tag":1026,"props":1886,"children":1887},{"style":1124},[1888],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1890,"children":1891},{"style":1041},[1892],{"type":998,"value":1103},{"type":993,"tag":1497,"props":1894,"children":1896},{"id":1895},"immutability-vs-mutability-of-contents",[1897],{"type":998,"value":1898},"Immutability vs Mutability of Contents",{"type":993,"tag":1012,"props":1900,"children":1901},{},[1902],{"type":993,"tag":1016,"props":1903,"children":1905},{"className":1018,"code":1904,"language":6,"meta":8,"style":8},"# Tuple structure is immutable, but contents might be mutable\nnested_data = ([1, 2, 3], {\"name\": \"Alice\"}, \"text\")\n\nprint(f\"Original: {nested_data}\")\n\n# Can't change tuple structure\n# nested_data[0] = [4, 5, 6]  # This would fail\n\n# But can modify mutable contents\nnested_data[0].append(4)  # Modify the list inside\nnested_data[1][\"age\"] = 25  # Modify the dict inside\n\nprint(f\"After modifying contents: {nested_data}\")\nprint(\"Tuple structure unchanged, but contents modified\")\n",[1906],{"type":993,"tag":1022,"props":1907,"children":1908},{"__ignoreMap":8},[1909,1917,1988,1995,2036,2043,2051,2059,2066,2074,2104,2143,2150,2190],{"type":993,"tag":1026,"props":1910,"children":1911},{"class":1028,"line":12},[1912],{"type":993,"tag":1026,"props":1913,"children":1914},{"style":1032},[1915],{"type":998,"value":1916},"# Tuple structure is immutable, but contents might be mutable\n",{"type":993,"tag":1026,"props":1918,"children":1919},{"class":1028,"line":27},[1920,1925,1929,1934,1938,1942,1946,1950,1954,1959,1964,1969,1974,1979,1984],{"type":993,"tag":1026,"props":1921,"children":1922},{"style":1041},[1923],{"type":998,"value":1924},"nested_data ",{"type":993,"tag":1026,"props":1926,"children":1927},{"style":1047},[1928],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1930,"children":1931},{"style":1041},[1932],{"type":998,"value":1933}," ([",{"type":993,"tag":1026,"props":1935,"children":1936},{"style":1058},[1937],{"type":998,"value":1061},{"type":993,"tag":1026,"props":1939,"children":1940},{"style":1041},[1941],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1943,"children":1944},{"style":1058},[1945],{"type":998,"value":1071},{"type":993,"tag":1026,"props":1947,"children":1948},{"style":1041},[1949],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1951,"children":1952},{"style":1058},[1953],{"type":998,"value":1080},{"type":993,"tag":1026,"props":1955,"children":1956},{"style":1041},[1957],{"type":998,"value":1958},"], {",{"type":993,"tag":1026,"props":1960,"children":1961},{"style":1124},[1962],{"type":998,"value":1963},"\"name\"",{"type":993,"tag":1026,"props":1965,"children":1966},{"style":1041},[1967],{"type":998,"value":1968},": ",{"type":993,"tag":1026,"props":1970,"children":1971},{"style":1124},[1972],{"type":998,"value":1973},"\"Alice\"",{"type":993,"tag":1026,"props":1975,"children":1976},{"style":1041},[1977],{"type":998,"value":1978},"}, ",{"type":993,"tag":1026,"props":1980,"children":1981},{"style":1124},[1982],{"type":998,"value":1983},"\"text\"",{"type":993,"tag":1026,"props":1985,"children":1986},{"style":1041},[1987],{"type":998,"value":1103},{"type":993,"tag":1026,"props":1989,"children":1990},{"class":1028,"line":36},[1991],{"type":993,"tag":1026,"props":1992,"children":1993},{"emptyLinePlaceholder":13},[1994],{"type":998,"value":1159},{"type":993,"tag":1026,"props":1996,"children":1997},{"class":1028,"line":45},[1998,2002,2006,2010,2015,2019,2024,2028,2032],{"type":993,"tag":1026,"props":1999,"children":2000},{"style":1058},[2001],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2003,"children":2004},{"style":1041},[2005],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2007,"children":2008},{"style":1047},[2009],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2011,"children":2012},{"style":1124},[2013],{"type":998,"value":2014},"\"Original: ",{"type":993,"tag":1026,"props":2016,"children":2017},{"style":1058},[2018],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2020,"children":2021},{"style":1041},[2022],{"type":998,"value":2023},"nested_data",{"type":993,"tag":1026,"props":2025,"children":2026},{"style":1058},[2027],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2029,"children":2030},{"style":1124},[2031],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2033,"children":2034},{"style":1041},[2035],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2037,"children":2038},{"class":1028,"line":54},[2039],{"type":993,"tag":1026,"props":2040,"children":2041},{"emptyLinePlaceholder":13},[2042],{"type":998,"value":1159},{"type":993,"tag":1026,"props":2044,"children":2045},{"class":1028,"line":63},[2046],{"type":993,"tag":1026,"props":2047,"children":2048},{"style":1032},[2049],{"type":998,"value":2050},"# Can't change tuple structure\n",{"type":993,"tag":1026,"props":2052,"children":2053},{"class":1028,"line":72},[2054],{"type":993,"tag":1026,"props":2055,"children":2056},{"style":1032},[2057],{"type":998,"value":2058},"# nested_data[0] = [4, 5, 6]  # This would fail\n",{"type":993,"tag":1026,"props":2060,"children":2061},{"class":1028,"line":81},[2062],{"type":993,"tag":1026,"props":2063,"children":2064},{"emptyLinePlaceholder":13},[2065],{"type":998,"value":1159},{"type":993,"tag":1026,"props":2067,"children":2068},{"class":1028,"line":91},[2069],{"type":993,"tag":1026,"props":2070,"children":2071},{"style":1032},[2072],{"type":998,"value":2073},"# But can modify mutable contents\n",{"type":993,"tag":1026,"props":2075,"children":2076},{"class":1028,"line":100},[2077,2082,2086,2091,2095,2099],{"type":993,"tag":1026,"props":2078,"children":2079},{"style":1041},[2080],{"type":998,"value":2081},"nested_data[",{"type":993,"tag":1026,"props":2083,"children":2084},{"style":1058},[2085],{"type":998,"value":1604},{"type":993,"tag":1026,"props":2087,"children":2088},{"style":1041},[2089],{"type":998,"value":2090},"].append(",{"type":993,"tag":1026,"props":2092,"children":2093},{"style":1058},[2094],{"type":998,"value":1089},{"type":993,"tag":1026,"props":2096,"children":2097},{"style":1041},[2098],{"type":998,"value":1723},{"type":993,"tag":1026,"props":2100,"children":2101},{"style":1032},[2102],{"type":998,"value":2103},"# Modify the list inside\n",{"type":993,"tag":1026,"props":2105,"children":2106},{"class":1028,"line":109},[2107,2111,2115,2120,2125,2129,2133,2138],{"type":993,"tag":1026,"props":2108,"children":2109},{"style":1041},[2110],{"type":998,"value":2081},{"type":993,"tag":1026,"props":2112,"children":2113},{"style":1058},[2114],{"type":998,"value":1061},{"type":993,"tag":1026,"props":2116,"children":2117},{"style":1041},[2118],{"type":998,"value":2119},"][",{"type":993,"tag":1026,"props":2121,"children":2122},{"style":1124},[2123],{"type":998,"value":2124},"\"age\"",{"type":993,"tag":1026,"props":2126,"children":2127},{"style":1041},[2128],{"type":998,"value":1317},{"type":993,"tag":1026,"props":2130,"children":2131},{"style":1047},[2132],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2134,"children":2135},{"style":1058},[2136],{"type":998,"value":2137}," 25",{"type":993,"tag":1026,"props":2139,"children":2140},{"style":1032},[2141],{"type":998,"value":2142},"  # Modify the dict inside\n",{"type":993,"tag":1026,"props":2144,"children":2145},{"class":1028,"line":118},[2146],{"type":993,"tag":1026,"props":2147,"children":2148},{"emptyLinePlaceholder":13},[2149],{"type":998,"value":1159},{"type":993,"tag":1026,"props":2151,"children":2152},{"class":1028,"line":127},[2153,2157,2161,2165,2170,2174,2178,2182,2186],{"type":993,"tag":1026,"props":2154,"children":2155},{"style":1058},[2156],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2158,"children":2159},{"style":1041},[2160],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2162,"children":2163},{"style":1047},[2164],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2166,"children":2167},{"style":1124},[2168],{"type":998,"value":2169},"\"After modifying contents: ",{"type":993,"tag":1026,"props":2171,"children":2172},{"style":1058},[2173],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2175,"children":2176},{"style":1041},[2177],{"type":998,"value":2023},{"type":993,"tag":1026,"props":2179,"children":2180},{"style":1058},[2181],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2183,"children":2184},{"style":1124},[2185],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2187,"children":2188},{"style":1041},[2189],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2191,"children":2192},{"class":1028,"line":136},[2193,2197,2201,2206],{"type":993,"tag":1026,"props":2194,"children":2195},{"style":1058},[2196],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2198,"children":2199},{"style":1041},[2200],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2202,"children":2203},{"style":1124},[2204],{"type":998,"value":2205},"\"Tuple structure unchanged, but contents modified\"",{"type":993,"tag":1026,"props":2207,"children":2208},{"style":1041},[2209],{"type":998,"value":1103},{"type":993,"tag":1393,"props":2211,"children":2213},{"id":2212},"creating-modified-tuple-versions",[2214],{"type":998,"value":2215},"✨ Creating Modified Tuple Versions",{"type":993,"tag":1001,"props":2217,"children":2218},{},[2219],{"type":998,"value":2220},"Since you can't change tuples directly, you create new tuples with the desired modifications. This approach maintains immutability while providing flexibility.",{"type":993,"tag":1405,"props":2222,"children":2226},{"emoji":2223,"title":2224,"type":2225},"✨","Tuple Modification Strategies","success",[2227,2235,2282,2290,2313,2323],{"type":993,"tag":1001,"props":2228,"children":2229},{},[2230],{"type":993,"tag":1415,"props":2231,"children":2232},{},[2233],{"type":998,"value":2234},"Creation Techniques:",{"type":993,"tag":1421,"props":2236,"children":2237},{},[2238,2249,2260,2271],{"type":993,"tag":1425,"props":2239,"children":2240},{},[2241,2243],{"type":998,"value":2242},"Concatenation: ",{"type":993,"tag":1022,"props":2244,"children":2246},{"className":2245},[],[2247],{"type":998,"value":2248},"tuple1 + tuple2",{"type":993,"tag":1425,"props":2250,"children":2251},{},[2252,2254],{"type":998,"value":2253},"Slicing and rebuilding: ",{"type":993,"tag":1022,"props":2255,"children":2257},{"className":2256},[],[2258],{"type":998,"value":2259},"tuple[:i] + new_element + tuple[i+1:]",{"type":993,"tag":1425,"props":2261,"children":2262},{},[2263,2265],{"type":998,"value":2264},"List conversion: ",{"type":993,"tag":1022,"props":2266,"children":2268},{"className":2267},[],[2269],{"type":998,"value":2270},"tuple(list(original_tuple))",{"type":993,"tag":1425,"props":2272,"children":2273},{},[2274,2276],{"type":998,"value":2275},"Unpacking and repacking: ",{"type":993,"tag":1022,"props":2277,"children":2279},{"className":2278},[],[2280],{"type":998,"value":2281},"(*tuple1, new_item, *tuple2)",{"type":993,"tag":1001,"props":2283,"children":2284},{},[2285],{"type":993,"tag":1415,"props":2286,"children":2287},{},[2288],{"type":998,"value":2289},"Common Patterns:",{"type":993,"tag":1421,"props":2291,"children":2292},{},[2293,2298,2303,2308],{"type":993,"tag":1425,"props":2294,"children":2295},{},[2296],{"type":998,"value":2297},"Replace element: slice around target position",{"type":993,"tag":1425,"props":2299,"children":2300},{},[2301],{"type":998,"value":2302},"Add element: concatenate at desired position",{"type":993,"tag":1425,"props":2304,"children":2305},{},[2306],{"type":998,"value":2307},"Remove element: slice excluding target position",{"type":993,"tag":1425,"props":2309,"children":2310},{},[2311],{"type":998,"value":2312},"Multiple changes: convert to list, modify, convert back",{"type":993,"tag":1001,"props":2314,"children":2315},{},[2316,2321],{"type":993,"tag":1415,"props":2317,"children":2318},{},[2319],{"type":998,"value":2320},"Performance:",{"type":998,"value":2322}," Creating new tuples has memory overhead",{"type":993,"tag":1001,"props":2324,"children":2325},{},[2326,2331],{"type":993,"tag":1415,"props":2327,"children":2328},{},[2329],{"type":998,"value":2330},"Memory Management:",{"type":998,"value":2332}," Python optimizes small tuple creation",{"type":993,"tag":1497,"props":2334,"children":2336},{"id":2335},"element-replacement-techniques",[2337],{"type":998,"value":2338},"Element Replacement Techniques",{"type":993,"tag":1012,"props":2340,"children":2341},{},[2342],{"type":993,"tag":1016,"props":2343,"children":2345},{"className":1018,"code":2344,"language":6,"meta":8,"style":8},"# Replacing elements in tuples\noriginal = (\"apple\", \"banana\", \"cherry\", \"date\")\nprint(f\"Original: {original}\")\n\n# 1 Replace element at index\nnew_tuple = original[:1] + (\"orange\",) + original[2:]\nprint(f\"Replaced index 1: {new_tuple}\")\n\n# Replace multiple elements\nnewer_tuple = (\"grape\",) + original[1:3] + (\"fig\",)\nprint(f\"Multiple replacements: {newer_tuple}\")\n\n# Replace using unpacking (Python 3.5+)\nunpacked = (*original[:2], \"kiwi\", *original[3:])\nprint(f\"Using unpacking: {unpacked}\")\n",[2346],{"type":993,"tag":1022,"props":2347,"children":2348},{"__ignoreMap":8},[2349,2357,2408,2447,2454,2462,2519,2560,2567,2575,2643,2684,2691,2699,2761],{"type":993,"tag":1026,"props":2350,"children":2351},{"class":1028,"line":12},[2352],{"type":993,"tag":1026,"props":2353,"children":2354},{"style":1032},[2355],{"type":998,"value":2356},"# Replacing elements in tuples\n",{"type":993,"tag":1026,"props":2358,"children":2359},{"class":1028,"line":27},[2360,2364,2368,2372,2377,2381,2386,2390,2395,2399,2404],{"type":993,"tag":1026,"props":2361,"children":2362},{"style":1041},[2363],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2365,"children":2366},{"style":1047},[2367],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2369,"children":2370},{"style":1041},[2371],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2373,"children":2374},{"style":1124},[2375],{"type":998,"value":2376},"\"apple\"",{"type":993,"tag":1026,"props":2378,"children":2379},{"style":1041},[2380],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2382,"children":2383},{"style":1124},[2384],{"type":998,"value":2385},"\"banana\"",{"type":993,"tag":1026,"props":2387,"children":2388},{"style":1041},[2389],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2391,"children":2392},{"style":1124},[2393],{"type":998,"value":2394},"\"cherry\"",{"type":993,"tag":1026,"props":2396,"children":2397},{"style":1041},[2398],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2400,"children":2401},{"style":1124},[2402],{"type":998,"value":2403},"\"date\"",{"type":993,"tag":1026,"props":2405,"children":2406},{"style":1041},[2407],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2409,"children":2410},{"class":1028,"line":36},[2411,2415,2419,2423,2427,2431,2435,2439,2443],{"type":993,"tag":1026,"props":2412,"children":2413},{"style":1058},[2414],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2416,"children":2417},{"style":1041},[2418],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2420,"children":2421},{"style":1047},[2422],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2424,"children":2425},{"style":1124},[2426],{"type":998,"value":2014},{"type":993,"tag":1026,"props":2428,"children":2429},{"style":1058},[2430],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2432,"children":2433},{"style":1041},[2434],{"type":998,"value":1137},{"type":993,"tag":1026,"props":2436,"children":2437},{"style":1058},[2438],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2440,"children":2441},{"style":1124},[2442],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2444,"children":2445},{"style":1041},[2446],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2448,"children":2449},{"class":1028,"line":45},[2450],{"type":993,"tag":1026,"props":2451,"children":2452},{"emptyLinePlaceholder":13},[2453],{"type":998,"value":1159},{"type":993,"tag":1026,"props":2455,"children":2456},{"class":1028,"line":54},[2457],{"type":993,"tag":1026,"props":2458,"children":2459},{"style":1032},[2460],{"type":998,"value":2461},"# 1 Replace element at index\n",{"type":993,"tag":1026,"props":2463,"children":2464},{"class":1028,"line":63},[2465,2470,2474,2478,2482,2486,2490,2494,2499,2503,2507,2511,2515],{"type":993,"tag":1026,"props":2466,"children":2467},{"style":1041},[2468],{"type":998,"value":2469},"new_tuple ",{"type":993,"tag":1026,"props":2471,"children":2472},{"style":1047},[2473],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2475,"children":2476},{"style":1041},[2477],{"type":998,"value":1308},{"type":993,"tag":1026,"props":2479,"children":2480},{"style":1058},[2481],{"type":998,"value":1061},{"type":993,"tag":1026,"props":2483,"children":2484},{"style":1041},[2485],{"type":998,"value":1317},{"type":993,"tag":1026,"props":2487,"children":2488},{"style":1047},[2489],{"type":998,"value":1221},{"type":993,"tag":1026,"props":2491,"children":2492},{"style":1041},[2493],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2495,"children":2496},{"style":1124},[2497],{"type":998,"value":2498},"\"orange\"",{"type":993,"tag":1026,"props":2500,"children":2501},{"style":1041},[2502],{"type":998,"value":1216},{"type":993,"tag":1026,"props":2504,"children":2505},{"style":1047},[2506],{"type":998,"value":1221},{"type":993,"tag":1026,"props":2508,"children":2509},{"style":1041},[2510],{"type":998,"value":1226},{"type":993,"tag":1026,"props":2512,"children":2513},{"style":1058},[2514],{"type":998,"value":1071},{"type":993,"tag":1026,"props":2516,"children":2517},{"style":1041},[2518],{"type":998,"value":1235},{"type":993,"tag":1026,"props":2520,"children":2521},{"class":1028,"line":72},[2522,2526,2530,2534,2539,2543,2548,2552,2556],{"type":993,"tag":1026,"props":2523,"children":2524},{"style":1058},[2525],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2527,"children":2528},{"style":1041},[2529],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2531,"children":2532},{"style":1047},[2533],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2535,"children":2536},{"style":1124},[2537],{"type":998,"value":2538},"\"Replaced index 1: ",{"type":993,"tag":1026,"props":2540,"children":2541},{"style":1058},[2542],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2544,"children":2545},{"style":1041},[2546],{"type":998,"value":2547},"new_tuple",{"type":993,"tag":1026,"props":2549,"children":2550},{"style":1058},[2551],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2553,"children":2554},{"style":1124},[2555],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2557,"children":2558},{"style":1041},[2559],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2561,"children":2562},{"class":1028,"line":81},[2563],{"type":993,"tag":1026,"props":2564,"children":2565},{"emptyLinePlaceholder":13},[2566],{"type":998,"value":1159},{"type":993,"tag":1026,"props":2568,"children":2569},{"class":1028,"line":91},[2570],{"type":993,"tag":1026,"props":2571,"children":2572},{"style":1032},[2573],{"type":998,"value":2574},"# Replace multiple elements\n",{"type":993,"tag":1026,"props":2576,"children":2577},{"class":1028,"line":100},[2578,2583,2587,2591,2596,2600,2604,2608,2612,2617,2621,2625,2629,2633,2638],{"type":993,"tag":1026,"props":2579,"children":2580},{"style":1041},[2581],{"type":998,"value":2582},"newer_tuple ",{"type":993,"tag":1026,"props":2584,"children":2585},{"style":1047},[2586],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2588,"children":2589},{"style":1041},[2590],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2592,"children":2593},{"style":1124},[2594],{"type":998,"value":2595},"\"grape\"",{"type":993,"tag":1026,"props":2597,"children":2598},{"style":1041},[2599],{"type":998,"value":1216},{"type":993,"tag":1026,"props":2601,"children":2602},{"style":1047},[2603],{"type":998,"value":1221},{"type":993,"tag":1026,"props":2605,"children":2606},{"style":1041},[2607],{"type":998,"value":1226},{"type":993,"tag":1026,"props":2609,"children":2610},{"style":1058},[2611],{"type":998,"value":1061},{"type":993,"tag":1026,"props":2613,"children":2614},{"style":1041},[2615],{"type":998,"value":2616},":",{"type":993,"tag":1026,"props":2618,"children":2619},{"style":1058},[2620],{"type":998,"value":1080},{"type":993,"tag":1026,"props":2622,"children":2623},{"style":1041},[2624],{"type":998,"value":1317},{"type":993,"tag":1026,"props":2626,"children":2627},{"style":1047},[2628],{"type":998,"value":1221},{"type":993,"tag":1026,"props":2630,"children":2631},{"style":1041},[2632],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2634,"children":2635},{"style":1124},[2636],{"type":998,"value":2637},"\"fig\"",{"type":993,"tag":1026,"props":2639,"children":2640},{"style":1041},[2641],{"type":998,"value":2642},",)\n",{"type":993,"tag":1026,"props":2644,"children":2645},{"class":1028,"line":109},[2646,2650,2654,2658,2663,2667,2672,2676,2680],{"type":993,"tag":1026,"props":2647,"children":2648},{"style":1058},[2649],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2651,"children":2652},{"style":1041},[2653],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2655,"children":2656},{"style":1047},[2657],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2659,"children":2660},{"style":1124},[2661],{"type":998,"value":2662},"\"Multiple replacements: ",{"type":993,"tag":1026,"props":2664,"children":2665},{"style":1058},[2666],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2668,"children":2669},{"style":1041},[2670],{"type":998,"value":2671},"newer_tuple",{"type":993,"tag":1026,"props":2673,"children":2674},{"style":1058},[2675],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2677,"children":2678},{"style":1124},[2679],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2681,"children":2682},{"style":1041},[2683],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2685,"children":2686},{"class":1028,"line":118},[2687],{"type":993,"tag":1026,"props":2688,"children":2689},{"emptyLinePlaceholder":13},[2690],{"type":998,"value":1159},{"type":993,"tag":1026,"props":2692,"children":2693},{"class":1028,"line":127},[2694],{"type":993,"tag":1026,"props":2695,"children":2696},{"style":1032},[2697],{"type":998,"value":2698},"# Replace using unpacking (Python 3.5+)\n",{"type":993,"tag":1026,"props":2700,"children":2701},{"class":1028,"line":136},[2702,2707,2711,2715,2720,2725,2729,2734,2739,2743,2747,2752,2756],{"type":993,"tag":1026,"props":2703,"children":2704},{"style":1041},[2705],{"type":998,"value":2706},"unpacked ",{"type":993,"tag":1026,"props":2708,"children":2709},{"style":1047},[2710],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2712,"children":2713},{"style":1041},[2714],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2716,"children":2717},{"style":1047},[2718],{"type":998,"value":2719},"*",{"type":993,"tag":1026,"props":2721,"children":2722},{"style":1041},[2723],{"type":998,"value":2724},"original[:",{"type":993,"tag":1026,"props":2726,"children":2727},{"style":1058},[2728],{"type":998,"value":1071},{"type":993,"tag":1026,"props":2730,"children":2731},{"style":1041},[2732],{"type":998,"value":2733},"], ",{"type":993,"tag":1026,"props":2735,"children":2736},{"style":1124},[2737],{"type":998,"value":2738},"\"kiwi\"",{"type":993,"tag":1026,"props":2740,"children":2741},{"style":1041},[2742],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2744,"children":2745},{"style":1047},[2746],{"type":998,"value":2719},{"type":993,"tag":1026,"props":2748,"children":2749},{"style":1041},[2750],{"type":998,"value":2751},"original[",{"type":993,"tag":1026,"props":2753,"children":2754},{"style":1058},[2755],{"type":998,"value":1080},{"type":993,"tag":1026,"props":2757,"children":2758},{"style":1041},[2759],{"type":998,"value":2760},":])\n",{"type":993,"tag":1026,"props":2762,"children":2763},{"class":1028,"line":146},[2764,2768,2772,2776,2781,2785,2790,2794,2798],{"type":993,"tag":1026,"props":2765,"children":2766},{"style":1058},[2767],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2769,"children":2770},{"style":1041},[2771],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2773,"children":2774},{"style":1047},[2775],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2777,"children":2778},{"style":1124},[2779],{"type":998,"value":2780},"\"Using unpacking: ",{"type":993,"tag":1026,"props":2782,"children":2783},{"style":1058},[2784],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2786,"children":2787},{"style":1041},[2788],{"type":998,"value":2789},"unpacked",{"type":993,"tag":1026,"props":2791,"children":2792},{"style":1058},[2793],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2795,"children":2796},{"style":1124},[2797],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2799,"children":2800},{"style":1041},[2801],{"type":998,"value":1103},{"type":993,"tag":1497,"props":2803,"children":2805},{"id":2804},"element-addition-patterns",[2806],{"type":998,"value":2807},"Element Addition Patterns",{"type":993,"tag":1012,"props":2809,"children":2810},{},[2811],{"type":993,"tag":1016,"props":2812,"children":2814},{"className":1018,"code":2813,"language":6,"meta":8,"style":8},"# Adding elements to tuples\nnumbers = (1, 2, 4, 5)\nprint(f\"Original: {numbers}\")\n\n# Add at beginning\nwith_start = (0,) + numbers\nprint(f\"Added at start: {with_start}\")\n\n# Add at end\nwith_end = numbers + (6,)\nprint(f\"Added at end: {with_end}\")\n\n# Add in middle (insert 3 between 2 and 4)\nwith_middle = numbers[:2] + (3,) + numbers[2:]\nprint(f\"Added in middle: {with_middle}\")\n\n# Add multiple elements\nwith_multiple = numbers[:1] + (1.5, 1.7) + numbers[1:]\nprint(f\"Added multiple: {with_multiple}\")\n",[2815],{"type":993,"tag":1022,"props":2816,"children":2817},{"__ignoreMap":8},[2818,2826,2874,2914,2921,2929,2962,3003,3010,3018,3052,3093,3100,3108,3166,3207,3214,3222,3289],{"type":993,"tag":1026,"props":2819,"children":2820},{"class":1028,"line":12},[2821],{"type":993,"tag":1026,"props":2822,"children":2823},{"style":1032},[2824],{"type":998,"value":2825},"# Adding elements to tuples\n",{"type":993,"tag":1026,"props":2827,"children":2828},{"class":1028,"line":27},[2829,2834,2838,2842,2846,2850,2854,2858,2862,2866,2870],{"type":993,"tag":1026,"props":2830,"children":2831},{"style":1041},[2832],{"type":998,"value":2833},"numbers ",{"type":993,"tag":1026,"props":2835,"children":2836},{"style":1047},[2837],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2839,"children":2840},{"style":1041},[2841],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2843,"children":2844},{"style":1058},[2845],{"type":998,"value":1061},{"type":993,"tag":1026,"props":2847,"children":2848},{"style":1041},[2849],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2851,"children":2852},{"style":1058},[2853],{"type":998,"value":1071},{"type":993,"tag":1026,"props":2855,"children":2856},{"style":1041},[2857],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2859,"children":2860},{"style":1058},[2861],{"type":998,"value":1089},{"type":993,"tag":1026,"props":2863,"children":2864},{"style":1041},[2865],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2867,"children":2868},{"style":1058},[2869],{"type":998,"value":1098},{"type":993,"tag":1026,"props":2871,"children":2872},{"style":1041},[2873],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2875,"children":2876},{"class":1028,"line":36},[2877,2881,2885,2889,2893,2897,2902,2906,2910],{"type":993,"tag":1026,"props":2878,"children":2879},{"style":1058},[2880],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2882,"children":2883},{"style":1041},[2884],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2886,"children":2887},{"style":1047},[2888],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2890,"children":2891},{"style":1124},[2892],{"type":998,"value":2014},{"type":993,"tag":1026,"props":2894,"children":2895},{"style":1058},[2896],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2898,"children":2899},{"style":1041},[2900],{"type":998,"value":2901},"numbers",{"type":993,"tag":1026,"props":2903,"children":2904},{"style":1058},[2905],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2907,"children":2908},{"style":1124},[2909],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2911,"children":2912},{"style":1041},[2913],{"type":998,"value":1103},{"type":993,"tag":1026,"props":2915,"children":2916},{"class":1028,"line":45},[2917],{"type":993,"tag":1026,"props":2918,"children":2919},{"emptyLinePlaceholder":13},[2920],{"type":998,"value":1159},{"type":993,"tag":1026,"props":2922,"children":2923},{"class":1028,"line":54},[2924],{"type":993,"tag":1026,"props":2925,"children":2926},{"style":1032},[2927],{"type":998,"value":2928},"# Add at beginning\n",{"type":993,"tag":1026,"props":2930,"children":2931},{"class":1028,"line":63},[2932,2937,2941,2945,2949,2953,2957],{"type":993,"tag":1026,"props":2933,"children":2934},{"style":1041},[2935],{"type":998,"value":2936},"with_start ",{"type":993,"tag":1026,"props":2938,"children":2939},{"style":1047},[2940],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2942,"children":2943},{"style":1041},[2944],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2946,"children":2947},{"style":1058},[2948],{"type":998,"value":1604},{"type":993,"tag":1026,"props":2950,"children":2951},{"style":1041},[2952],{"type":998,"value":1216},{"type":993,"tag":1026,"props":2954,"children":2955},{"style":1047},[2956],{"type":998,"value":1221},{"type":993,"tag":1026,"props":2958,"children":2959},{"style":1041},[2960],{"type":998,"value":2961}," numbers\n",{"type":993,"tag":1026,"props":2963,"children":2964},{"class":1028,"line":72},[2965,2969,2973,2977,2982,2986,2991,2995,2999],{"type":993,"tag":1026,"props":2966,"children":2967},{"style":1058},[2968],{"type":998,"value":1111},{"type":993,"tag":1026,"props":2970,"children":2971},{"style":1041},[2972],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2974,"children":2975},{"style":1047},[2976],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2978,"children":2979},{"style":1124},[2980],{"type":998,"value":2981},"\"Added at start: ",{"type":993,"tag":1026,"props":2983,"children":2984},{"style":1058},[2985],{"type":998,"value":1132},{"type":993,"tag":1026,"props":2987,"children":2988},{"style":1041},[2989],{"type":998,"value":2990},"with_start",{"type":993,"tag":1026,"props":2992,"children":2993},{"style":1058},[2994],{"type":998,"value":1142},{"type":993,"tag":1026,"props":2996,"children":2997},{"style":1124},[2998],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3000,"children":3001},{"style":1041},[3002],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3004,"children":3005},{"class":1028,"line":81},[3006],{"type":993,"tag":1026,"props":3007,"children":3008},{"emptyLinePlaceholder":13},[3009],{"type":998,"value":1159},{"type":993,"tag":1026,"props":3011,"children":3012},{"class":1028,"line":91},[3013],{"type":993,"tag":1026,"props":3014,"children":3015},{"style":1032},[3016],{"type":998,"value":3017},"# Add at end\n",{"type":993,"tag":1026,"props":3019,"children":3020},{"class":1028,"line":100},[3021,3026,3030,3035,3039,3043,3048],{"type":993,"tag":1026,"props":3022,"children":3023},{"style":1041},[3024],{"type":998,"value":3025},"with_end ",{"type":993,"tag":1026,"props":3027,"children":3028},{"style":1047},[3029],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3031,"children":3032},{"style":1041},[3033],{"type":998,"value":3034}," numbers ",{"type":993,"tag":1026,"props":3036,"children":3037},{"style":1047},[3038],{"type":998,"value":1221},{"type":993,"tag":1026,"props":3040,"children":3041},{"style":1041},[3042],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3044,"children":3045},{"style":1058},[3046],{"type":998,"value":3047},"6",{"type":993,"tag":1026,"props":3049,"children":3050},{"style":1041},[3051],{"type":998,"value":2642},{"type":993,"tag":1026,"props":3053,"children":3054},{"class":1028,"line":109},[3055,3059,3063,3067,3072,3076,3081,3085,3089],{"type":993,"tag":1026,"props":3056,"children":3057},{"style":1058},[3058],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3060,"children":3061},{"style":1041},[3062],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3064,"children":3065},{"style":1047},[3066],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3068,"children":3069},{"style":1124},[3070],{"type":998,"value":3071},"\"Added at end: ",{"type":993,"tag":1026,"props":3073,"children":3074},{"style":1058},[3075],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3077,"children":3078},{"style":1041},[3079],{"type":998,"value":3080},"with_end",{"type":993,"tag":1026,"props":3082,"children":3083},{"style":1058},[3084],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3086,"children":3087},{"style":1124},[3088],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3090,"children":3091},{"style":1041},[3092],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3094,"children":3095},{"class":1028,"line":118},[3096],{"type":993,"tag":1026,"props":3097,"children":3098},{"emptyLinePlaceholder":13},[3099],{"type":998,"value":1159},{"type":993,"tag":1026,"props":3101,"children":3102},{"class":1028,"line":127},[3103],{"type":993,"tag":1026,"props":3104,"children":3105},{"style":1032},[3106],{"type":998,"value":3107},"# Add in middle (insert 3 between 2 and 4)\n",{"type":993,"tag":1026,"props":3109,"children":3110},{"class":1028,"line":136},[3111,3116,3120,3125,3129,3133,3137,3141,3145,3149,3153,3158,3162],{"type":993,"tag":1026,"props":3112,"children":3113},{"style":1041},[3114],{"type":998,"value":3115},"with_middle ",{"type":993,"tag":1026,"props":3117,"children":3118},{"style":1047},[3119],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3121,"children":3122},{"style":1041},[3123],{"type":998,"value":3124}," numbers[:",{"type":993,"tag":1026,"props":3126,"children":3127},{"style":1058},[3128],{"type":998,"value":1071},{"type":993,"tag":1026,"props":3130,"children":3131},{"style":1041},[3132],{"type":998,"value":1317},{"type":993,"tag":1026,"props":3134,"children":3135},{"style":1047},[3136],{"type":998,"value":1221},{"type":993,"tag":1026,"props":3138,"children":3139},{"style":1041},[3140],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3142,"children":3143},{"style":1058},[3144],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3146,"children":3147},{"style":1041},[3148],{"type":998,"value":1216},{"type":993,"tag":1026,"props":3150,"children":3151},{"style":1047},[3152],{"type":998,"value":1221},{"type":993,"tag":1026,"props":3154,"children":3155},{"style":1041},[3156],{"type":998,"value":3157}," numbers[",{"type":993,"tag":1026,"props":3159,"children":3160},{"style":1058},[3161],{"type":998,"value":1071},{"type":993,"tag":1026,"props":3163,"children":3164},{"style":1041},[3165],{"type":998,"value":1235},{"type":993,"tag":1026,"props":3167,"children":3168},{"class":1028,"line":146},[3169,3173,3177,3181,3186,3190,3195,3199,3203],{"type":993,"tag":1026,"props":3170,"children":3171},{"style":1058},[3172],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3174,"children":3175},{"style":1041},[3176],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3178,"children":3179},{"style":1047},[3180],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3182,"children":3183},{"style":1124},[3184],{"type":998,"value":3185},"\"Added in middle: ",{"type":993,"tag":1026,"props":3187,"children":3188},{"style":1058},[3189],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3191,"children":3192},{"style":1041},[3193],{"type":998,"value":3194},"with_middle",{"type":993,"tag":1026,"props":3196,"children":3197},{"style":1058},[3198],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3200,"children":3201},{"style":1124},[3202],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3204,"children":3205},{"style":1041},[3206],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3208,"children":3209},{"class":1028,"line":155},[3210],{"type":993,"tag":1026,"props":3211,"children":3212},{"emptyLinePlaceholder":13},[3213],{"type":998,"value":1159},{"type":993,"tag":1026,"props":3215,"children":3216},{"class":1028,"line":164},[3217],{"type":993,"tag":1026,"props":3218,"children":3219},{"style":1032},[3220],{"type":998,"value":3221},"# Add multiple elements\n",{"type":993,"tag":1026,"props":3223,"children":3224},{"class":1028,"line":173},[3225,3230,3234,3238,3242,3246,3250,3254,3259,3263,3268,3273,3277,3281,3285],{"type":993,"tag":1026,"props":3226,"children":3227},{"style":1041},[3228],{"type":998,"value":3229},"with_multiple ",{"type":993,"tag":1026,"props":3231,"children":3232},{"style":1047},[3233],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3235,"children":3236},{"style":1041},[3237],{"type":998,"value":3124},{"type":993,"tag":1026,"props":3239,"children":3240},{"style":1058},[3241],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3243,"children":3244},{"style":1041},[3245],{"type":998,"value":1317},{"type":993,"tag":1026,"props":3247,"children":3248},{"style":1047},[3249],{"type":998,"value":1221},{"type":993,"tag":1026,"props":3251,"children":3252},{"style":1041},[3253],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3255,"children":3256},{"style":1058},[3257],{"type":998,"value":3258},"1.5",{"type":993,"tag":1026,"props":3260,"children":3261},{"style":1041},[3262],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3264,"children":3265},{"style":1058},[3266],{"type":998,"value":3267},"1.7",{"type":993,"tag":1026,"props":3269,"children":3270},{"style":1041},[3271],{"type":998,"value":3272},") ",{"type":993,"tag":1026,"props":3274,"children":3275},{"style":1047},[3276],{"type":998,"value":1221},{"type":993,"tag":1026,"props":3278,"children":3279},{"style":1041},[3280],{"type":998,"value":3157},{"type":993,"tag":1026,"props":3282,"children":3283},{"style":1058},[3284],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3286,"children":3287},{"style":1041},[3288],{"type":998,"value":1235},{"type":993,"tag":1026,"props":3290,"children":3291},{"class":1028,"line":182},[3292,3296,3300,3304,3309,3313,3318,3322,3326],{"type":993,"tag":1026,"props":3293,"children":3294},{"style":1058},[3295],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3297,"children":3298},{"style":1041},[3299],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3301,"children":3302},{"style":1047},[3303],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3305,"children":3306},{"style":1124},[3307],{"type":998,"value":3308},"\"Added multiple: ",{"type":993,"tag":1026,"props":3310,"children":3311},{"style":1058},[3312],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3314,"children":3315},{"style":1041},[3316],{"type":998,"value":3317},"with_multiple",{"type":993,"tag":1026,"props":3319,"children":3320},{"style":1058},[3321],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3323,"children":3324},{"style":1124},[3325],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3327,"children":3328},{"style":1041},[3329],{"type":998,"value":1103},{"type":993,"tag":1497,"props":3331,"children":3333},{"id":3332},"element-removal-strategies",[3334],{"type":998,"value":3335},"Element Removal Strategies",{"type":993,"tag":1012,"props":3337,"children":3338},{},[3339],{"type":993,"tag":1016,"props":3340,"children":3342},{"className":1018,"code":3341,"language":6,"meta":8,"style":8},"# Removing elements from tuples\ndata = (\"a\", \"b\", \"c\", \"d\", \"e\")\nprint(f\"Original: {data}\")\n\n# Remove first element\nwithout_first = data[1:]\nprint(f\"Without first: {without_first}\")\n\n# Remove last element\nwithout_last = data[:-1]\nprint(f\"Without last: {without_last}\")\n\n# Remove middle element (index 2)\nwithout_middle = data[:2] + data[3:]\nprint(f\"Without middle: {without_middle}\")\n\n# Remove multiple elements\nwithout_multiple = data[:1] + data[3:]\nprint(f\"Without multiple: {without_multiple}\")\n",[3343],{"type":993,"tag":1022,"props":3344,"children":3345},{"__ignoreMap":8},[3346,3354,3415,3455,3462,3470,3495,3536,3543,3551,3582,3623,3630,3638,3678,3719,3726,3734,3774],{"type":993,"tag":1026,"props":3347,"children":3348},{"class":1028,"line":12},[3349],{"type":993,"tag":1026,"props":3350,"children":3351},{"style":1032},[3352],{"type":998,"value":3353},"# Removing elements from tuples\n",{"type":993,"tag":1026,"props":3355,"children":3356},{"class":1028,"line":27},[3357,3362,3366,3370,3375,3379,3384,3388,3393,3397,3402,3406,3411],{"type":993,"tag":1026,"props":3358,"children":3359},{"style":1041},[3360],{"type":998,"value":3361},"data ",{"type":993,"tag":1026,"props":3363,"children":3364},{"style":1047},[3365],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3367,"children":3368},{"style":1041},[3369],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3371,"children":3372},{"style":1124},[3373],{"type":998,"value":3374},"\"a\"",{"type":993,"tag":1026,"props":3376,"children":3377},{"style":1041},[3378],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3380,"children":3381},{"style":1124},[3382],{"type":998,"value":3383},"\"b\"",{"type":993,"tag":1026,"props":3385,"children":3386},{"style":1041},[3387],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3389,"children":3390},{"style":1124},[3391],{"type":998,"value":3392},"\"c\"",{"type":993,"tag":1026,"props":3394,"children":3395},{"style":1041},[3396],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3398,"children":3399},{"style":1124},[3400],{"type":998,"value":3401},"\"d\"",{"type":993,"tag":1026,"props":3403,"children":3404},{"style":1041},[3405],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3407,"children":3408},{"style":1124},[3409],{"type":998,"value":3410},"\"e\"",{"type":993,"tag":1026,"props":3412,"children":3413},{"style":1041},[3414],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3416,"children":3417},{"class":1028,"line":36},[3418,3422,3426,3430,3434,3438,3443,3447,3451],{"type":993,"tag":1026,"props":3419,"children":3420},{"style":1058},[3421],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3423,"children":3424},{"style":1041},[3425],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3427,"children":3428},{"style":1047},[3429],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3431,"children":3432},{"style":1124},[3433],{"type":998,"value":2014},{"type":993,"tag":1026,"props":3435,"children":3436},{"style":1058},[3437],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3439,"children":3440},{"style":1041},[3441],{"type":998,"value":3442},"data",{"type":993,"tag":1026,"props":3444,"children":3445},{"style":1058},[3446],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3448,"children":3449},{"style":1124},[3450],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3452,"children":3453},{"style":1041},[3454],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3456,"children":3457},{"class":1028,"line":45},[3458],{"type":993,"tag":1026,"props":3459,"children":3460},{"emptyLinePlaceholder":13},[3461],{"type":998,"value":1159},{"type":993,"tag":1026,"props":3463,"children":3464},{"class":1028,"line":54},[3465],{"type":993,"tag":1026,"props":3466,"children":3467},{"style":1032},[3468],{"type":998,"value":3469},"# Remove first element\n",{"type":993,"tag":1026,"props":3471,"children":3472},{"class":1028,"line":63},[3473,3478,3482,3487,3491],{"type":993,"tag":1026,"props":3474,"children":3475},{"style":1041},[3476],{"type":998,"value":3477},"without_first ",{"type":993,"tag":1026,"props":3479,"children":3480},{"style":1047},[3481],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3483,"children":3484},{"style":1041},[3485],{"type":998,"value":3486}," data[",{"type":993,"tag":1026,"props":3488,"children":3489},{"style":1058},[3490],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3492,"children":3493},{"style":1041},[3494],{"type":998,"value":1235},{"type":993,"tag":1026,"props":3496,"children":3497},{"class":1028,"line":72},[3498,3502,3506,3510,3515,3519,3524,3528,3532],{"type":993,"tag":1026,"props":3499,"children":3500},{"style":1058},[3501],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3503,"children":3504},{"style":1041},[3505],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3507,"children":3508},{"style":1047},[3509],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3511,"children":3512},{"style":1124},[3513],{"type":998,"value":3514},"\"Without first: ",{"type":993,"tag":1026,"props":3516,"children":3517},{"style":1058},[3518],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3520,"children":3521},{"style":1041},[3522],{"type":998,"value":3523},"without_first",{"type":993,"tag":1026,"props":3525,"children":3526},{"style":1058},[3527],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3529,"children":3530},{"style":1124},[3531],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3533,"children":3534},{"style":1041},[3535],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3537,"children":3538},{"class":1028,"line":81},[3539],{"type":993,"tag":1026,"props":3540,"children":3541},{"emptyLinePlaceholder":13},[3542],{"type":998,"value":1159},{"type":993,"tag":1026,"props":3544,"children":3545},{"class":1028,"line":91},[3546],{"type":993,"tag":1026,"props":3547,"children":3548},{"style":1032},[3549],{"type":998,"value":3550},"# Remove last element\n",{"type":993,"tag":1026,"props":3552,"children":3553},{"class":1028,"line":100},[3554,3559,3563,3568,3573,3577],{"type":993,"tag":1026,"props":3555,"children":3556},{"style":1041},[3557],{"type":998,"value":3558},"without_last ",{"type":993,"tag":1026,"props":3560,"children":3561},{"style":1047},[3562],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3564,"children":3565},{"style":1041},[3566],{"type":998,"value":3567}," data[:",{"type":993,"tag":1026,"props":3569,"children":3570},{"style":1047},[3571],{"type":998,"value":3572},"-",{"type":993,"tag":1026,"props":3574,"children":3575},{"style":1058},[3576],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3578,"children":3579},{"style":1041},[3580],{"type":998,"value":3581},"]\n",{"type":993,"tag":1026,"props":3583,"children":3584},{"class":1028,"line":109},[3585,3589,3593,3597,3602,3606,3611,3615,3619],{"type":993,"tag":1026,"props":3586,"children":3587},{"style":1058},[3588],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3590,"children":3591},{"style":1041},[3592],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3594,"children":3595},{"style":1047},[3596],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3598,"children":3599},{"style":1124},[3600],{"type":998,"value":3601},"\"Without last: ",{"type":993,"tag":1026,"props":3603,"children":3604},{"style":1058},[3605],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3607,"children":3608},{"style":1041},[3609],{"type":998,"value":3610},"without_last",{"type":993,"tag":1026,"props":3612,"children":3613},{"style":1058},[3614],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3616,"children":3617},{"style":1124},[3618],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3620,"children":3621},{"style":1041},[3622],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3624,"children":3625},{"class":1028,"line":118},[3626],{"type":993,"tag":1026,"props":3627,"children":3628},{"emptyLinePlaceholder":13},[3629],{"type":998,"value":1159},{"type":993,"tag":1026,"props":3631,"children":3632},{"class":1028,"line":127},[3633],{"type":993,"tag":1026,"props":3634,"children":3635},{"style":1032},[3636],{"type":998,"value":3637},"# Remove middle element (index 2)\n",{"type":993,"tag":1026,"props":3639,"children":3640},{"class":1028,"line":136},[3641,3646,3650,3654,3658,3662,3666,3670,3674],{"type":993,"tag":1026,"props":3642,"children":3643},{"style":1041},[3644],{"type":998,"value":3645},"without_middle ",{"type":993,"tag":1026,"props":3647,"children":3648},{"style":1047},[3649],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3651,"children":3652},{"style":1041},[3653],{"type":998,"value":3567},{"type":993,"tag":1026,"props":3655,"children":3656},{"style":1058},[3657],{"type":998,"value":1071},{"type":993,"tag":1026,"props":3659,"children":3660},{"style":1041},[3661],{"type":998,"value":1317},{"type":993,"tag":1026,"props":3663,"children":3664},{"style":1047},[3665],{"type":998,"value":1221},{"type":993,"tag":1026,"props":3667,"children":3668},{"style":1041},[3669],{"type":998,"value":3486},{"type":993,"tag":1026,"props":3671,"children":3672},{"style":1058},[3673],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3675,"children":3676},{"style":1041},[3677],{"type":998,"value":1235},{"type":993,"tag":1026,"props":3679,"children":3680},{"class":1028,"line":146},[3681,3685,3689,3693,3698,3702,3707,3711,3715],{"type":993,"tag":1026,"props":3682,"children":3683},{"style":1058},[3684],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3686,"children":3687},{"style":1041},[3688],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3690,"children":3691},{"style":1047},[3692],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3694,"children":3695},{"style":1124},[3696],{"type":998,"value":3697},"\"Without middle: ",{"type":993,"tag":1026,"props":3699,"children":3700},{"style":1058},[3701],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3703,"children":3704},{"style":1041},[3705],{"type":998,"value":3706},"without_middle",{"type":993,"tag":1026,"props":3708,"children":3709},{"style":1058},[3710],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3712,"children":3713},{"style":1124},[3714],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3716,"children":3717},{"style":1041},[3718],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3720,"children":3721},{"class":1028,"line":155},[3722],{"type":993,"tag":1026,"props":3723,"children":3724},{"emptyLinePlaceholder":13},[3725],{"type":998,"value":1159},{"type":993,"tag":1026,"props":3727,"children":3728},{"class":1028,"line":164},[3729],{"type":993,"tag":1026,"props":3730,"children":3731},{"style":1032},[3732],{"type":998,"value":3733},"# Remove multiple elements\n",{"type":993,"tag":1026,"props":3735,"children":3736},{"class":1028,"line":173},[3737,3742,3746,3750,3754,3758,3762,3766,3770],{"type":993,"tag":1026,"props":3738,"children":3739},{"style":1041},[3740],{"type":998,"value":3741},"without_multiple ",{"type":993,"tag":1026,"props":3743,"children":3744},{"style":1047},[3745],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3747,"children":3748},{"style":1041},[3749],{"type":998,"value":3567},{"type":993,"tag":1026,"props":3751,"children":3752},{"style":1058},[3753],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3755,"children":3756},{"style":1041},[3757],{"type":998,"value":1317},{"type":993,"tag":1026,"props":3759,"children":3760},{"style":1047},[3761],{"type":998,"value":1221},{"type":993,"tag":1026,"props":3763,"children":3764},{"style":1041},[3765],{"type":998,"value":3486},{"type":993,"tag":1026,"props":3767,"children":3768},{"style":1058},[3769],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3771,"children":3772},{"style":1041},[3773],{"type":998,"value":1235},{"type":993,"tag":1026,"props":3775,"children":3776},{"class":1028,"line":182},[3777,3781,3785,3789,3794,3798,3803,3807,3811],{"type":993,"tag":1026,"props":3778,"children":3779},{"style":1058},[3780],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3782,"children":3783},{"style":1041},[3784],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3786,"children":3787},{"style":1047},[3788],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3790,"children":3791},{"style":1124},[3792],{"type":998,"value":3793},"\"Without multiple: ",{"type":993,"tag":1026,"props":3795,"children":3796},{"style":1058},[3797],{"type":998,"value":1132},{"type":993,"tag":1026,"props":3799,"children":3800},{"style":1041},[3801],{"type":998,"value":3802},"without_multiple",{"type":993,"tag":1026,"props":3804,"children":3805},{"style":1058},[3806],{"type":998,"value":1142},{"type":993,"tag":1026,"props":3808,"children":3809},{"style":1124},[3810],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3812,"children":3813},{"style":1041},[3814],{"type":998,"value":1103},{"type":993,"tag":3816,"props":3817,"children":3819},"content-exercise",{":widget-view":3818,"category":6,"id":401},"true",[],{"type":993,"tag":1393,"props":3821,"children":3823},{"id":3822},"converting-between-lists-and-tuples",[3824],{"type":998,"value":3825},"🔄 Converting Between Lists and Tuples",{"type":993,"tag":1001,"props":3827,"children":3828},{},[3829],{"type":998,"value":3830},"The most flexible way to modify tuple-like data is converting to a list, making changes, then converting back to a tuple. This approach works well for complex modifications.",{"type":993,"tag":1405,"props":3832,"children":3836},{"emoji":3833,"title":3834,"type":3835},"🔄","List-Tuple Conversion Benefits","info",[3837,3845,3868,3876,3907,3917],{"type":993,"tag":1001,"props":3838,"children":3839},{},[3840],{"type":993,"tag":1415,"props":3841,"children":3842},{},[3843],{"type":998,"value":3844},"Conversion Advantages:",{"type":993,"tag":1421,"props":3846,"children":3847},{},[3848,3853,3858,3863],{"type":993,"tag":1425,"props":3849,"children":3850},{},[3851],{"type":998,"value":3852},"Full access to list modification methods",{"type":993,"tag":1425,"props":3854,"children":3855},{},[3856],{"type":998,"value":3857},"Complex operations become simple",{"type":993,"tag":1425,"props":3859,"children":3860},{},[3861],{"type":998,"value":3862},"Multiple changes in single conversion cycle",{"type":993,"tag":1425,"props":3864,"children":3865},{},[3866],{"type":998,"value":3867},"Familiar list manipulation patterns",{"type":993,"tag":1001,"props":3869,"children":3870},{},[3871],{"type":993,"tag":1415,"props":3872,"children":3873},{},[3874],{"type":998,"value":3875},"Conversion Process:",{"type":993,"tag":3877,"props":3878,"children":3879},"ol",{},[3880,3891,3896],{"type":993,"tag":1425,"props":3881,"children":3882},{},[3883,3885],{"type":998,"value":3884},"Convert tuple to list: ",{"type":993,"tag":1022,"props":3886,"children":3888},{"className":3887},[],[3889],{"type":998,"value":3890},"list(tuple)",{"type":993,"tag":1425,"props":3892,"children":3893},{},[3894],{"type":998,"value":3895},"Modify list using standard methods",{"type":993,"tag":1425,"props":3897,"children":3898},{},[3899,3901],{"type":998,"value":3900},"Convert back to tuple: ",{"type":993,"tag":1022,"props":3902,"children":3904},{"className":3903},[],[3905],{"type":998,"value":3906},"tuple(list)",{"type":993,"tag":1001,"props":3908,"children":3909},{},[3910,3915],{"type":993,"tag":1415,"props":3911,"children":3912},{},[3913],{"type":998,"value":3914},"Performance Consideration:",{"type":998,"value":3916}," Conversion has overhead for large data",{"type":993,"tag":1001,"props":3918,"children":3919},{},[3920,3925],{"type":993,"tag":1415,"props":3921,"children":3922},{},[3923],{"type":998,"value":3924},"Use Cases:",{"type":998,"value":3926}," Complex modifications, multiple changes, algorithmic operations",{"type":993,"tag":1497,"props":3928,"children":3930},{"id":3929},"basic-conversion-workflow",[3931],{"type":998,"value":3932},"Basic Conversion Workflow",{"type":993,"tag":1012,"props":3934,"children":3935},{},[3936],{"type":993,"tag":1016,"props":3937,"children":3939},{"className":1018,"code":3938,"language":6,"meta":8,"style":8},"# List-tuple conversion workflow\noriginal_tuple = (\"red\", \"green\", \"blue\")\nprint(f\"Original tuple: {original_tuple}\")\n\n# Convert to list for modification\ncolor_list = list(original_tuple)\nprint(f\"As list: {color_list}\")\n\n# Modify the list\ncolor_list.append(\"yellow\")\ncolor_list.insert(1, \"orange\")\ncolor_list.remove(\"blue\")\n\nprint(f\"Modified list: {color_list}\")\n\n# Convert back to tuple\nfinal_tuple = tuple(color_list)\nprint(f\"Final tuple: {final_tuple}\")\n",[3940],{"type":993,"tag":1022,"props":3941,"children":3942},{"__ignoreMap":8},[3943,3951,3991,4031,4038,4046,4068,4109,4116,4124,4141,4165,4181,4188,4228,4235,4243,4265],{"type":993,"tag":1026,"props":3944,"children":3945},{"class":1028,"line":12},[3946],{"type":993,"tag":1026,"props":3947,"children":3948},{"style":1032},[3949],{"type":998,"value":3950},"# List-tuple conversion workflow\n",{"type":993,"tag":1026,"props":3952,"children":3953},{"class":1028,"line":27},[3954,3959,3963,3967,3971,3975,3979,3983,3987],{"type":993,"tag":1026,"props":3955,"children":3956},{"style":1041},[3957],{"type":998,"value":3958},"original_tuple ",{"type":993,"tag":1026,"props":3960,"children":3961},{"style":1047},[3962],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3964,"children":3965},{"style":1041},[3966],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3968,"children":3969},{"style":1124},[3970],{"type":998,"value":1541},{"type":993,"tag":1026,"props":3972,"children":3973},{"style":1041},[3974],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3976,"children":3977},{"style":1124},[3978],{"type":998,"value":1550},{"type":993,"tag":1026,"props":3980,"children":3981},{"style":1041},[3982],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3984,"children":3985},{"style":1124},[3986],{"type":998,"value":1559},{"type":993,"tag":1026,"props":3988,"children":3989},{"style":1041},[3990],{"type":998,"value":1103},{"type":993,"tag":1026,"props":3992,"children":3993},{"class":1028,"line":36},[3994,3998,4002,4006,4010,4014,4019,4023,4027],{"type":993,"tag":1026,"props":3995,"children":3996},{"style":1058},[3997],{"type":998,"value":1111},{"type":993,"tag":1026,"props":3999,"children":4000},{"style":1041},[4001],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4003,"children":4004},{"style":1047},[4005],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4007,"children":4008},{"style":1124},[4009],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4011,"children":4012},{"style":1058},[4013],{"type":998,"value":1132},{"type":993,"tag":1026,"props":4015,"children":4016},{"style":1041},[4017],{"type":998,"value":4018},"original_tuple",{"type":993,"tag":1026,"props":4020,"children":4021},{"style":1058},[4022],{"type":998,"value":1142},{"type":993,"tag":1026,"props":4024,"children":4025},{"style":1124},[4026],{"type":998,"value":1147},{"type":993,"tag":1026,"props":4028,"children":4029},{"style":1041},[4030],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4032,"children":4033},{"class":1028,"line":45},[4034],{"type":993,"tag":1026,"props":4035,"children":4036},{"emptyLinePlaceholder":13},[4037],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4039,"children":4040},{"class":1028,"line":54},[4041],{"type":993,"tag":1026,"props":4042,"children":4043},{"style":1032},[4044],{"type":998,"value":4045},"# Convert to list for modification\n",{"type":993,"tag":1026,"props":4047,"children":4048},{"class":1028,"line":63},[4049,4054,4058,4063],{"type":993,"tag":1026,"props":4050,"children":4051},{"style":1041},[4052],{"type":998,"value":4053},"color_list ",{"type":993,"tag":1026,"props":4055,"children":4056},{"style":1047},[4057],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4059,"children":4060},{"style":1058},[4061],{"type":998,"value":4062}," list",{"type":993,"tag":1026,"props":4064,"children":4065},{"style":1041},[4066],{"type":998,"value":4067},"(original_tuple)\n",{"type":993,"tag":1026,"props":4069,"children":4070},{"class":1028,"line":72},[4071,4075,4079,4083,4088,4092,4097,4101,4105],{"type":993,"tag":1026,"props":4072,"children":4073},{"style":1058},[4074],{"type":998,"value":1111},{"type":993,"tag":1026,"props":4076,"children":4077},{"style":1041},[4078],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4080,"children":4081},{"style":1047},[4082],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4084,"children":4085},{"style":1124},[4086],{"type":998,"value":4087},"\"As list: ",{"type":993,"tag":1026,"props":4089,"children":4090},{"style":1058},[4091],{"type":998,"value":1132},{"type":993,"tag":1026,"props":4093,"children":4094},{"style":1041},[4095],{"type":998,"value":4096},"color_list",{"type":993,"tag":1026,"props":4098,"children":4099},{"style":1058},[4100],{"type":998,"value":1142},{"type":993,"tag":1026,"props":4102,"children":4103},{"style":1124},[4104],{"type":998,"value":1147},{"type":993,"tag":1026,"props":4106,"children":4107},{"style":1041},[4108],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4110,"children":4111},{"class":1028,"line":81},[4112],{"type":993,"tag":1026,"props":4113,"children":4114},{"emptyLinePlaceholder":13},[4115],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4117,"children":4118},{"class":1028,"line":91},[4119],{"type":993,"tag":1026,"props":4120,"children":4121},{"style":1032},[4122],{"type":998,"value":4123},"# Modify the list\n",{"type":993,"tag":1026,"props":4125,"children":4126},{"class":1028,"line":100},[4127,4132,4137],{"type":993,"tag":1026,"props":4128,"children":4129},{"style":1041},[4130],{"type":998,"value":4131},"color_list.append(",{"type":993,"tag":1026,"props":4133,"children":4134},{"style":1124},[4135],{"type":998,"value":4136},"\"yellow\"",{"type":993,"tag":1026,"props":4138,"children":4139},{"style":1041},[4140],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4142,"children":4143},{"class":1028,"line":109},[4144,4149,4153,4157,4161],{"type":993,"tag":1026,"props":4145,"children":4146},{"style":1041},[4147],{"type":998,"value":4148},"color_list.insert(",{"type":993,"tag":1026,"props":4150,"children":4151},{"style":1058},[4152],{"type":998,"value":1061},{"type":993,"tag":1026,"props":4154,"children":4155},{"style":1041},[4156],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4158,"children":4159},{"style":1124},[4160],{"type":998,"value":2498},{"type":993,"tag":1026,"props":4162,"children":4163},{"style":1041},[4164],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4166,"children":4167},{"class":1028,"line":118},[4168,4173,4177],{"type":993,"tag":1026,"props":4169,"children":4170},{"style":1041},[4171],{"type":998,"value":4172},"color_list.remove(",{"type":993,"tag":1026,"props":4174,"children":4175},{"style":1124},[4176],{"type":998,"value":1559},{"type":993,"tag":1026,"props":4178,"children":4179},{"style":1041},[4180],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4182,"children":4183},{"class":1028,"line":127},[4184],{"type":993,"tag":1026,"props":4185,"children":4186},{"emptyLinePlaceholder":13},[4187],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4189,"children":4190},{"class":1028,"line":136},[4191,4195,4199,4203,4208,4212,4216,4220,4224],{"type":993,"tag":1026,"props":4192,"children":4193},{"style":1058},[4194],{"type":998,"value":1111},{"type":993,"tag":1026,"props":4196,"children":4197},{"style":1041},[4198],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4200,"children":4201},{"style":1047},[4202],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4204,"children":4205},{"style":1124},[4206],{"type":998,"value":4207},"\"Modified list: ",{"type":993,"tag":1026,"props":4209,"children":4210},{"style":1058},[4211],{"type":998,"value":1132},{"type":993,"tag":1026,"props":4213,"children":4214},{"style":1041},[4215],{"type":998,"value":4096},{"type":993,"tag":1026,"props":4217,"children":4218},{"style":1058},[4219],{"type":998,"value":1142},{"type":993,"tag":1026,"props":4221,"children":4222},{"style":1124},[4223],{"type":998,"value":1147},{"type":993,"tag":1026,"props":4225,"children":4226},{"style":1041},[4227],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4229,"children":4230},{"class":1028,"line":146},[4231],{"type":993,"tag":1026,"props":4232,"children":4233},{"emptyLinePlaceholder":13},[4234],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4236,"children":4237},{"class":1028,"line":155},[4238],{"type":993,"tag":1026,"props":4239,"children":4240},{"style":1032},[4241],{"type":998,"value":4242},"# Convert back to tuple\n",{"type":993,"tag":1026,"props":4244,"children":4245},{"class":1028,"line":164},[4246,4251,4255,4260],{"type":993,"tag":1026,"props":4247,"children":4248},{"style":1041},[4249],{"type":998,"value":4250},"final_tuple ",{"type":993,"tag":1026,"props":4252,"children":4253},{"style":1047},[4254],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4256,"children":4257},{"style":1058},[4258],{"type":998,"value":4259}," tuple",{"type":993,"tag":1026,"props":4261,"children":4262},{"style":1041},[4263],{"type":998,"value":4264},"(color_list)\n",{"type":993,"tag":1026,"props":4266,"children":4267},{"class":1028,"line":173},[4268,4272,4276,4280,4285,4289,4294,4298,4302],{"type":993,"tag":1026,"props":4269,"children":4270},{"style":1058},[4271],{"type":998,"value":1111},{"type":993,"tag":1026,"props":4273,"children":4274},{"style":1041},[4275],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4277,"children":4278},{"style":1047},[4279],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4281,"children":4282},{"style":1124},[4283],{"type":998,"value":4284},"\"Final tuple: ",{"type":993,"tag":1026,"props":4286,"children":4287},{"style":1058},[4288],{"type":998,"value":1132},{"type":993,"tag":1026,"props":4290,"children":4291},{"style":1041},[4292],{"type":998,"value":4293},"final_tuple",{"type":993,"tag":1026,"props":4295,"children":4296},{"style":1058},[4297],{"type":998,"value":1142},{"type":993,"tag":1026,"props":4299,"children":4300},{"style":1124},[4301],{"type":998,"value":1147},{"type":993,"tag":1026,"props":4303,"children":4304},{"style":1041},[4305],{"type":998,"value":1103},{"type":993,"tag":1497,"props":4307,"children":4309},{"id":4308},"complex-modification-operations",[4310],{"type":998,"value":4311},"Complex Modification Operations",{"type":993,"tag":1012,"props":4313,"children":4314},{},[4315],{"type":993,"tag":1016,"props":4316,"children":4318},{"className":1018,"code":4317,"language":6,"meta":8,"style":8},"# Initial conversion and basic operations\nscores = (85, 92, 78, 96, 88, 91)\nprint(f\"Original scores: {scores}\")\n\n# Convert to list for operations\nscore_list = list(scores)\nscore_list.sort()  # Sort scores\nscore_list.append(95)  # Add new score\n\nprint(f\"After sorting and adding: {tuple(score_list)}\")\n",[4319],{"type":993,"tag":1022,"props":4320,"children":4321},{"__ignoreMap":8},[4322,4330,4400,4441,4448,4456,4477,4490,4512,4519],{"type":993,"tag":1026,"props":4323,"children":4324},{"class":1028,"line":12},[4325],{"type":993,"tag":1026,"props":4326,"children":4327},{"style":1032},[4328],{"type":998,"value":4329},"# Initial conversion and basic operations\n",{"type":993,"tag":1026,"props":4331,"children":4332},{"class":1028,"line":27},[4333,4338,4342,4346,4351,4355,4360,4364,4369,4373,4378,4382,4387,4391,4396],{"type":993,"tag":1026,"props":4334,"children":4335},{"style":1041},[4336],{"type":998,"value":4337},"scores ",{"type":993,"tag":1026,"props":4339,"children":4340},{"style":1047},[4341],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4343,"children":4344},{"style":1041},[4345],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4347,"children":4348},{"style":1058},[4349],{"type":998,"value":4350},"85",{"type":993,"tag":1026,"props":4352,"children":4353},{"style":1041},[4354],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4356,"children":4357},{"style":1058},[4358],{"type":998,"value":4359},"92",{"type":993,"tag":1026,"props":4361,"children":4362},{"style":1041},[4363],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4365,"children":4366},{"style":1058},[4367],{"type":998,"value":4368},"78",{"type":993,"tag":1026,"props":4370,"children":4371},{"style":1041},[4372],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4374,"children":4375},{"style":1058},[4376],{"type":998,"value":4377},"96",{"type":993,"tag":1026,"props":4379,"children":4380},{"style":1041},[4381],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4383,"children":4384},{"style":1058},[4385],{"type":998,"value":4386},"88",{"type":993,"tag":1026,"props":4388,"children":4389},{"style":1041},[4390],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4392,"children":4393},{"style":1058},[4394],{"type":998,"value":4395},"91",{"type":993,"tag":1026,"props":4397,"children":4398},{"style":1041},[4399],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4401,"children":4402},{"class":1028,"line":36},[4403,4407,4411,4415,4420,4424,4429,4433,4437],{"type":993,"tag":1026,"props":4404,"children":4405},{"style":1058},[4406],{"type":998,"value":1111},{"type":993,"tag":1026,"props":4408,"children":4409},{"style":1041},[4410],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4412,"children":4413},{"style":1047},[4414],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4416,"children":4417},{"style":1124},[4418],{"type":998,"value":4419},"\"Original scores: ",{"type":993,"tag":1026,"props":4421,"children":4422},{"style":1058},[4423],{"type":998,"value":1132},{"type":993,"tag":1026,"props":4425,"children":4426},{"style":1041},[4427],{"type":998,"value":4428},"scores",{"type":993,"tag":1026,"props":4430,"children":4431},{"style":1058},[4432],{"type":998,"value":1142},{"type":993,"tag":1026,"props":4434,"children":4435},{"style":1124},[4436],{"type":998,"value":1147},{"type":993,"tag":1026,"props":4438,"children":4439},{"style":1041},[4440],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4442,"children":4443},{"class":1028,"line":45},[4444],{"type":993,"tag":1026,"props":4445,"children":4446},{"emptyLinePlaceholder":13},[4447],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4449,"children":4450},{"class":1028,"line":54},[4451],{"type":993,"tag":1026,"props":4452,"children":4453},{"style":1032},[4454],{"type":998,"value":4455},"# Convert to list for operations\n",{"type":993,"tag":1026,"props":4457,"children":4458},{"class":1028,"line":63},[4459,4464,4468,4472],{"type":993,"tag":1026,"props":4460,"children":4461},{"style":1041},[4462],{"type":998,"value":4463},"score_list ",{"type":993,"tag":1026,"props":4465,"children":4466},{"style":1047},[4467],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4469,"children":4470},{"style":1058},[4471],{"type":998,"value":4062},{"type":993,"tag":1026,"props":4473,"children":4474},{"style":1041},[4475],{"type":998,"value":4476},"(scores)\n",{"type":993,"tag":1026,"props":4478,"children":4479},{"class":1028,"line":72},[4480,4485],{"type":993,"tag":1026,"props":4481,"children":4482},{"style":1041},[4483],{"type":998,"value":4484},"score_list.sort()  ",{"type":993,"tag":1026,"props":4486,"children":4487},{"style":1032},[4488],{"type":998,"value":4489},"# Sort scores\n",{"type":993,"tag":1026,"props":4491,"children":4492},{"class":1028,"line":81},[4493,4498,4503,4507],{"type":993,"tag":1026,"props":4494,"children":4495},{"style":1041},[4496],{"type":998,"value":4497},"score_list.append(",{"type":993,"tag":1026,"props":4499,"children":4500},{"style":1058},[4501],{"type":998,"value":4502},"95",{"type":993,"tag":1026,"props":4504,"children":4505},{"style":1041},[4506],{"type":998,"value":1723},{"type":993,"tag":1026,"props":4508,"children":4509},{"style":1032},[4510],{"type":998,"value":4511},"# Add new score\n",{"type":993,"tag":1026,"props":4513,"children":4514},{"class":1028,"line":91},[4515],{"type":993,"tag":1026,"props":4516,"children":4517},{"emptyLinePlaceholder":13},[4518],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4520,"children":4521},{"class":1028,"line":100},[4522,4526,4530,4534,4539,4544,4549,4553,4557],{"type":993,"tag":1026,"props":4523,"children":4524},{"style":1058},[4525],{"type":998,"value":1111},{"type":993,"tag":1026,"props":4527,"children":4528},{"style":1041},[4529],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4531,"children":4532},{"style":1047},[4533],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4535,"children":4536},{"style":1124},[4537],{"type":998,"value":4538},"\"After sorting and adding: ",{"type":993,"tag":1026,"props":4540,"children":4541},{"style":1058},[4542],{"type":998,"value":4543},"{tuple",{"type":993,"tag":1026,"props":4545,"children":4546},{"style":1041},[4547],{"type":998,"value":4548},"(score_list)",{"type":993,"tag":1026,"props":4550,"children":4551},{"style":1058},[4552],{"type":998,"value":1142},{"type":993,"tag":1026,"props":4554,"children":4555},{"style":1124},[4556],{"type":998,"value":1147},{"type":993,"tag":1026,"props":4558,"children":4559},{"style":1041},[4560],{"type":998,"value":1103},{"type":993,"tag":1497,"props":4562,"children":4564},{"id":4563},"batch-modifications",[4565],{"type":998,"value":4566},"Batch Modifications",{"type":993,"tag":1012,"props":4568,"children":4569},{},[4570],{"type":993,"tag":1016,"props":4571,"children":4573},{"className":1018,"code":4572,"language":6,"meta":8,"style":8},"# Multiple operations in sequence\nscores = (85, 92, 78, 96, 88, 91)\nscore_list = list(scores)\n\n# Add multiple scores and filter\nscore_list.extend([89, 93])  # Add multiple scores\nscore_list = [score for score in score_list if score >= 90]  # Keep high scores\n\nfinal_scores = tuple(score_list)\nprint(f\"High scores only: {final_scores}\")\n",[4574],{"type":993,"tag":1022,"props":4575,"children":4576},{"__ignoreMap":8},[4577,4585,4648,4667,4674,4682,4714,4778,4785,4806],{"type":993,"tag":1026,"props":4578,"children":4579},{"class":1028,"line":12},[4580],{"type":993,"tag":1026,"props":4581,"children":4582},{"style":1032},[4583],{"type":998,"value":4584},"# Multiple operations in sequence\n",{"type":993,"tag":1026,"props":4586,"children":4587},{"class":1028,"line":27},[4588,4592,4596,4600,4604,4608,4612,4616,4620,4624,4628,4632,4636,4640,4644],{"type":993,"tag":1026,"props":4589,"children":4590},{"style":1041},[4591],{"type":998,"value":4337},{"type":993,"tag":1026,"props":4593,"children":4594},{"style":1047},[4595],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4597,"children":4598},{"style":1041},[4599],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4601,"children":4602},{"style":1058},[4603],{"type":998,"value":4350},{"type":993,"tag":1026,"props":4605,"children":4606},{"style":1041},[4607],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4609,"children":4610},{"style":1058},[4611],{"type":998,"value":4359},{"type":993,"tag":1026,"props":4613,"children":4614},{"style":1041},[4615],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4617,"children":4618},{"style":1058},[4619],{"type":998,"value":4368},{"type":993,"tag":1026,"props":4621,"children":4622},{"style":1041},[4623],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4625,"children":4626},{"style":1058},[4627],{"type":998,"value":4377},{"type":993,"tag":1026,"props":4629,"children":4630},{"style":1041},[4631],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4633,"children":4634},{"style":1058},[4635],{"type":998,"value":4386},{"type":993,"tag":1026,"props":4637,"children":4638},{"style":1041},[4639],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4641,"children":4642},{"style":1058},[4643],{"type":998,"value":4395},{"type":993,"tag":1026,"props":4645,"children":4646},{"style":1041},[4647],{"type":998,"value":1103},{"type":993,"tag":1026,"props":4649,"children":4650},{"class":1028,"line":36},[4651,4655,4659,4663],{"type":993,"tag":1026,"props":4652,"children":4653},{"style":1041},[4654],{"type":998,"value":4463},{"type":993,"tag":1026,"props":4656,"children":4657},{"style":1047},[4658],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4660,"children":4661},{"style":1058},[4662],{"type":998,"value":4062},{"type":993,"tag":1026,"props":4664,"children":4665},{"style":1041},[4666],{"type":998,"value":4476},{"type":993,"tag":1026,"props":4668,"children":4669},{"class":1028,"line":45},[4670],{"type":993,"tag":1026,"props":4671,"children":4672},{"emptyLinePlaceholder":13},[4673],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4675,"children":4676},{"class":1028,"line":54},[4677],{"type":993,"tag":1026,"props":4678,"children":4679},{"style":1032},[4680],{"type":998,"value":4681},"# Add multiple scores and filter\n",{"type":993,"tag":1026,"props":4683,"children":4684},{"class":1028,"line":63},[4685,4690,4695,4699,4704,4709],{"type":993,"tag":1026,"props":4686,"children":4687},{"style":1041},[4688],{"type":998,"value":4689},"score_list.extend([",{"type":993,"tag":1026,"props":4691,"children":4692},{"style":1058},[4693],{"type":998,"value":4694},"89",{"type":993,"tag":1026,"props":4696,"children":4697},{"style":1041},[4698],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4700,"children":4701},{"style":1058},[4702],{"type":998,"value":4703},"93",{"type":993,"tag":1026,"props":4705,"children":4706},{"style":1041},[4707],{"type":998,"value":4708},"])  ",{"type":993,"tag":1026,"props":4710,"children":4711},{"style":1032},[4712],{"type":998,"value":4713},"# Add multiple scores\n",{"type":993,"tag":1026,"props":4715,"children":4716},{"class":1028,"line":72},[4717,4721,4725,4730,4735,4740,4745,4750,4755,4759,4764,4769,4773],{"type":993,"tag":1026,"props":4718,"children":4719},{"style":1041},[4720],{"type":998,"value":4463},{"type":993,"tag":1026,"props":4722,"children":4723},{"style":1047},[4724],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4726,"children":4727},{"style":1041},[4728],{"type":998,"value":4729}," [score ",{"type":993,"tag":1026,"props":4731,"children":4732},{"style":1047},[4733],{"type":998,"value":4734},"for",{"type":993,"tag":1026,"props":4736,"children":4737},{"style":1041},[4738],{"type":998,"value":4739}," score ",{"type":993,"tag":1026,"props":4741,"children":4742},{"style":1047},[4743],{"type":998,"value":4744},"in",{"type":993,"tag":1026,"props":4746,"children":4747},{"style":1041},[4748],{"type":998,"value":4749}," score_list ",{"type":993,"tag":1026,"props":4751,"children":4752},{"style":1047},[4753],{"type":998,"value":4754},"if",{"type":993,"tag":1026,"props":4756,"children":4757},{"style":1041},[4758],{"type":998,"value":4739},{"type":993,"tag":1026,"props":4760,"children":4761},{"style":1047},[4762],{"type":998,"value":4763},">=",{"type":993,"tag":1026,"props":4765,"children":4766},{"style":1058},[4767],{"type":998,"value":4768}," 90",{"type":993,"tag":1026,"props":4770,"children":4771},{"style":1041},[4772],{"type":998,"value":1828},{"type":993,"tag":1026,"props":4774,"children":4775},{"style":1032},[4776],{"type":998,"value":4777},"# Keep high scores\n",{"type":993,"tag":1026,"props":4779,"children":4780},{"class":1028,"line":81},[4781],{"type":993,"tag":1026,"props":4782,"children":4783},{"emptyLinePlaceholder":13},[4784],{"type":998,"value":1159},{"type":993,"tag":1026,"props":4786,"children":4787},{"class":1028,"line":91},[4788,4793,4797,4801],{"type":993,"tag":1026,"props":4789,"children":4790},{"style":1041},[4791],{"type":998,"value":4792},"final_scores ",{"type":993,"tag":1026,"props":4794,"children":4795},{"style":1047},[4796],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4798,"children":4799},{"style":1058},[4800],{"type":998,"value":4259},{"type":993,"tag":1026,"props":4802,"children":4803},{"style":1041},[4804],{"type":998,"value":4805},"(score_list)\n",{"type":993,"tag":1026,"props":4807,"children":4808},{"class":1028,"line":100},[4809,4813,4817,4821,4826,4830,4835,4839,4843],{"type":993,"tag":1026,"props":4810,"children":4811},{"style":1058},[4812],{"type":998,"value":1111},{"type":993,"tag":1026,"props":4814,"children":4815},{"style":1041},[4816],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4818,"children":4819},{"style":1047},[4820],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4822,"children":4823},{"style":1124},[4824],{"type":998,"value":4825},"\"High scores only: ",{"type":993,"tag":1026,"props":4827,"children":4828},{"style":1058},[4829],{"type":998,"value":1132},{"type":993,"tag":1026,"props":4831,"children":4832},{"style":1041},[4833],{"type":998,"value":4834},"final_scores",{"type":993,"tag":1026,"props":4836,"children":4837},{"style":1058},[4838],{"type":998,"value":1142},{"type":993,"tag":1026,"props":4840,"children":4841},{"style":1124},[4842],{"type":998,"value":1147},{"type":993,"tag":1026,"props":4844,"children":4845},{"style":1041},[4846],{"type":998,"value":1103},{"type":993,"tag":1393,"props":4848,"children":4850},{"id":4849},"working-with-nested-mutable-objects",[4851],{"type":998,"value":4852},"🪆 Working with Nested Mutable Objects",{"type":993,"tag":1001,"props":4854,"children":4855},{},[4856],{"type":998,"value":4857},"When tuples contain mutable objects like lists or dictionaries, you can modify those objects while keeping the tuple structure intact. This provides a middle ground between full immutability and complete mutability.",{"type":993,"tag":1405,"props":4859,"children":4862},{"emoji":4860,"title":4861,"type":1409},"🪆","Nested Mutability Considerations",[4863,4871,4894,4901,4924,4934],{"type":993,"tag":1001,"props":4864,"children":4865},{},[4866],{"type":993,"tag":1415,"props":4867,"children":4868},{},[4869],{"type":998,"value":4870},"Mutable Contents:",{"type":993,"tag":1421,"props":4872,"children":4873},{},[4874,4879,4884,4889],{"type":993,"tag":1425,"props":4875,"children":4876},{},[4877],{"type":998,"value":4878},"Lists, dictionaries, sets inside tuples can be modified",{"type":993,"tag":1425,"props":4880,"children":4881},{},[4882],{"type":998,"value":4883},"Tuple structure remains immutable",{"type":993,"tag":1425,"props":4885,"children":4886},{},[4887],{"type":998,"value":4888},"Object references cannot be changed",{"type":993,"tag":1425,"props":4890,"children":4891},{},[4892],{"type":998,"value":4893},"Useful for structured data with changeable fields",{"type":993,"tag":1001,"props":4895,"children":4896},{},[4897],{"type":993,"tag":1415,"props":4898,"children":4899},{},[4900],{"type":998,"value":2289},{"type":993,"tag":1421,"props":4902,"children":4903},{},[4904,4909,4914,4919],{"type":993,"tag":1425,"props":4905,"children":4906},{},[4907],{"type":998,"value":4908},"Configuration tuples with mutable settings",{"type":993,"tag":1425,"props":4910,"children":4911},{},[4912],{"type":998,"value":4913},"Coordinate tuples with mutable metadata",{"type":993,"tag":1425,"props":4915,"children":4916},{},[4917],{"type":998,"value":4918},"Record tuples with changeable attributes",{"type":993,"tag":1425,"props":4920,"children":4921},{},[4922],{"type":998,"value":4923},"Nested data structures",{"type":993,"tag":1001,"props":4925,"children":4926},{},[4927,4932],{"type":993,"tag":1415,"props":4928,"children":4929},{},[4930],{"type":998,"value":4931},"Caution:",{"type":998,"value":4933}," Modifying nested objects affects all references",{"type":993,"tag":1001,"props":4935,"children":4936},{},[4937,4942],{"type":993,"tag":1415,"props":4938,"children":4939},{},[4940],{"type":998,"value":4941},"Design Choice:",{"type":998,"value":4943}," Consider if this hybrid approach fits your needs",{"type":993,"tag":1497,"props":4945,"children":4947},{"id":4946},"modifying-nested-lists",[4948],{"type":998,"value":4949},"Modifying Nested Lists",{"type":993,"tag":1012,"props":4951,"children":4952},{},[4953],{"type":993,"tag":1016,"props":4954,"children":4956},{"className":1018,"code":4955,"language":6,"meta":8,"style":8},"# Setup: Tuples with mutable nested objects\nstudent_records = (\n    (\"Alice\", [85, 92, 78]),\n    (\"Bob\", [90, 88, 95]),\n    (\"Carol\", [87, 91, 89])\n)\n\nprint(\"Original records:\")\nfor name, grades in student_records:\n    print(f\"{name}: {grades}\")\n\n# Various list modifications\nstudent_records[0][1].append(94)  # Add grade for Alice\nstudent_records[1][1][0] = 92     # Change Bob's first grade\nstudent_records[2][1].sort()      # Sort Carol's grades\n\nprint(\"\\nAfter modifications:\")\nfor name, grades in student_records:\n    print(f\"{name}: {grades}\")\n",[4957],{"type":993,"tag":1022,"props":4958,"children":4959},{"__ignoreMap":8},[4960,4968,4985,5027,5068,5110,5117,5124,5144,5165,5222,5229,5237,5275,5320,5349,5356,5385,5404],{"type":993,"tag":1026,"props":4961,"children":4962},{"class":1028,"line":12},[4963],{"type":993,"tag":1026,"props":4964,"children":4965},{"style":1032},[4966],{"type":998,"value":4967},"# Setup: Tuples with mutable nested objects\n",{"type":993,"tag":1026,"props":4969,"children":4970},{"class":1028,"line":27},[4971,4976,4980],{"type":993,"tag":1026,"props":4972,"children":4973},{"style":1041},[4974],{"type":998,"value":4975},"student_records ",{"type":993,"tag":1026,"props":4977,"children":4978},{"style":1047},[4979],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4981,"children":4982},{"style":1041},[4983],{"type":998,"value":4984}," (\n",{"type":993,"tag":1026,"props":4986,"children":4987},{"class":1028,"line":36},[4988,4993,4997,5002,5006,5010,5014,5018,5022],{"type":993,"tag":1026,"props":4989,"children":4990},{"style":1041},[4991],{"type":998,"value":4992},"    (",{"type":993,"tag":1026,"props":4994,"children":4995},{"style":1124},[4996],{"type":998,"value":1973},{"type":993,"tag":1026,"props":4998,"children":4999},{"style":1041},[5000],{"type":998,"value":5001},", [",{"type":993,"tag":1026,"props":5003,"children":5004},{"style":1058},[5005],{"type":998,"value":4350},{"type":993,"tag":1026,"props":5007,"children":5008},{"style":1041},[5009],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5011,"children":5012},{"style":1058},[5013],{"type":998,"value":4359},{"type":993,"tag":1026,"props":5015,"children":5016},{"style":1041},[5017],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5019,"children":5020},{"style":1058},[5021],{"type":998,"value":4368},{"type":993,"tag":1026,"props":5023,"children":5024},{"style":1041},[5025],{"type":998,"value":5026},"]),\n",{"type":993,"tag":1026,"props":5028,"children":5029},{"class":1028,"line":45},[5030,5034,5039,5043,5048,5052,5056,5060,5064],{"type":993,"tag":1026,"props":5031,"children":5032},{"style":1041},[5033],{"type":998,"value":4992},{"type":993,"tag":1026,"props":5035,"children":5036},{"style":1124},[5037],{"type":998,"value":5038},"\"Bob\"",{"type":993,"tag":1026,"props":5040,"children":5041},{"style":1041},[5042],{"type":998,"value":5001},{"type":993,"tag":1026,"props":5044,"children":5045},{"style":1058},[5046],{"type":998,"value":5047},"90",{"type":993,"tag":1026,"props":5049,"children":5050},{"style":1041},[5051],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5053,"children":5054},{"style":1058},[5055],{"type":998,"value":4386},{"type":993,"tag":1026,"props":5057,"children":5058},{"style":1041},[5059],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5061,"children":5062},{"style":1058},[5063],{"type":998,"value":4502},{"type":993,"tag":1026,"props":5065,"children":5066},{"style":1041},[5067],{"type":998,"value":5026},{"type":993,"tag":1026,"props":5069,"children":5070},{"class":1028,"line":54},[5071,5075,5080,5084,5089,5093,5097,5101,5105],{"type":993,"tag":1026,"props":5072,"children":5073},{"style":1041},[5074],{"type":998,"value":4992},{"type":993,"tag":1026,"props":5076,"children":5077},{"style":1124},[5078],{"type":998,"value":5079},"\"Carol\"",{"type":993,"tag":1026,"props":5081,"children":5082},{"style":1041},[5083],{"type":998,"value":5001},{"type":993,"tag":1026,"props":5085,"children":5086},{"style":1058},[5087],{"type":998,"value":5088},"87",{"type":993,"tag":1026,"props":5090,"children":5091},{"style":1041},[5092],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5094,"children":5095},{"style":1058},[5096],{"type":998,"value":4395},{"type":993,"tag":1026,"props":5098,"children":5099},{"style":1041},[5100],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5102,"children":5103},{"style":1058},[5104],{"type":998,"value":4694},{"type":993,"tag":1026,"props":5106,"children":5107},{"style":1041},[5108],{"type":998,"value":5109},"])\n",{"type":993,"tag":1026,"props":5111,"children":5112},{"class":1028,"line":63},[5113],{"type":993,"tag":1026,"props":5114,"children":5115},{"style":1041},[5116],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5118,"children":5119},{"class":1028,"line":72},[5120],{"type":993,"tag":1026,"props":5121,"children":5122},{"emptyLinePlaceholder":13},[5123],{"type":998,"value":1159},{"type":993,"tag":1026,"props":5125,"children":5126},{"class":1028,"line":81},[5127,5131,5135,5140],{"type":993,"tag":1026,"props":5128,"children":5129},{"style":1058},[5130],{"type":998,"value":1111},{"type":993,"tag":1026,"props":5132,"children":5133},{"style":1041},[5134],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5136,"children":5137},{"style":1124},[5138],{"type":998,"value":5139},"\"Original records:\"",{"type":993,"tag":1026,"props":5141,"children":5142},{"style":1041},[5143],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5145,"children":5146},{"class":1028,"line":91},[5147,5151,5156,5160],{"type":993,"tag":1026,"props":5148,"children":5149},{"style":1047},[5150],{"type":998,"value":4734},{"type":993,"tag":1026,"props":5152,"children":5153},{"style":1041},[5154],{"type":998,"value":5155}," name, grades ",{"type":993,"tag":1026,"props":5157,"children":5158},{"style":1047},[5159],{"type":998,"value":4744},{"type":993,"tag":1026,"props":5161,"children":5162},{"style":1041},[5163],{"type":998,"value":5164}," student_records:\n",{"type":993,"tag":1026,"props":5166,"children":5167},{"class":1028,"line":100},[5168,5172,5176,5180,5184,5188,5193,5197,5201,5205,5210,5214,5218],{"type":993,"tag":1026,"props":5169,"children":5170},{"style":1058},[5171],{"type":998,"value":1653},{"type":993,"tag":1026,"props":5173,"children":5174},{"style":1041},[5175],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5177,"children":5178},{"style":1047},[5179],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5181,"children":5182},{"style":1124},[5183],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5185,"children":5186},{"style":1058},[5187],{"type":998,"value":1132},{"type":993,"tag":1026,"props":5189,"children":5190},{"style":1041},[5191],{"type":998,"value":5192},"name",{"type":993,"tag":1026,"props":5194,"children":5195},{"style":1058},[5196],{"type":998,"value":1142},{"type":993,"tag":1026,"props":5198,"children":5199},{"style":1124},[5200],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5202,"children":5203},{"style":1058},[5204],{"type":998,"value":1132},{"type":993,"tag":1026,"props":5206,"children":5207},{"style":1041},[5208],{"type":998,"value":5209},"grades",{"type":993,"tag":1026,"props":5211,"children":5212},{"style":1058},[5213],{"type":998,"value":1142},{"type":993,"tag":1026,"props":5215,"children":5216},{"style":1124},[5217],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5219,"children":5220},{"style":1041},[5221],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5223,"children":5224},{"class":1028,"line":109},[5225],{"type":993,"tag":1026,"props":5226,"children":5227},{"emptyLinePlaceholder":13},[5228],{"type":998,"value":1159},{"type":993,"tag":1026,"props":5230,"children":5231},{"class":1028,"line":118},[5232],{"type":993,"tag":1026,"props":5233,"children":5234},{"style":1032},[5235],{"type":998,"value":5236},"# Various list modifications\n",{"type":993,"tag":1026,"props":5238,"children":5239},{"class":1028,"line":127},[5240,5245,5249,5253,5257,5261,5266,5270],{"type":993,"tag":1026,"props":5241,"children":5242},{"style":1041},[5243],{"type":998,"value":5244},"student_records[",{"type":993,"tag":1026,"props":5246,"children":5247},{"style":1058},[5248],{"type":998,"value":1604},{"type":993,"tag":1026,"props":5250,"children":5251},{"style":1041},[5252],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5254,"children":5255},{"style":1058},[5256],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5258,"children":5259},{"style":1041},[5260],{"type":998,"value":2090},{"type":993,"tag":1026,"props":5262,"children":5263},{"style":1058},[5264],{"type":998,"value":5265},"94",{"type":993,"tag":1026,"props":5267,"children":5268},{"style":1041},[5269],{"type":998,"value":1723},{"type":993,"tag":1026,"props":5271,"children":5272},{"style":1032},[5273],{"type":998,"value":5274},"# Add grade for Alice\n",{"type":993,"tag":1026,"props":5276,"children":5277},{"class":1028,"line":136},[5278,5282,5286,5290,5294,5298,5302,5306,5310,5315],{"type":993,"tag":1026,"props":5279,"children":5280},{"style":1041},[5281],{"type":998,"value":5244},{"type":993,"tag":1026,"props":5283,"children":5284},{"style":1058},[5285],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5287,"children":5288},{"style":1041},[5289],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5291,"children":5292},{"style":1058},[5293],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5295,"children":5296},{"style":1041},[5297],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5299,"children":5300},{"style":1058},[5301],{"type":998,"value":1604},{"type":993,"tag":1026,"props":5303,"children":5304},{"style":1041},[5305],{"type":998,"value":1317},{"type":993,"tag":1026,"props":5307,"children":5308},{"style":1047},[5309],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5311,"children":5312},{"style":1058},[5313],{"type":998,"value":5314}," 92",{"type":993,"tag":1026,"props":5316,"children":5317},{"style":1032},[5318],{"type":998,"value":5319},"     # Change Bob's first grade\n",{"type":993,"tag":1026,"props":5321,"children":5322},{"class":1028,"line":146},[5323,5327,5331,5335,5339,5344],{"type":993,"tag":1026,"props":5324,"children":5325},{"style":1041},[5326],{"type":998,"value":5244},{"type":993,"tag":1026,"props":5328,"children":5329},{"style":1058},[5330],{"type":998,"value":1071},{"type":993,"tag":1026,"props":5332,"children":5333},{"style":1041},[5334],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5336,"children":5337},{"style":1058},[5338],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5340,"children":5341},{"style":1041},[5342],{"type":998,"value":5343},"].sort()      ",{"type":993,"tag":1026,"props":5345,"children":5346},{"style":1032},[5347],{"type":998,"value":5348},"# Sort Carol's grades\n",{"type":993,"tag":1026,"props":5350,"children":5351},{"class":1028,"line":155},[5352],{"type":993,"tag":1026,"props":5353,"children":5354},{"emptyLinePlaceholder":13},[5355],{"type":998,"value":1159},{"type":993,"tag":1026,"props":5357,"children":5358},{"class":1028,"line":164},[5359,5363,5367,5371,5376,5381],{"type":993,"tag":1026,"props":5360,"children":5361},{"style":1058},[5362],{"type":998,"value":1111},{"type":993,"tag":1026,"props":5364,"children":5365},{"style":1041},[5366],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5368,"children":5369},{"style":1124},[5370],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5372,"children":5373},{"style":1058},[5374],{"type":998,"value":5375},"\\n",{"type":993,"tag":1026,"props":5377,"children":5378},{"style":1124},[5379],{"type":998,"value":5380},"After modifications:\"",{"type":993,"tag":1026,"props":5382,"children":5383},{"style":1041},[5384],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5386,"children":5387},{"class":1028,"line":173},[5388,5392,5396,5400],{"type":993,"tag":1026,"props":5389,"children":5390},{"style":1047},[5391],{"type":998,"value":4734},{"type":993,"tag":1026,"props":5393,"children":5394},{"style":1041},[5395],{"type":998,"value":5155},{"type":993,"tag":1026,"props":5397,"children":5398},{"style":1047},[5399],{"type":998,"value":4744},{"type":993,"tag":1026,"props":5401,"children":5402},{"style":1041},[5403],{"type":998,"value":5164},{"type":993,"tag":1026,"props":5405,"children":5406},{"class":1028,"line":182},[5407,5411,5415,5419,5423,5427,5431,5435,5439,5443,5447,5451,5455],{"type":993,"tag":1026,"props":5408,"children":5409},{"style":1058},[5410],{"type":998,"value":1653},{"type":993,"tag":1026,"props":5412,"children":5413},{"style":1041},[5414],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5416,"children":5417},{"style":1047},[5418],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5420,"children":5421},{"style":1124},[5422],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5424,"children":5425},{"style":1058},[5426],{"type":998,"value":1132},{"type":993,"tag":1026,"props":5428,"children":5429},{"style":1041},[5430],{"type":998,"value":5192},{"type":993,"tag":1026,"props":5432,"children":5433},{"style":1058},[5434],{"type":998,"value":1142},{"type":993,"tag":1026,"props":5436,"children":5437},{"style":1124},[5438],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5440,"children":5441},{"style":1058},[5442],{"type":998,"value":1132},{"type":993,"tag":1026,"props":5444,"children":5445},{"style":1041},[5446],{"type":998,"value":5209},{"type":993,"tag":1026,"props":5448,"children":5449},{"style":1058},[5450],{"type":998,"value":1142},{"type":993,"tag":1026,"props":5452,"children":5453},{"style":1124},[5454],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5456,"children":5457},{"style":1041},[5458],{"type":998,"value":1103},{"type":993,"tag":1497,"props":5460,"children":5462},{"id":5461},"modifying-nested-dictionaries",[5463],{"type":998,"value":5464},"Modifying Nested Dictionaries",{"type":993,"tag":1012,"props":5466,"children":5467},{},[5468],{"type":993,"tag":1016,"props":5469,"children":5471},{"className":1018,"code":5470,"language":6,"meta":8,"style":8},"# Tuples with nested dictionaries\nproducts = (\n    (\"laptop\", {\"price\": 999, \"stock\": 5}),\n    (\"mouse\", {\"price\": 25, \"stock\": 50}),\n    (\"keyboard\", {\"price\": 75, \"stock\": 20})\n)\n\nprint(\"Original products:\")\nfor name, details in products:\n    print(f\"{name}: {details}\")\n\n# Modify nested dictionaries\nproducts[0][1][\"price\"] = 899      # Update laptop price\nproducts[1][1][\"stock\"] -= 10      # Reduce mouse stock\nproducts[2][1][\"category\"] = \"input\"  # Add keyboard category\n\nprint(\"\\nAfter modifications:\")\nfor name, details in products:\n    print(f\"{name}: {details}\")\n",[5472],{"type":993,"tag":1022,"props":5473,"children":5474},{"__ignoreMap":8},[5475,5483,5499,5552,5602,5653,5660,5667,5687,5708,5764,5771,5779,5825,5871,5917,5924,5951,5970],{"type":993,"tag":1026,"props":5476,"children":5477},{"class":1028,"line":12},[5478],{"type":993,"tag":1026,"props":5479,"children":5480},{"style":1032},[5481],{"type":998,"value":5482},"# Tuples with nested dictionaries\n",{"type":993,"tag":1026,"props":5484,"children":5485},{"class":1028,"line":27},[5486,5491,5495],{"type":993,"tag":1026,"props":5487,"children":5488},{"style":1041},[5489],{"type":998,"value":5490},"products ",{"type":993,"tag":1026,"props":5492,"children":5493},{"style":1047},[5494],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5496,"children":5497},{"style":1041},[5498],{"type":998,"value":4984},{"type":993,"tag":1026,"props":5500,"children":5501},{"class":1028,"line":36},[5502,5506,5511,5516,5521,5525,5530,5534,5539,5543,5547],{"type":993,"tag":1026,"props":5503,"children":5504},{"style":1041},[5505],{"type":998,"value":4992},{"type":993,"tag":1026,"props":5507,"children":5508},{"style":1124},[5509],{"type":998,"value":5510},"\"laptop\"",{"type":993,"tag":1026,"props":5512,"children":5513},{"style":1041},[5514],{"type":998,"value":5515},", {",{"type":993,"tag":1026,"props":5517,"children":5518},{"style":1124},[5519],{"type":998,"value":5520},"\"price\"",{"type":993,"tag":1026,"props":5522,"children":5523},{"style":1041},[5524],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5526,"children":5527},{"style":1058},[5528],{"type":998,"value":5529},"999",{"type":993,"tag":1026,"props":5531,"children":5532},{"style":1041},[5533],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5535,"children":5536},{"style":1124},[5537],{"type":998,"value":5538},"\"stock\"",{"type":993,"tag":1026,"props":5540,"children":5541},{"style":1041},[5542],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5544,"children":5545},{"style":1058},[5546],{"type":998,"value":1098},{"type":993,"tag":1026,"props":5548,"children":5549},{"style":1041},[5550],{"type":998,"value":5551},"}),\n",{"type":993,"tag":1026,"props":5553,"children":5554},{"class":1028,"line":45},[5555,5559,5564,5568,5572,5576,5581,5585,5589,5593,5598],{"type":993,"tag":1026,"props":5556,"children":5557},{"style":1041},[5558],{"type":998,"value":4992},{"type":993,"tag":1026,"props":5560,"children":5561},{"style":1124},[5562],{"type":998,"value":5563},"\"mouse\"",{"type":993,"tag":1026,"props":5565,"children":5566},{"style":1041},[5567],{"type":998,"value":5515},{"type":993,"tag":1026,"props":5569,"children":5570},{"style":1124},[5571],{"type":998,"value":5520},{"type":993,"tag":1026,"props":5573,"children":5574},{"style":1041},[5575],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5577,"children":5578},{"style":1058},[5579],{"type":998,"value":5580},"25",{"type":993,"tag":1026,"props":5582,"children":5583},{"style":1041},[5584],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5586,"children":5587},{"style":1124},[5588],{"type":998,"value":5538},{"type":993,"tag":1026,"props":5590,"children":5591},{"style":1041},[5592],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5594,"children":5595},{"style":1058},[5596],{"type":998,"value":5597},"50",{"type":993,"tag":1026,"props":5599,"children":5600},{"style":1041},[5601],{"type":998,"value":5551},{"type":993,"tag":1026,"props":5603,"children":5604},{"class":1028,"line":54},[5605,5609,5614,5618,5622,5626,5631,5635,5639,5643,5648],{"type":993,"tag":1026,"props":5606,"children":5607},{"style":1041},[5608],{"type":998,"value":4992},{"type":993,"tag":1026,"props":5610,"children":5611},{"style":1124},[5612],{"type":998,"value":5613},"\"keyboard\"",{"type":993,"tag":1026,"props":5615,"children":5616},{"style":1041},[5617],{"type":998,"value":5515},{"type":993,"tag":1026,"props":5619,"children":5620},{"style":1124},[5621],{"type":998,"value":5520},{"type":993,"tag":1026,"props":5623,"children":5624},{"style":1041},[5625],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5627,"children":5628},{"style":1058},[5629],{"type":998,"value":5630},"75",{"type":993,"tag":1026,"props":5632,"children":5633},{"style":1041},[5634],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5636,"children":5637},{"style":1124},[5638],{"type":998,"value":5538},{"type":993,"tag":1026,"props":5640,"children":5641},{"style":1041},[5642],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5644,"children":5645},{"style":1058},[5646],{"type":998,"value":5647},"20",{"type":993,"tag":1026,"props":5649,"children":5650},{"style":1041},[5651],{"type":998,"value":5652},"})\n",{"type":993,"tag":1026,"props":5654,"children":5655},{"class":1028,"line":63},[5656],{"type":993,"tag":1026,"props":5657,"children":5658},{"style":1041},[5659],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5661,"children":5662},{"class":1028,"line":72},[5663],{"type":993,"tag":1026,"props":5664,"children":5665},{"emptyLinePlaceholder":13},[5666],{"type":998,"value":1159},{"type":993,"tag":1026,"props":5668,"children":5669},{"class":1028,"line":81},[5670,5674,5678,5683],{"type":993,"tag":1026,"props":5671,"children":5672},{"style":1058},[5673],{"type":998,"value":1111},{"type":993,"tag":1026,"props":5675,"children":5676},{"style":1041},[5677],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5679,"children":5680},{"style":1124},[5681],{"type":998,"value":5682},"\"Original products:\"",{"type":993,"tag":1026,"props":5684,"children":5685},{"style":1041},[5686],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5688,"children":5689},{"class":1028,"line":91},[5690,5694,5699,5703],{"type":993,"tag":1026,"props":5691,"children":5692},{"style":1047},[5693],{"type":998,"value":4734},{"type":993,"tag":1026,"props":5695,"children":5696},{"style":1041},[5697],{"type":998,"value":5698}," name, details ",{"type":993,"tag":1026,"props":5700,"children":5701},{"style":1047},[5702],{"type":998,"value":4744},{"type":993,"tag":1026,"props":5704,"children":5705},{"style":1041},[5706],{"type":998,"value":5707}," products:\n",{"type":993,"tag":1026,"props":5709,"children":5710},{"class":1028,"line":100},[5711,5715,5719,5723,5727,5731,5735,5739,5743,5747,5752,5756,5760],{"type":993,"tag":1026,"props":5712,"children":5713},{"style":1058},[5714],{"type":998,"value":1653},{"type":993,"tag":1026,"props":5716,"children":5717},{"style":1041},[5718],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5720,"children":5721},{"style":1047},[5722],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5724,"children":5725},{"style":1124},[5726],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5728,"children":5729},{"style":1058},[5730],{"type":998,"value":1132},{"type":993,"tag":1026,"props":5732,"children":5733},{"style":1041},[5734],{"type":998,"value":5192},{"type":993,"tag":1026,"props":5736,"children":5737},{"style":1058},[5738],{"type":998,"value":1142},{"type":993,"tag":1026,"props":5740,"children":5741},{"style":1124},[5742],{"type":998,"value":1968},{"type":993,"tag":1026,"props":5744,"children":5745},{"style":1058},[5746],{"type":998,"value":1132},{"type":993,"tag":1026,"props":5748,"children":5749},{"style":1041},[5750],{"type":998,"value":5751},"details",{"type":993,"tag":1026,"props":5753,"children":5754},{"style":1058},[5755],{"type":998,"value":1142},{"type":993,"tag":1026,"props":5757,"children":5758},{"style":1124},[5759],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5761,"children":5762},{"style":1041},[5763],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5765,"children":5766},{"class":1028,"line":109},[5767],{"type":993,"tag":1026,"props":5768,"children":5769},{"emptyLinePlaceholder":13},[5770],{"type":998,"value":1159},{"type":993,"tag":1026,"props":5772,"children":5773},{"class":1028,"line":118},[5774],{"type":993,"tag":1026,"props":5775,"children":5776},{"style":1032},[5777],{"type":998,"value":5778},"# Modify nested dictionaries\n",{"type":993,"tag":1026,"props":5780,"children":5781},{"class":1028,"line":127},[5782,5787,5791,5795,5799,5803,5807,5811,5815,5820],{"type":993,"tag":1026,"props":5783,"children":5784},{"style":1041},[5785],{"type":998,"value":5786},"products[",{"type":993,"tag":1026,"props":5788,"children":5789},{"style":1058},[5790],{"type":998,"value":1604},{"type":993,"tag":1026,"props":5792,"children":5793},{"style":1041},[5794],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5796,"children":5797},{"style":1058},[5798],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5800,"children":5801},{"style":1041},[5802],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5804,"children":5805},{"style":1124},[5806],{"type":998,"value":5520},{"type":993,"tag":1026,"props":5808,"children":5809},{"style":1041},[5810],{"type":998,"value":1317},{"type":993,"tag":1026,"props":5812,"children":5813},{"style":1047},[5814],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5816,"children":5817},{"style":1058},[5818],{"type":998,"value":5819}," 899",{"type":993,"tag":1026,"props":5821,"children":5822},{"style":1032},[5823],{"type":998,"value":5824},"      # Update laptop price\n",{"type":993,"tag":1026,"props":5826,"children":5827},{"class":1028,"line":136},[5828,5832,5836,5840,5844,5848,5852,5856,5861,5866],{"type":993,"tag":1026,"props":5829,"children":5830},{"style":1041},[5831],{"type":998,"value":5786},{"type":993,"tag":1026,"props":5833,"children":5834},{"style":1058},[5835],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5837,"children":5838},{"style":1041},[5839],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5841,"children":5842},{"style":1058},[5843],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5845,"children":5846},{"style":1041},[5847],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5849,"children":5850},{"style":1124},[5851],{"type":998,"value":5538},{"type":993,"tag":1026,"props":5853,"children":5854},{"style":1041},[5855],{"type":998,"value":1317},{"type":993,"tag":1026,"props":5857,"children":5858},{"style":1047},[5859],{"type":998,"value":5860},"-=",{"type":993,"tag":1026,"props":5862,"children":5863},{"style":1058},[5864],{"type":998,"value":5865}," 10",{"type":993,"tag":1026,"props":5867,"children":5868},{"style":1032},[5869],{"type":998,"value":5870},"      # Reduce mouse stock\n",{"type":993,"tag":1026,"props":5872,"children":5873},{"class":1028,"line":146},[5874,5878,5882,5886,5890,5894,5899,5903,5907,5912],{"type":993,"tag":1026,"props":5875,"children":5876},{"style":1041},[5877],{"type":998,"value":5786},{"type":993,"tag":1026,"props":5879,"children":5880},{"style":1058},[5881],{"type":998,"value":1071},{"type":993,"tag":1026,"props":5883,"children":5884},{"style":1041},[5885],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5887,"children":5888},{"style":1058},[5889],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5891,"children":5892},{"style":1041},[5893],{"type":998,"value":2119},{"type":993,"tag":1026,"props":5895,"children":5896},{"style":1124},[5897],{"type":998,"value":5898},"\"category\"",{"type":993,"tag":1026,"props":5900,"children":5901},{"style":1041},[5902],{"type":998,"value":1317},{"type":993,"tag":1026,"props":5904,"children":5905},{"style":1047},[5906],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5908,"children":5909},{"style":1124},[5910],{"type":998,"value":5911}," \"input\"",{"type":993,"tag":1026,"props":5913,"children":5914},{"style":1032},[5915],{"type":998,"value":5916},"  # Add keyboard category\n",{"type":993,"tag":1026,"props":5918,"children":5919},{"class":1028,"line":155},[5920],{"type":993,"tag":1026,"props":5921,"children":5922},{"emptyLinePlaceholder":13},[5923],{"type":998,"value":1159},{"type":993,"tag":1026,"props":5925,"children":5926},{"class":1028,"line":164},[5927,5931,5935,5939,5943,5947],{"type":993,"tag":1026,"props":5928,"children":5929},{"style":1058},[5930],{"type":998,"value":1111},{"type":993,"tag":1026,"props":5932,"children":5933},{"style":1041},[5934],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5936,"children":5937},{"style":1124},[5938],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5940,"children":5941},{"style":1058},[5942],{"type":998,"value":5375},{"type":993,"tag":1026,"props":5944,"children":5945},{"style":1124},[5946],{"type":998,"value":5380},{"type":993,"tag":1026,"props":5948,"children":5949},{"style":1041},[5950],{"type":998,"value":1103},{"type":993,"tag":1026,"props":5952,"children":5953},{"class":1028,"line":173},[5954,5958,5962,5966],{"type":993,"tag":1026,"props":5955,"children":5956},{"style":1047},[5957],{"type":998,"value":4734},{"type":993,"tag":1026,"props":5959,"children":5960},{"style":1041},[5961],{"type":998,"value":5698},{"type":993,"tag":1026,"props":5963,"children":5964},{"style":1047},[5965],{"type":998,"value":4744},{"type":993,"tag":1026,"props":5967,"children":5968},{"style":1041},[5969],{"type":998,"value":5707},{"type":993,"tag":1026,"props":5971,"children":5972},{"class":1028,"line":182},[5973,5977,5981,5985,5989,5993,5997,6001,6005,6009,6013,6017,6021],{"type":993,"tag":1026,"props":5974,"children":5975},{"style":1058},[5976],{"type":998,"value":1653},{"type":993,"tag":1026,"props":5978,"children":5979},{"style":1041},[5980],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5982,"children":5983},{"style":1047},[5984],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5986,"children":5987},{"style":1124},[5988],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5990,"children":5991},{"style":1058},[5992],{"type":998,"value":1132},{"type":993,"tag":1026,"props":5994,"children":5995},{"style":1041},[5996],{"type":998,"value":5192},{"type":993,"tag":1026,"props":5998,"children":5999},{"style":1058},[6000],{"type":998,"value":1142},{"type":993,"tag":1026,"props":6002,"children":6003},{"style":1124},[6004],{"type":998,"value":1968},{"type":993,"tag":1026,"props":6006,"children":6007},{"style":1058},[6008],{"type":998,"value":1132},{"type":993,"tag":1026,"props":6010,"children":6011},{"style":1041},[6012],{"type":998,"value":5751},{"type":993,"tag":1026,"props":6014,"children":6015},{"style":1058},[6016],{"type":998,"value":1142},{"type":993,"tag":1026,"props":6018,"children":6019},{"style":1124},[6020],{"type":998,"value":1147},{"type":993,"tag":1026,"props":6022,"children":6023},{"style":1041},[6024],{"type":998,"value":1103},{"type":993,"tag":1497,"props":6026,"children":6028},{"id":6027},"hybrid-data-structure-patterns",[6029],{"type":998,"value":6030},"Hybrid Data Structure Patterns",{"type":993,"tag":1012,"props":6032,"children":6033},{},[6034],{"type":993,"tag":1016,"props":6035,"children":6037},{"className":1018,"code":6036,"language":6,"meta":8,"style":8},"# Hybrid immutable-mutable patterns\n# Configuration with immutable structure, mutable settings\nconfig = (\n    \"database\",\n    {\"host\": \"localhost\", \"port\": 5432},\n    [\"user1\", \"user2\", \"admin\"]\n)\n\nprint(f\"Original config: {config}\")\n\n# Can modify mutable parts\nconfig[1][\"port\"] = 5433  # Change port\nconfig[2].append(\"guest\")  # Add user\n\nprint(f\"Modified config: {config}\")\n\n# Cannot change tuple structure\ntry:\n    config[0] = \"cache\"  # This fails\nexcept TypeError as e:\n    print(f\"Structure change failed: {e}\")\n",[6038],{"type":993,"tag":1022,"props":6039,"children":6040},{"__ignoreMap":8},[6041,6049,6057,6073,6086,6131,6166,6173,6180,6221,6228,6236,6274,6303,6310,6350,6357,6365,6376,6406,6425],{"type":993,"tag":1026,"props":6042,"children":6043},{"class":1028,"line":12},[6044],{"type":993,"tag":1026,"props":6045,"children":6046},{"style":1032},[6047],{"type":998,"value":6048},"# Hybrid immutable-mutable patterns\n",{"type":993,"tag":1026,"props":6050,"children":6051},{"class":1028,"line":27},[6052],{"type":993,"tag":1026,"props":6053,"children":6054},{"style":1032},[6055],{"type":998,"value":6056},"# Configuration with immutable structure, mutable settings\n",{"type":993,"tag":1026,"props":6058,"children":6059},{"class":1028,"line":36},[6060,6065,6069],{"type":993,"tag":1026,"props":6061,"children":6062},{"style":1041},[6063],{"type":998,"value":6064},"config ",{"type":993,"tag":1026,"props":6066,"children":6067},{"style":1047},[6068],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6070,"children":6071},{"style":1041},[6072],{"type":998,"value":4984},{"type":993,"tag":1026,"props":6074,"children":6075},{"class":1028,"line":45},[6076,6081],{"type":993,"tag":1026,"props":6077,"children":6078},{"style":1124},[6079],{"type":998,"value":6080},"    \"database\"",{"type":993,"tag":1026,"props":6082,"children":6083},{"style":1041},[6084],{"type":998,"value":6085},",\n",{"type":993,"tag":1026,"props":6087,"children":6088},{"class":1028,"line":54},[6089,6094,6099,6103,6108,6112,6117,6121,6126],{"type":993,"tag":1026,"props":6090,"children":6091},{"style":1041},[6092],{"type":998,"value":6093},"    {",{"type":993,"tag":1026,"props":6095,"children":6096},{"style":1124},[6097],{"type":998,"value":6098},"\"host\"",{"type":993,"tag":1026,"props":6100,"children":6101},{"style":1041},[6102],{"type":998,"value":1968},{"type":993,"tag":1026,"props":6104,"children":6105},{"style":1124},[6106],{"type":998,"value":6107},"\"localhost\"",{"type":993,"tag":1026,"props":6109,"children":6110},{"style":1041},[6111],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6113,"children":6114},{"style":1124},[6115],{"type":998,"value":6116},"\"port\"",{"type":993,"tag":1026,"props":6118,"children":6119},{"style":1041},[6120],{"type":998,"value":1968},{"type":993,"tag":1026,"props":6122,"children":6123},{"style":1058},[6124],{"type":998,"value":6125},"5432",{"type":993,"tag":1026,"props":6127,"children":6128},{"style":1041},[6129],{"type":998,"value":6130},"},\n",{"type":993,"tag":1026,"props":6132,"children":6133},{"class":1028,"line":63},[6134,6139,6144,6148,6153,6157,6162],{"type":993,"tag":1026,"props":6135,"children":6136},{"style":1041},[6137],{"type":998,"value":6138},"    [",{"type":993,"tag":1026,"props":6140,"children":6141},{"style":1124},[6142],{"type":998,"value":6143},"\"user1\"",{"type":993,"tag":1026,"props":6145,"children":6146},{"style":1041},[6147],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6149,"children":6150},{"style":1124},[6151],{"type":998,"value":6152},"\"user2\"",{"type":993,"tag":1026,"props":6154,"children":6155},{"style":1041},[6156],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6158,"children":6159},{"style":1124},[6160],{"type":998,"value":6161},"\"admin\"",{"type":993,"tag":1026,"props":6163,"children":6164},{"style":1041},[6165],{"type":998,"value":3581},{"type":993,"tag":1026,"props":6167,"children":6168},{"class":1028,"line":72},[6169],{"type":993,"tag":1026,"props":6170,"children":6171},{"style":1041},[6172],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6174,"children":6175},{"class":1028,"line":81},[6176],{"type":993,"tag":1026,"props":6177,"children":6178},{"emptyLinePlaceholder":13},[6179],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6181,"children":6182},{"class":1028,"line":91},[6183,6187,6191,6195,6200,6204,6209,6213,6217],{"type":993,"tag":1026,"props":6184,"children":6185},{"style":1058},[6186],{"type":998,"value":1111},{"type":993,"tag":1026,"props":6188,"children":6189},{"style":1041},[6190],{"type":998,"value":1116},{"type":993,"tag":1026,"props":6192,"children":6193},{"style":1047},[6194],{"type":998,"value":1121},{"type":993,"tag":1026,"props":6196,"children":6197},{"style":1124},[6198],{"type":998,"value":6199},"\"Original config: ",{"type":993,"tag":1026,"props":6201,"children":6202},{"style":1058},[6203],{"type":998,"value":1132},{"type":993,"tag":1026,"props":6205,"children":6206},{"style":1041},[6207],{"type":998,"value":6208},"config",{"type":993,"tag":1026,"props":6210,"children":6211},{"style":1058},[6212],{"type":998,"value":1142},{"type":993,"tag":1026,"props":6214,"children":6215},{"style":1124},[6216],{"type":998,"value":1147},{"type":993,"tag":1026,"props":6218,"children":6219},{"style":1041},[6220],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6222,"children":6223},{"class":1028,"line":100},[6224],{"type":993,"tag":1026,"props":6225,"children":6226},{"emptyLinePlaceholder":13},[6227],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6229,"children":6230},{"class":1028,"line":109},[6231],{"type":993,"tag":1026,"props":6232,"children":6233},{"style":1032},[6234],{"type":998,"value":6235},"# Can modify mutable parts\n",{"type":993,"tag":1026,"props":6237,"children":6238},{"class":1028,"line":118},[6239,6244,6248,6252,6256,6260,6264,6269],{"type":993,"tag":1026,"props":6240,"children":6241},{"style":1041},[6242],{"type":998,"value":6243},"config[",{"type":993,"tag":1026,"props":6245,"children":6246},{"style":1058},[6247],{"type":998,"value":1061},{"type":993,"tag":1026,"props":6249,"children":6250},{"style":1041},[6251],{"type":998,"value":2119},{"type":993,"tag":1026,"props":6253,"children":6254},{"style":1124},[6255],{"type":998,"value":6116},{"type":993,"tag":1026,"props":6257,"children":6258},{"style":1041},[6259],{"type":998,"value":1317},{"type":993,"tag":1026,"props":6261,"children":6262},{"style":1047},[6263],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6265,"children":6266},{"style":1058},[6267],{"type":998,"value":6268}," 5433",{"type":993,"tag":1026,"props":6270,"children":6271},{"style":1032},[6272],{"type":998,"value":6273},"  # Change port\n",{"type":993,"tag":1026,"props":6275,"children":6276},{"class":1028,"line":127},[6277,6281,6285,6289,6294,6298],{"type":993,"tag":1026,"props":6278,"children":6279},{"style":1041},[6280],{"type":998,"value":6243},{"type":993,"tag":1026,"props":6282,"children":6283},{"style":1058},[6284],{"type":998,"value":1071},{"type":993,"tag":1026,"props":6286,"children":6287},{"style":1041},[6288],{"type":998,"value":2090},{"type":993,"tag":1026,"props":6290,"children":6291},{"style":1124},[6292],{"type":998,"value":6293},"\"guest\"",{"type":993,"tag":1026,"props":6295,"children":6296},{"style":1041},[6297],{"type":998,"value":1723},{"type":993,"tag":1026,"props":6299,"children":6300},{"style":1032},[6301],{"type":998,"value":6302},"# Add user\n",{"type":993,"tag":1026,"props":6304,"children":6305},{"class":1028,"line":136},[6306],{"type":993,"tag":1026,"props":6307,"children":6308},{"emptyLinePlaceholder":13},[6309],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6311,"children":6312},{"class":1028,"line":146},[6313,6317,6321,6325,6330,6334,6338,6342,6346],{"type":993,"tag":1026,"props":6314,"children":6315},{"style":1058},[6316],{"type":998,"value":1111},{"type":993,"tag":1026,"props":6318,"children":6319},{"style":1041},[6320],{"type":998,"value":1116},{"type":993,"tag":1026,"props":6322,"children":6323},{"style":1047},[6324],{"type":998,"value":1121},{"type":993,"tag":1026,"props":6326,"children":6327},{"style":1124},[6328],{"type":998,"value":6329},"\"Modified config: ",{"type":993,"tag":1026,"props":6331,"children":6332},{"style":1058},[6333],{"type":998,"value":1132},{"type":993,"tag":1026,"props":6335,"children":6336},{"style":1041},[6337],{"type":998,"value":6208},{"type":993,"tag":1026,"props":6339,"children":6340},{"style":1058},[6341],{"type":998,"value":1142},{"type":993,"tag":1026,"props":6343,"children":6344},{"style":1124},[6345],{"type":998,"value":1147},{"type":993,"tag":1026,"props":6347,"children":6348},{"style":1041},[6349],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6351,"children":6352},{"class":1028,"line":155},[6353],{"type":993,"tag":1026,"props":6354,"children":6355},{"emptyLinePlaceholder":13},[6356],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6358,"children":6359},{"class":1028,"line":164},[6360],{"type":993,"tag":1026,"props":6361,"children":6362},{"style":1032},[6363],{"type":998,"value":6364},"# Cannot change tuple structure\n",{"type":993,"tag":1026,"props":6366,"children":6367},{"class":1028,"line":173},[6368,6372],{"type":993,"tag":1026,"props":6369,"children":6370},{"style":1047},[6371],{"type":998,"value":1586},{"type":993,"tag":1026,"props":6373,"children":6374},{"style":1041},[6375],{"type":998,"value":1591},{"type":993,"tag":1026,"props":6377,"children":6378},{"class":1028,"line":182},[6379,6384,6388,6392,6396,6401],{"type":993,"tag":1026,"props":6380,"children":6381},{"style":1041},[6382],{"type":998,"value":6383},"    config[",{"type":993,"tag":1026,"props":6385,"children":6386},{"style":1058},[6387],{"type":998,"value":1604},{"type":993,"tag":1026,"props":6389,"children":6390},{"style":1041},[6391],{"type":998,"value":1317},{"type":993,"tag":1026,"props":6393,"children":6394},{"style":1047},[6395],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6397,"children":6398},{"style":1124},[6399],{"type":998,"value":6400}," \"cache\"",{"type":993,"tag":1026,"props":6402,"children":6403},{"style":1032},[6404],{"type":998,"value":6405},"  # This fails\n",{"type":993,"tag":1026,"props":6407,"children":6408},{"class":1028,"line":191},[6409,6413,6417,6421],{"type":993,"tag":1026,"props":6410,"children":6411},{"style":1047},[6412],{"type":998,"value":1630},{"type":993,"tag":1026,"props":6414,"children":6415},{"style":1058},[6416],{"type":998,"value":1635},{"type":993,"tag":1026,"props":6418,"children":6419},{"style":1047},[6420],{"type":998,"value":1640},{"type":993,"tag":1026,"props":6422,"children":6423},{"style":1041},[6424],{"type":998,"value":1645},{"type":993,"tag":1026,"props":6426,"children":6427},{"class":1028,"line":201},[6428,6432,6436,6440,6445,6449,6453,6457,6461],{"type":993,"tag":1026,"props":6429,"children":6430},{"style":1058},[6431],{"type":998,"value":1653},{"type":993,"tag":1026,"props":6433,"children":6434},{"style":1041},[6435],{"type":998,"value":1116},{"type":993,"tag":1026,"props":6437,"children":6438},{"style":1047},[6439],{"type":998,"value":1121},{"type":993,"tag":1026,"props":6441,"children":6442},{"style":1124},[6443],{"type":998,"value":6444},"\"Structure change failed: ",{"type":993,"tag":1026,"props":6446,"children":6447},{"style":1058},[6448],{"type":998,"value":1132},{"type":993,"tag":1026,"props":6450,"children":6451},{"style":1041},[6452],{"type":998,"value":1675},{"type":993,"tag":1026,"props":6454,"children":6455},{"style":1058},[6456],{"type":998,"value":1142},{"type":993,"tag":1026,"props":6458,"children":6459},{"style":1124},[6460],{"type":998,"value":1147},{"type":993,"tag":1026,"props":6462,"children":6463},{"style":1041},[6464],{"type":998,"value":1103},{"type":993,"tag":1393,"props":6466,"children":6468},{"id":6467},"tuple-modification-best-practices",[6469],{"type":998,"value":6470},"⭐ Tuple Modification Best Practices",{"type":993,"tag":1405,"props":6472,"children":6475},{"emoji":6473,"title":6474,"type":2225},"⭐","Modification Best Practices",[6476,6484,6507,6515,6538,6548],{"type":993,"tag":1001,"props":6477,"children":6478},{},[6479],{"type":993,"tag":1415,"props":6480,"children":6481},{},[6482],{"type":998,"value":6483},"Strategy Selection:",{"type":993,"tag":1421,"props":6485,"children":6486},{},[6487,6492,6497,6502],{"type":993,"tag":1425,"props":6488,"children":6489},{},[6490],{"type":998,"value":6491},"Simple changes: Use slicing and concatenation",{"type":993,"tag":1425,"props":6493,"children":6494},{},[6495],{"type":998,"value":6496},"Complex changes: Convert to list temporarily",{"type":993,"tag":1425,"props":6498,"children":6499},{},[6500],{"type":998,"value":6501},"Frequent changes: Consider using lists instead",{"type":993,"tag":1425,"props":6503,"children":6504},{},[6505],{"type":998,"value":6506},"Nested changes: Modify mutable contents directly",{"type":993,"tag":1001,"props":6508,"children":6509},{},[6510],{"type":993,"tag":1415,"props":6511,"children":6512},{},[6513],{"type":998,"value":6514},"Performance Guidelines:",{"type":993,"tag":1421,"props":6516,"children":6517},{},[6518,6523,6528,6533],{"type":993,"tag":1425,"props":6519,"children":6520},{},[6521],{"type":998,"value":6522},"Minimize conversions for large tuples",{"type":993,"tag":1425,"props":6524,"children":6525},{},[6526],{"type":998,"value":6527},"Cache intermediate results when possible",{"type":993,"tag":1425,"props":6529,"children":6530},{},[6531],{"type":998,"value":6532},"Use tuple comprehensions for transformations",{"type":993,"tag":1425,"props":6534,"children":6535},{},[6536],{"type":998,"value":6537},"Consider memory implications of new tuple creation",{"type":993,"tag":1001,"props":6539,"children":6540},{},[6541,6546],{"type":993,"tag":1415,"props":6542,"children":6543},{},[6544],{"type":998,"value":6545},"Code Clarity:",{"type":998,"value":6547}," Choose the most readable approach for your team",{"type":993,"tag":1001,"props":6549,"children":6550},{},[6551,6556],{"type":993,"tag":1415,"props":6552,"children":6553},{},[6554],{"type":998,"value":6555},"Design Decision:",{"type":998,"value":6557}," Evaluate if tuples are the right choice for frequently modified data",{"type":993,"tag":1497,"props":6559,"children":6561},{"id":6560},"efficient-modification-patterns",[6562],{"type":998,"value":6563},"Efficient Modification Patterns",{"type":993,"tag":1012,"props":6565,"children":6566},{},[6567],{"type":993,"tag":1016,"props":6568,"children":6570},{"className":1018,"code":6569,"language":6,"meta":8,"style":8},"# Efficient modification patterns\noriginal = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)\n\n# Efficient single element replacement\ndef replace_at_index(tup, index, new_value):\n    return tup[:index] + (new_value,) + tup[index+1:]\n\nmodified = replace_at_index(original, 4, 99)\nprint(f\"Efficient replacement: {modified}\")\n\n# Efficient filtering\nfiltered = tuple(x for x in original if x % 2 == 0)\nprint(f\"Efficient filtering: {filtered}\")\n\n# Efficient transformation\ntransformed = tuple(x * 2 for x in original)\nprint(f\"Efficient transformation: {transformed}\")\n",[6571],{"type":993,"tag":1022,"props":6572,"children":6573},{"__ignoreMap":8},[6574,6582,6680,6687,6695,6714,6757,6764,6796,6836,6843,6851,6922,6963,6970,6978,7024],{"type":993,"tag":1026,"props":6575,"children":6576},{"class":1028,"line":12},[6577],{"type":993,"tag":1026,"props":6578,"children":6579},{"style":1032},[6580],{"type":998,"value":6581},"# Efficient modification patterns\n",{"type":993,"tag":1026,"props":6583,"children":6584},{"class":1028,"line":27},[6585,6589,6593,6597,6601,6605,6609,6613,6617,6621,6625,6629,6633,6637,6641,6645,6650,6654,6659,6663,6668,6672,6676],{"type":993,"tag":1026,"props":6586,"children":6587},{"style":1041},[6588],{"type":998,"value":1044},{"type":993,"tag":1026,"props":6590,"children":6591},{"style":1047},[6592],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6594,"children":6595},{"style":1041},[6596],{"type":998,"value":1055},{"type":993,"tag":1026,"props":6598,"children":6599},{"style":1058},[6600],{"type":998,"value":1061},{"type":993,"tag":1026,"props":6602,"children":6603},{"style":1041},[6604],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6606,"children":6607},{"style":1058},[6608],{"type":998,"value":1071},{"type":993,"tag":1026,"props":6610,"children":6611},{"style":1041},[6612],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6614,"children":6615},{"style":1058},[6616],{"type":998,"value":1080},{"type":993,"tag":1026,"props":6618,"children":6619},{"style":1041},[6620],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6622,"children":6623},{"style":1058},[6624],{"type":998,"value":1089},{"type":993,"tag":1026,"props":6626,"children":6627},{"style":1041},[6628],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6630,"children":6631},{"style":1058},[6632],{"type":998,"value":1098},{"type":993,"tag":1026,"props":6634,"children":6635},{"style":1041},[6636],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6638,"children":6639},{"style":1058},[6640],{"type":998,"value":3047},{"type":993,"tag":1026,"props":6642,"children":6643},{"style":1041},[6644],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6646,"children":6647},{"style":1058},[6648],{"type":998,"value":6649},"7",{"type":993,"tag":1026,"props":6651,"children":6652},{"style":1041},[6653],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6655,"children":6656},{"style":1058},[6657],{"type":998,"value":6658},"8",{"type":993,"tag":1026,"props":6660,"children":6661},{"style":1041},[6662],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6664,"children":6665},{"style":1058},[6666],{"type":998,"value":6667},"9",{"type":993,"tag":1026,"props":6669,"children":6670},{"style":1041},[6671],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6673,"children":6674},{"style":1058},[6675],{"type":998,"value":1211},{"type":993,"tag":1026,"props":6677,"children":6678},{"style":1041},[6679],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6681,"children":6682},{"class":1028,"line":36},[6683],{"type":993,"tag":1026,"props":6684,"children":6685},{"emptyLinePlaceholder":13},[6686],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6688,"children":6689},{"class":1028,"line":45},[6690],{"type":993,"tag":1026,"props":6691,"children":6692},{"style":1032},[6693],{"type":998,"value":6694},"# Efficient single element replacement\n",{"type":993,"tag":1026,"props":6696,"children":6697},{"class":1028,"line":54},[6698,6703,6709],{"type":993,"tag":1026,"props":6699,"children":6700},{"style":1047},[6701],{"type":998,"value":6702},"def",{"type":993,"tag":1026,"props":6704,"children":6706},{"style":6705},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[6707],{"type":998,"value":6708}," replace_at_index",{"type":993,"tag":1026,"props":6710,"children":6711},{"style":1041},[6712],{"type":998,"value":6713},"(tup, index, new_value):\n",{"type":993,"tag":1026,"props":6715,"children":6716},{"class":1028,"line":63},[6717,6722,6727,6731,6736,6740,6745,6749,6753],{"type":993,"tag":1026,"props":6718,"children":6719},{"style":1047},[6720],{"type":998,"value":6721},"    return",{"type":993,"tag":1026,"props":6723,"children":6724},{"style":1041},[6725],{"type":998,"value":6726}," tup[:index] ",{"type":993,"tag":1026,"props":6728,"children":6729},{"style":1047},[6730],{"type":998,"value":1221},{"type":993,"tag":1026,"props":6732,"children":6733},{"style":1041},[6734],{"type":998,"value":6735}," (new_value,) ",{"type":993,"tag":1026,"props":6737,"children":6738},{"style":1047},[6739],{"type":998,"value":1221},{"type":993,"tag":1026,"props":6741,"children":6742},{"style":1041},[6743],{"type":998,"value":6744}," tup[index",{"type":993,"tag":1026,"props":6746,"children":6747},{"style":1047},[6748],{"type":998,"value":1221},{"type":993,"tag":1026,"props":6750,"children":6751},{"style":1058},[6752],{"type":998,"value":1061},{"type":993,"tag":1026,"props":6754,"children":6755},{"style":1041},[6756],{"type":998,"value":1235},{"type":993,"tag":1026,"props":6758,"children":6759},{"class":1028,"line":72},[6760],{"type":993,"tag":1026,"props":6761,"children":6762},{"emptyLinePlaceholder":13},[6763],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6765,"children":6766},{"class":1028,"line":81},[6767,6771,6775,6780,6784,6788,6792],{"type":993,"tag":1026,"props":6768,"children":6769},{"style":1041},[6770],{"type":998,"value":1198},{"type":993,"tag":1026,"props":6772,"children":6773},{"style":1047},[6774],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6776,"children":6777},{"style":1041},[6778],{"type":998,"value":6779}," replace_at_index(original, ",{"type":993,"tag":1026,"props":6781,"children":6782},{"style":1058},[6783],{"type":998,"value":1089},{"type":993,"tag":1026,"props":6785,"children":6786},{"style":1041},[6787],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6789,"children":6790},{"style":1058},[6791],{"type":998,"value":1330},{"type":993,"tag":1026,"props":6793,"children":6794},{"style":1041},[6795],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6797,"children":6798},{"class":1028,"line":91},[6799,6803,6807,6811,6816,6820,6824,6828,6832],{"type":993,"tag":1026,"props":6800,"children":6801},{"style":1058},[6802],{"type":998,"value":1111},{"type":993,"tag":1026,"props":6804,"children":6805},{"style":1041},[6806],{"type":998,"value":1116},{"type":993,"tag":1026,"props":6808,"children":6809},{"style":1047},[6810],{"type":998,"value":1121},{"type":993,"tag":1026,"props":6812,"children":6813},{"style":1124},[6814],{"type":998,"value":6815},"\"Efficient replacement: ",{"type":993,"tag":1026,"props":6817,"children":6818},{"style":1058},[6819],{"type":998,"value":1132},{"type":993,"tag":1026,"props":6821,"children":6822},{"style":1041},[6823],{"type":998,"value":1264},{"type":993,"tag":1026,"props":6825,"children":6826},{"style":1058},[6827],{"type":998,"value":1142},{"type":993,"tag":1026,"props":6829,"children":6830},{"style":1124},[6831],{"type":998,"value":1147},{"type":993,"tag":1026,"props":6833,"children":6834},{"style":1041},[6835],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6837,"children":6838},{"class":1028,"line":100},[6839],{"type":993,"tag":1026,"props":6840,"children":6841},{"emptyLinePlaceholder":13},[6842],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6844,"children":6845},{"class":1028,"line":109},[6846],{"type":993,"tag":1026,"props":6847,"children":6848},{"style":1032},[6849],{"type":998,"value":6850},"# Efficient filtering\n",{"type":993,"tag":1026,"props":6852,"children":6853},{"class":1028,"line":118},[6854,6859,6863,6867,6872,6876,6881,6885,6890,6894,6898,6903,6908,6913,6918],{"type":993,"tag":1026,"props":6855,"children":6856},{"style":1041},[6857],{"type":998,"value":6858},"filtered ",{"type":993,"tag":1026,"props":6860,"children":6861},{"style":1047},[6862],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6864,"children":6865},{"style":1058},[6866],{"type":998,"value":4259},{"type":993,"tag":1026,"props":6868,"children":6869},{"style":1041},[6870],{"type":998,"value":6871},"(x ",{"type":993,"tag":1026,"props":6873,"children":6874},{"style":1047},[6875],{"type":998,"value":4734},{"type":993,"tag":1026,"props":6877,"children":6878},{"style":1041},[6879],{"type":998,"value":6880}," x ",{"type":993,"tag":1026,"props":6882,"children":6883},{"style":1047},[6884],{"type":998,"value":4744},{"type":993,"tag":1026,"props":6886,"children":6887},{"style":1041},[6888],{"type":998,"value":6889}," original ",{"type":993,"tag":1026,"props":6891,"children":6892},{"style":1047},[6893],{"type":998,"value":4754},{"type":993,"tag":1026,"props":6895,"children":6896},{"style":1041},[6897],{"type":998,"value":6880},{"type":993,"tag":1026,"props":6899,"children":6900},{"style":1047},[6901],{"type":998,"value":6902},"%",{"type":993,"tag":1026,"props":6904,"children":6905},{"style":1058},[6906],{"type":998,"value":6907}," 2",{"type":993,"tag":1026,"props":6909,"children":6910},{"style":1047},[6911],{"type":998,"value":6912}," ==",{"type":993,"tag":1026,"props":6914,"children":6915},{"style":1058},[6916],{"type":998,"value":6917}," 0",{"type":993,"tag":1026,"props":6919,"children":6920},{"style":1041},[6921],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6923,"children":6924},{"class":1028,"line":127},[6925,6929,6933,6937,6942,6946,6951,6955,6959],{"type":993,"tag":1026,"props":6926,"children":6927},{"style":1058},[6928],{"type":998,"value":1111},{"type":993,"tag":1026,"props":6930,"children":6931},{"style":1041},[6932],{"type":998,"value":1116},{"type":993,"tag":1026,"props":6934,"children":6935},{"style":1047},[6936],{"type":998,"value":1121},{"type":993,"tag":1026,"props":6938,"children":6939},{"style":1124},[6940],{"type":998,"value":6941},"\"Efficient filtering: ",{"type":993,"tag":1026,"props":6943,"children":6944},{"style":1058},[6945],{"type":998,"value":1132},{"type":993,"tag":1026,"props":6947,"children":6948},{"style":1041},[6949],{"type":998,"value":6950},"filtered",{"type":993,"tag":1026,"props":6952,"children":6953},{"style":1058},[6954],{"type":998,"value":1142},{"type":993,"tag":1026,"props":6956,"children":6957},{"style":1124},[6958],{"type":998,"value":1147},{"type":993,"tag":1026,"props":6960,"children":6961},{"style":1041},[6962],{"type":998,"value":1103},{"type":993,"tag":1026,"props":6964,"children":6965},{"class":1028,"line":136},[6966],{"type":993,"tag":1026,"props":6967,"children":6968},{"emptyLinePlaceholder":13},[6969],{"type":998,"value":1159},{"type":993,"tag":1026,"props":6971,"children":6972},{"class":1028,"line":146},[6973],{"type":993,"tag":1026,"props":6974,"children":6975},{"style":1032},[6976],{"type":998,"value":6977},"# Efficient transformation\n",{"type":993,"tag":1026,"props":6979,"children":6980},{"class":1028,"line":155},[6981,6986,6990,6994,6998,7002,7006,7011,7015,7019],{"type":993,"tag":1026,"props":6982,"children":6983},{"style":1041},[6984],{"type":998,"value":6985},"transformed ",{"type":993,"tag":1026,"props":6987,"children":6988},{"style":1047},[6989],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6991,"children":6992},{"style":1058},[6993],{"type":998,"value":4259},{"type":993,"tag":1026,"props":6995,"children":6996},{"style":1041},[6997],{"type":998,"value":6871},{"type":993,"tag":1026,"props":6999,"children":7000},{"style":1047},[7001],{"type":998,"value":2719},{"type":993,"tag":1026,"props":7003,"children":7004},{"style":1058},[7005],{"type":998,"value":6907},{"type":993,"tag":1026,"props":7007,"children":7008},{"style":1047},[7009],{"type":998,"value":7010}," for",{"type":993,"tag":1026,"props":7012,"children":7013},{"style":1041},[7014],{"type":998,"value":6880},{"type":993,"tag":1026,"props":7016,"children":7017},{"style":1047},[7018],{"type":998,"value":4744},{"type":993,"tag":1026,"props":7020,"children":7021},{"style":1041},[7022],{"type":998,"value":7023}," original)\n",{"type":993,"tag":1026,"props":7025,"children":7026},{"class":1028,"line":164},[7027,7031,7035,7039,7044,7048,7053,7057,7061],{"type":993,"tag":1026,"props":7028,"children":7029},{"style":1058},[7030],{"type":998,"value":1111},{"type":993,"tag":1026,"props":7032,"children":7033},{"style":1041},[7034],{"type":998,"value":1116},{"type":993,"tag":1026,"props":7036,"children":7037},{"style":1047},[7038],{"type":998,"value":1121},{"type":993,"tag":1026,"props":7040,"children":7041},{"style":1124},[7042],{"type":998,"value":7043},"\"Efficient transformation: ",{"type":993,"tag":1026,"props":7045,"children":7046},{"style":1058},[7047],{"type":998,"value":1132},{"type":993,"tag":1026,"props":7049,"children":7050},{"style":1041},[7051],{"type":998,"value":7052},"transformed",{"type":993,"tag":1026,"props":7054,"children":7055},{"style":1058},[7056],{"type":998,"value":1142},{"type":993,"tag":1026,"props":7058,"children":7059},{"style":1124},[7060],{"type":998,"value":1147},{"type":993,"tag":1026,"props":7062,"children":7063},{"style":1041},[7064],{"type":998,"value":1103},{"type":993,"tag":1497,"props":7066,"children":7068},{"id":7067},"when-to-use-alternative-data-structures",[7069],{"type":998,"value":7070},"When to Use Alternative Data Structures",{"type":993,"tag":1012,"props":7072,"children":7073},{},[7074],{"type":993,"tag":1016,"props":7075,"children":7077},{"className":1018,"code":7076,"language":6,"meta":8,"style":8},"# Decision criteria for data structures\n# Use tuples when: data rarely changes, need immutability\ncoordinates = (10, 20)  # Fixed point\nconfig = (\"prod\", \"v1.0\", True)  # Stable configuration\n\n# Use lists when: frequent modifications needed\nshopping_cart = [\"item1\", \"item2\"]  # Items added/removed\nuser_preferences = [\"dark_mode\", \"notifications\"]  # Settings change\n\n# Use named tuples when: need structure + immutability\nfrom collections import namedtuple\nPoint = namedtuple('Point', ['x', 'y'])\nlocation = Point(10, 20)\nprint(f\"Named tuple: {location.x}, {location.y}\")\n",[7078],{"type":993,"tag":1022,"props":7079,"children":7080},{"__ignoreMap":8},[7081,7089,7097,7134,7181,7188,7196,7236,7275,7282,7290,7313,7357,7390],{"type":993,"tag":1026,"props":7082,"children":7083},{"class":1028,"line":12},[7084],{"type":993,"tag":1026,"props":7085,"children":7086},{"style":1032},[7087],{"type":998,"value":7088},"# Decision criteria for data structures\n",{"type":993,"tag":1026,"props":7090,"children":7091},{"class":1028,"line":27},[7092],{"type":993,"tag":1026,"props":7093,"children":7094},{"style":1032},[7095],{"type":998,"value":7096},"# Use tuples when: data rarely changes, need immutability\n",{"type":993,"tag":1026,"props":7098,"children":7099},{"class":1028,"line":36},[7100,7105,7109,7113,7117,7121,7125,7129],{"type":993,"tag":1026,"props":7101,"children":7102},{"style":1041},[7103],{"type":998,"value":7104},"coordinates ",{"type":993,"tag":1026,"props":7106,"children":7107},{"style":1047},[7108],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7110,"children":7111},{"style":1041},[7112],{"type":998,"value":1055},{"type":993,"tag":1026,"props":7114,"children":7115},{"style":1058},[7116],{"type":998,"value":1211},{"type":993,"tag":1026,"props":7118,"children":7119},{"style":1041},[7120],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7122,"children":7123},{"style":1058},[7124],{"type":998,"value":5647},{"type":993,"tag":1026,"props":7126,"children":7127},{"style":1041},[7128],{"type":998,"value":1723},{"type":993,"tag":1026,"props":7130,"children":7131},{"style":1032},[7132],{"type":998,"value":7133},"# Fixed point\n",{"type":993,"tag":1026,"props":7135,"children":7136},{"class":1028,"line":45},[7137,7141,7145,7149,7154,7158,7163,7167,7172,7176],{"type":993,"tag":1026,"props":7138,"children":7139},{"style":1041},[7140],{"type":998,"value":6064},{"type":993,"tag":1026,"props":7142,"children":7143},{"style":1047},[7144],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7146,"children":7147},{"style":1041},[7148],{"type":998,"value":1055},{"type":993,"tag":1026,"props":7150,"children":7151},{"style":1124},[7152],{"type":998,"value":7153},"\"prod\"",{"type":993,"tag":1026,"props":7155,"children":7156},{"style":1041},[7157],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7159,"children":7160},{"style":1124},[7161],{"type":998,"value":7162},"\"v1.0\"",{"type":993,"tag":1026,"props":7164,"children":7165},{"style":1041},[7166],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7168,"children":7169},{"style":1058},[7170],{"type":998,"value":7171},"True",{"type":993,"tag":1026,"props":7173,"children":7174},{"style":1041},[7175],{"type":998,"value":1723},{"type":993,"tag":1026,"props":7177,"children":7178},{"style":1032},[7179],{"type":998,"value":7180},"# Stable configuration\n",{"type":993,"tag":1026,"props":7182,"children":7183},{"class":1028,"line":54},[7184],{"type":993,"tag":1026,"props":7185,"children":7186},{"emptyLinePlaceholder":13},[7187],{"type":998,"value":1159},{"type":993,"tag":1026,"props":7189,"children":7190},{"class":1028,"line":63},[7191],{"type":993,"tag":1026,"props":7192,"children":7193},{"style":1032},[7194],{"type":998,"value":7195},"# Use lists when: frequent modifications needed\n",{"type":993,"tag":1026,"props":7197,"children":7198},{"class":1028,"line":72},[7199,7204,7208,7213,7218,7222,7227,7231],{"type":993,"tag":1026,"props":7200,"children":7201},{"style":1041},[7202],{"type":998,"value":7203},"shopping_cart ",{"type":993,"tag":1026,"props":7205,"children":7206},{"style":1047},[7207],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7209,"children":7210},{"style":1041},[7211],{"type":998,"value":7212}," [",{"type":993,"tag":1026,"props":7214,"children":7215},{"style":1124},[7216],{"type":998,"value":7217},"\"item1\"",{"type":993,"tag":1026,"props":7219,"children":7220},{"style":1041},[7221],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7223,"children":7224},{"style":1124},[7225],{"type":998,"value":7226},"\"item2\"",{"type":993,"tag":1026,"props":7228,"children":7229},{"style":1041},[7230],{"type":998,"value":1828},{"type":993,"tag":1026,"props":7232,"children":7233},{"style":1032},[7234],{"type":998,"value":7235},"# Items added/removed\n",{"type":993,"tag":1026,"props":7237,"children":7238},{"class":1028,"line":81},[7239,7244,7248,7252,7257,7261,7266,7270],{"type":993,"tag":1026,"props":7240,"children":7241},{"style":1041},[7242],{"type":998,"value":7243},"user_preferences ",{"type":993,"tag":1026,"props":7245,"children":7246},{"style":1047},[7247],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7249,"children":7250},{"style":1041},[7251],{"type":998,"value":7212},{"type":993,"tag":1026,"props":7253,"children":7254},{"style":1124},[7255],{"type":998,"value":7256},"\"dark_mode\"",{"type":993,"tag":1026,"props":7258,"children":7259},{"style":1041},[7260],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7262,"children":7263},{"style":1124},[7264],{"type":998,"value":7265},"\"notifications\"",{"type":993,"tag":1026,"props":7267,"children":7268},{"style":1041},[7269],{"type":998,"value":1828},{"type":993,"tag":1026,"props":7271,"children":7272},{"style":1032},[7273],{"type":998,"value":7274},"# Settings change\n",{"type":993,"tag":1026,"props":7276,"children":7277},{"class":1028,"line":91},[7278],{"type":993,"tag":1026,"props":7279,"children":7280},{"emptyLinePlaceholder":13},[7281],{"type":998,"value":1159},{"type":993,"tag":1026,"props":7283,"children":7284},{"class":1028,"line":100},[7285],{"type":993,"tag":1026,"props":7286,"children":7287},{"style":1032},[7288],{"type":998,"value":7289},"# Use named tuples when: need structure + immutability\n",{"type":993,"tag":1026,"props":7291,"children":7292},{"class":1028,"line":109},[7293,7298,7303,7308],{"type":993,"tag":1026,"props":7294,"children":7295},{"style":1047},[7296],{"type":998,"value":7297},"from",{"type":993,"tag":1026,"props":7299,"children":7300},{"style":1041},[7301],{"type":998,"value":7302}," collections ",{"type":993,"tag":1026,"props":7304,"children":7305},{"style":1047},[7306],{"type":998,"value":7307},"import",{"type":993,"tag":1026,"props":7309,"children":7310},{"style":1041},[7311],{"type":998,"value":7312}," namedtuple\n",{"type":993,"tag":1026,"props":7314,"children":7315},{"class":1028,"line":118},[7316,7321,7325,7330,7335,7339,7344,7348,7353],{"type":993,"tag":1026,"props":7317,"children":7318},{"style":1041},[7319],{"type":998,"value":7320},"Point ",{"type":993,"tag":1026,"props":7322,"children":7323},{"style":1047},[7324],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7326,"children":7327},{"style":1041},[7328],{"type":998,"value":7329}," namedtuple(",{"type":993,"tag":1026,"props":7331,"children":7332},{"style":1124},[7333],{"type":998,"value":7334},"'Point'",{"type":993,"tag":1026,"props":7336,"children":7337},{"style":1041},[7338],{"type":998,"value":5001},{"type":993,"tag":1026,"props":7340,"children":7341},{"style":1124},[7342],{"type":998,"value":7343},"'x'",{"type":993,"tag":1026,"props":7345,"children":7346},{"style":1041},[7347],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7349,"children":7350},{"style":1124},[7351],{"type":998,"value":7352},"'y'",{"type":993,"tag":1026,"props":7354,"children":7355},{"style":1041},[7356],{"type":998,"value":5109},{"type":993,"tag":1026,"props":7358,"children":7359},{"class":1028,"line":127},[7360,7365,7369,7374,7378,7382,7386],{"type":993,"tag":1026,"props":7361,"children":7362},{"style":1041},[7363],{"type":998,"value":7364},"location ",{"type":993,"tag":1026,"props":7366,"children":7367},{"style":1047},[7368],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7370,"children":7371},{"style":1041},[7372],{"type":998,"value":7373}," Point(",{"type":993,"tag":1026,"props":7375,"children":7376},{"style":1058},[7377],{"type":998,"value":1211},{"type":993,"tag":1026,"props":7379,"children":7380},{"style":1041},[7381],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7383,"children":7384},{"style":1058},[7385],{"type":998,"value":5647},{"type":993,"tag":1026,"props":7387,"children":7388},{"style":1041},[7389],{"type":998,"value":1103},{"type":993,"tag":1026,"props":7391,"children":7392},{"class":1028,"line":136},[7393,7397,7401,7405,7410,7414,7419,7423,7427,7431,7436,7440,7444],{"type":993,"tag":1026,"props":7394,"children":7395},{"style":1058},[7396],{"type":998,"value":1111},{"type":993,"tag":1026,"props":7398,"children":7399},{"style":1041},[7400],{"type":998,"value":1116},{"type":993,"tag":1026,"props":7402,"children":7403},{"style":1047},[7404],{"type":998,"value":1121},{"type":993,"tag":1026,"props":7406,"children":7407},{"style":1124},[7408],{"type":998,"value":7409},"\"Named tuple: ",{"type":993,"tag":1026,"props":7411,"children":7412},{"style":1058},[7413],{"type":998,"value":1132},{"type":993,"tag":1026,"props":7415,"children":7416},{"style":1041},[7417],{"type":998,"value":7418},"location.x",{"type":993,"tag":1026,"props":7420,"children":7421},{"style":1058},[7422],{"type":998,"value":1142},{"type":993,"tag":1026,"props":7424,"children":7425},{"style":1124},[7426],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7428,"children":7429},{"style":1058},[7430],{"type":998,"value":1132},{"type":993,"tag":1026,"props":7432,"children":7433},{"style":1041},[7434],{"type":998,"value":7435},"location.y",{"type":993,"tag":1026,"props":7437,"children":7438},{"style":1058},[7439],{"type":998,"value":1142},{"type":993,"tag":1026,"props":7441,"children":7442},{"style":1124},[7443],{"type":998,"value":1147},{"type":993,"tag":1026,"props":7445,"children":7446},{"style":1041},[7447],{"type":998,"value":1103},{"type":993,"tag":1393,"props":7449,"children":7451},{"id":7450},"tuple-modification-reference",[7452],{"type":998,"value":7453},"📋 Tuple Modification Reference",{"type":993,"tag":1001,"props":7455,"children":7456},{},[7457],{"type":998,"value":7458},"Common tuple modification patterns and their use cases:",{"type":993,"tag":7460,"props":7461,"children":7462},"table",{},[7463,7492],{"type":993,"tag":7464,"props":7465,"children":7466},"thead",{},[7467],{"type":993,"tag":7468,"props":7469,"children":7470},"tr",{},[7471,7477,7482,7487],{"type":993,"tag":7472,"props":7473,"children":7474},"th",{},[7475],{"type":998,"value":7476},"Operation",{"type":993,"tag":7472,"props":7478,"children":7479},{},[7480],{"type":998,"value":7481},"Technique",{"type":993,"tag":7472,"props":7483,"children":7484},{},[7485],{"type":998,"value":7486},"Example",{"type":993,"tag":7472,"props":7488,"children":7489},{},[7490],{"type":998,"value":7491},"Use Case",{"type":993,"tag":7493,"props":7494,"children":7495},"tbody",{},[7496,7527,7557,7586,7616,7646],{"type":993,"tag":7468,"props":7497,"children":7498},{},[7499,7508,7513,7522],{"type":993,"tag":7500,"props":7501,"children":7502},"td",{},[7503],{"type":993,"tag":1415,"props":7504,"children":7505},{},[7506],{"type":998,"value":7507},"Replace Element",{"type":993,"tag":7500,"props":7509,"children":7510},{},[7511],{"type":998,"value":7512},"Slicing",{"type":993,"tag":7500,"props":7514,"children":7515},{},[7516],{"type":993,"tag":1022,"props":7517,"children":7519},{"className":7518},[],[7520],{"type":998,"value":7521},"tup[:i] + (new,) + tup[i+1:]",{"type":993,"tag":7500,"props":7523,"children":7524},{},[7525],{"type":998,"value":7526},"Single value change",{"type":993,"tag":7468,"props":7528,"children":7529},{},[7530,7538,7543,7552],{"type":993,"tag":7500,"props":7531,"children":7532},{},[7533],{"type":993,"tag":1415,"props":7534,"children":7535},{},[7536],{"type":998,"value":7537},"Add Element",{"type":993,"tag":7500,"props":7539,"children":7540},{},[7541],{"type":998,"value":7542},"Concatenation",{"type":993,"tag":7500,"props":7544,"children":7545},{},[7546],{"type":993,"tag":1022,"props":7547,"children":7549},{"className":7548},[],[7550],{"type":998,"value":7551},"tup + (new,)",{"type":993,"tag":7500,"props":7553,"children":7554},{},[7555],{"type":998,"value":7556},"Append operation",{"type":993,"tag":7468,"props":7558,"children":7559},{},[7560,7568,7572,7581],{"type":993,"tag":7500,"props":7561,"children":7562},{},[7563],{"type":993,"tag":1415,"props":7564,"children":7565},{},[7566],{"type":998,"value":7567},"Remove Element",{"type":993,"tag":7500,"props":7569,"children":7570},{},[7571],{"type":998,"value":7512},{"type":993,"tag":7500,"props":7573,"children":7574},{},[7575],{"type":993,"tag":1022,"props":7576,"children":7578},{"className":7577},[],[7579],{"type":998,"value":7580},"tup[:i] + tup[i+1:]",{"type":993,"tag":7500,"props":7582,"children":7583},{},[7584],{"type":998,"value":7585},"Delete operation",{"type":993,"tag":7468,"props":7587,"children":7588},{},[7589,7597,7602,7611],{"type":993,"tag":7500,"props":7590,"children":7591},{},[7592],{"type":993,"tag":1415,"props":7593,"children":7594},{},[7595],{"type":998,"value":7596},"Complex Changes",{"type":993,"tag":7500,"props":7598,"children":7599},{},[7600],{"type":998,"value":7601},"List conversion",{"type":993,"tag":7500,"props":7603,"children":7604},{},[7605],{"type":993,"tag":1022,"props":7606,"children":7608},{"className":7607},[],[7609],{"type":998,"value":7610},"tuple(modified_list)",{"type":993,"tag":7500,"props":7612,"children":7613},{},[7614],{"type":998,"value":7615},"Multiple modifications",{"type":993,"tag":7468,"props":7617,"children":7618},{},[7619,7627,7632,7641],{"type":993,"tag":7500,"props":7620,"children":7621},{},[7622],{"type":993,"tag":1415,"props":7623,"children":7624},{},[7625],{"type":998,"value":7626},"Transform All",{"type":993,"tag":7500,"props":7628,"children":7629},{},[7630],{"type":998,"value":7631},"Comprehension",{"type":993,"tag":7500,"props":7633,"children":7634},{},[7635],{"type":993,"tag":1022,"props":7636,"children":7638},{"className":7637},[],[7639],{"type":998,"value":7640},"tuple(f(x) for x in tup)",{"type":993,"tag":7500,"props":7642,"children":7643},{},[7644],{"type":998,"value":7645},"Apply function to all",{"type":993,"tag":7468,"props":7647,"children":7648},{},[7649,7657,7661,7670],{"type":993,"tag":7500,"props":7650,"children":7651},{},[7652],{"type":993,"tag":1415,"props":7653,"children":7654},{},[7655],{"type":998,"value":7656},"Filter Elements",{"type":993,"tag":7500,"props":7658,"children":7659},{},[7660],{"type":998,"value":7631},{"type":993,"tag":7500,"props":7662,"children":7663},{},[7664],{"type":993,"tag":1022,"props":7665,"children":7667},{"className":7666},[],[7668],{"type":998,"value":7669},"tuple(x for x in tup if condition)",{"type":993,"tag":7500,"props":7671,"children":7672},{},[7673],{"type":998,"value":7674},"Conditional selection",{"type":993,"tag":1001,"props":7676,"children":7677},{},[7678],{"type":998,"value":7679},"Choose the technique that best balances performance, readability, and maintainability for your specific use case.",{"type":993,"tag":1001,"props":7681,"children":7682},{},[7683,7685,7691,7693,7698],{"type":998,"value":7684},"Learn more about ",{"type":993,"tag":7686,"props":7687,"children":7688},"a",{"href":380},[7689],{"type":998,"value":7690},"creating tuples",{"type":998,"value":7692}," and ",{"type":993,"tag":7686,"props":7694,"children":7695},{"href":243},[7696],{"type":998,"value":7697},"for loops",{"type":998,"value":7699}," to understand the foundation of tuple operations.",{"type":993,"tag":7701,"props":7702,"children":7705},"exercise",{"hint":7703,"prompt":7704},"Use a combination of conditional logic and tuple comprehension to  transform the grades","Given a tuple of student grades, create a new tuple where all grades below 70 are replaced with 70 (minimum passing  grade), and add a bonus of 5 points to all grades above 90.",[7706],{"type":993,"tag":1016,"props":7707,"children":7709},{"className":1018,"code":7708,"language":6,"meta":8,"style":8},"grades = (65, 85, 92, 78, 95, 68, 88, 97)\n\n# TODO: Write your code here to modify the grades\n# Result should replace low grades with 70 and add bonus to high grades\n",[7710],{"type":993,"tag":1022,"props":7711,"children":7712},{"__ignoreMap":8},[7713,7796,7803,7821],{"type":993,"tag":1026,"props":7714,"children":7715},{"class":1028,"line":12},[7716,7721,7725,7729,7734,7738,7742,7746,7750,7754,7758,7762,7766,7770,7775,7779,7783,7787,7792],{"type":993,"tag":1026,"props":7717,"children":7718},{"style":1041},[7719],{"type":998,"value":7720},"grades ",{"type":993,"tag":1026,"props":7722,"children":7723},{"style":1047},[7724],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7726,"children":7727},{"style":1041},[7728],{"type":998,"value":1055},{"type":993,"tag":1026,"props":7730,"children":7731},{"style":1058},[7732],{"type":998,"value":7733},"65",{"type":993,"tag":1026,"props":7735,"children":7736},{"style":1041},[7737],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7739,"children":7740},{"style":1058},[7741],{"type":998,"value":4350},{"type":993,"tag":1026,"props":7743,"children":7744},{"style":1041},[7745],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7747,"children":7748},{"style":1058},[7749],{"type":998,"value":4359},{"type":993,"tag":1026,"props":7751,"children":7752},{"style":1041},[7753],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7755,"children":7756},{"style":1058},[7757],{"type":998,"value":4368},{"type":993,"tag":1026,"props":7759,"children":7760},{"style":1041},[7761],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7763,"children":7764},{"style":1058},[7765],{"type":998,"value":4502},{"type":993,"tag":1026,"props":7767,"children":7768},{"style":1041},[7769],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7771,"children":7772},{"style":1058},[7773],{"type":998,"value":7774},"68",{"type":993,"tag":1026,"props":7776,"children":7777},{"style":1041},[7778],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7780,"children":7781},{"style":1058},[7782],{"type":998,"value":4386},{"type":993,"tag":1026,"props":7784,"children":7785},{"style":1041},[7786],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7788,"children":7789},{"style":1058},[7790],{"type":998,"value":7791},"97",{"type":993,"tag":1026,"props":7793,"children":7794},{"style":1041},[7795],{"type":998,"value":1103},{"type":993,"tag":1026,"props":7797,"children":7798},{"class":1028,"line":27},[7799],{"type":993,"tag":1026,"props":7800,"children":7801},{"emptyLinePlaceholder":13},[7802],{"type":998,"value":1159},{"type":993,"tag":1026,"props":7804,"children":7805},{"class":1028,"line":36},[7806,7811,7816],{"type":993,"tag":1026,"props":7807,"children":7808},{"style":1032},[7809],{"type":998,"value":7810},"# ",{"type":993,"tag":1026,"props":7812,"children":7813},{"style":1047},[7814],{"type":998,"value":7815},"TODO",{"type":993,"tag":1026,"props":7817,"children":7818},{"style":1032},[7819],{"type":998,"value":7820},": Write your code here to modify the grades\n",{"type":993,"tag":1026,"props":7822,"children":7823},{"class":1028,"line":45},[7824],{"type":993,"tag":1026,"props":7825,"children":7826},{"style":1032},[7827],{"type":998,"value":7828},"# Result should replace low grades with 70 and add bonus to high grades\n",{"type":993,"tag":1497,"props":7830,"children":7832},{"id":7831},"solution-and-explanation",[7833],{"type":998,"value":7834},"Solution and Explanation 💡",{"type":993,"tag":5751,"props":7836,"children":7837},{},[7838,7846,8159,8167],{"type":993,"tag":7839,"props":7840,"children":7843},"summary",{"className":7841},[7842],"cursor-pointer",[7844],{"type":998,"value":7845},"Click to see the complete solution",{"type":993,"tag":1012,"props":7847,"children":7848},{},[7849],{"type":993,"tag":1016,"props":7850,"children":7852},{"className":1018,"code":7851,"language":6,"meta":8,"style":8},"grades = (65, 85, 92, 78, 95, 68, 88, 97)\n\n# Transform grades using tuple comprehension\nmodified_grades = tuple(\n    70 if grade \u003C 70 else grade + 5 if grade > 90 else grade\n    for grade in grades\n)\n\nprint(f\"Original grades: {grades}\")\nprint(f\"Modified grades: {modified_grades}\")\n",[7853],{"type":993,"tag":1022,"props":7854,"children":7855},{"__ignoreMap":8},[7856,7935,7942,7950,7971,8043,8064,8071,8078,8118],{"type":993,"tag":1026,"props":7857,"children":7858},{"class":1028,"line":12},[7859,7863,7867,7871,7875,7879,7883,7887,7891,7895,7899,7903,7907,7911,7915,7919,7923,7927,7931],{"type":993,"tag":1026,"props":7860,"children":7861},{"style":1041},[7862],{"type":998,"value":7720},{"type":993,"tag":1026,"props":7864,"children":7865},{"style":1047},[7866],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7868,"children":7869},{"style":1041},[7870],{"type":998,"value":1055},{"type":993,"tag":1026,"props":7872,"children":7873},{"style":1058},[7874],{"type":998,"value":7733},{"type":993,"tag":1026,"props":7876,"children":7877},{"style":1041},[7878],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7880,"children":7881},{"style":1058},[7882],{"type":998,"value":4350},{"type":993,"tag":1026,"props":7884,"children":7885},{"style":1041},[7886],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7888,"children":7889},{"style":1058},[7890],{"type":998,"value":4359},{"type":993,"tag":1026,"props":7892,"children":7893},{"style":1041},[7894],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7896,"children":7897},{"style":1058},[7898],{"type":998,"value":4368},{"type":993,"tag":1026,"props":7900,"children":7901},{"style":1041},[7902],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7904,"children":7905},{"style":1058},[7906],{"type":998,"value":4502},{"type":993,"tag":1026,"props":7908,"children":7909},{"style":1041},[7910],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7912,"children":7913},{"style":1058},[7914],{"type":998,"value":7774},{"type":993,"tag":1026,"props":7916,"children":7917},{"style":1041},[7918],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7920,"children":7921},{"style":1058},[7922],{"type":998,"value":4386},{"type":993,"tag":1026,"props":7924,"children":7925},{"style":1041},[7926],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7928,"children":7929},{"style":1058},[7930],{"type":998,"value":7791},{"type":993,"tag":1026,"props":7932,"children":7933},{"style":1041},[7934],{"type":998,"value":1103},{"type":993,"tag":1026,"props":7936,"children":7937},{"class":1028,"line":27},[7938],{"type":993,"tag":1026,"props":7939,"children":7940},{"emptyLinePlaceholder":13},[7941],{"type":998,"value":1159},{"type":993,"tag":1026,"props":7943,"children":7944},{"class":1028,"line":36},[7945],{"type":993,"tag":1026,"props":7946,"children":7947},{"style":1032},[7948],{"type":998,"value":7949},"# Transform grades using tuple comprehension\n",{"type":993,"tag":1026,"props":7951,"children":7952},{"class":1028,"line":45},[7953,7958,7962,7966],{"type":993,"tag":1026,"props":7954,"children":7955},{"style":1041},[7956],{"type":998,"value":7957},"modified_grades ",{"type":993,"tag":1026,"props":7959,"children":7960},{"style":1047},[7961],{"type":998,"value":1050},{"type":993,"tag":1026,"props":7963,"children":7964},{"style":1058},[7965],{"type":998,"value":4259},{"type":993,"tag":1026,"props":7967,"children":7968},{"style":1041},[7969],{"type":998,"value":7970},"(\n",{"type":993,"tag":1026,"props":7972,"children":7973},{"class":1028,"line":54},[7974,7979,7984,7989,7994,7999,8004,8008,8012,8017,8021,8025,8030,8034,8038],{"type":993,"tag":1026,"props":7975,"children":7976},{"style":1058},[7977],{"type":998,"value":7978},"    70",{"type":993,"tag":1026,"props":7980,"children":7981},{"style":1047},[7982],{"type":998,"value":7983}," if",{"type":993,"tag":1026,"props":7985,"children":7986},{"style":1041},[7987],{"type":998,"value":7988}," grade ",{"type":993,"tag":1026,"props":7990,"children":7991},{"style":1047},[7992],{"type":998,"value":7993},"\u003C",{"type":993,"tag":1026,"props":7995,"children":7996},{"style":1058},[7997],{"type":998,"value":7998}," 70",{"type":993,"tag":1026,"props":8000,"children":8001},{"style":1047},[8002],{"type":998,"value":8003}," else",{"type":993,"tag":1026,"props":8005,"children":8006},{"style":1041},[8007],{"type":998,"value":7988},{"type":993,"tag":1026,"props":8009,"children":8010},{"style":1047},[8011],{"type":998,"value":1221},{"type":993,"tag":1026,"props":8013,"children":8014},{"style":1058},[8015],{"type":998,"value":8016}," 5",{"type":993,"tag":1026,"props":8018,"children":8019},{"style":1047},[8020],{"type":998,"value":7983},{"type":993,"tag":1026,"props":8022,"children":8023},{"style":1041},[8024],{"type":998,"value":7988},{"type":993,"tag":1026,"props":8026,"children":8027},{"style":1047},[8028],{"type":998,"value":8029},">",{"type":993,"tag":1026,"props":8031,"children":8032},{"style":1058},[8033],{"type":998,"value":4768},{"type":993,"tag":1026,"props":8035,"children":8036},{"style":1047},[8037],{"type":998,"value":8003},{"type":993,"tag":1026,"props":8039,"children":8040},{"style":1041},[8041],{"type":998,"value":8042}," grade\n",{"type":993,"tag":1026,"props":8044,"children":8045},{"class":1028,"line":63},[8046,8051,8055,8059],{"type":993,"tag":1026,"props":8047,"children":8048},{"style":1047},[8049],{"type":998,"value":8050},"    for",{"type":993,"tag":1026,"props":8052,"children":8053},{"style":1041},[8054],{"type":998,"value":7988},{"type":993,"tag":1026,"props":8056,"children":8057},{"style":1047},[8058],{"type":998,"value":4744},{"type":993,"tag":1026,"props":8060,"children":8061},{"style":1041},[8062],{"type":998,"value":8063}," grades\n",{"type":993,"tag":1026,"props":8065,"children":8066},{"class":1028,"line":72},[8067],{"type":993,"tag":1026,"props":8068,"children":8069},{"style":1041},[8070],{"type":998,"value":1103},{"type":993,"tag":1026,"props":8072,"children":8073},{"class":1028,"line":81},[8074],{"type":993,"tag":1026,"props":8075,"children":8076},{"emptyLinePlaceholder":13},[8077],{"type":998,"value":1159},{"type":993,"tag":1026,"props":8079,"children":8080},{"class":1028,"line":91},[8081,8085,8089,8093,8098,8102,8106,8110,8114],{"type":993,"tag":1026,"props":8082,"children":8083},{"style":1058},[8084],{"type":998,"value":1111},{"type":993,"tag":1026,"props":8086,"children":8087},{"style":1041},[8088],{"type":998,"value":1116},{"type":993,"tag":1026,"props":8090,"children":8091},{"style":1047},[8092],{"type":998,"value":1121},{"type":993,"tag":1026,"props":8094,"children":8095},{"style":1124},[8096],{"type":998,"value":8097},"\"Original grades: ",{"type":993,"tag":1026,"props":8099,"children":8100},{"style":1058},[8101],{"type":998,"value":1132},{"type":993,"tag":1026,"props":8103,"children":8104},{"style":1041},[8105],{"type":998,"value":5209},{"type":993,"tag":1026,"props":8107,"children":8108},{"style":1058},[8109],{"type":998,"value":1142},{"type":993,"tag":1026,"props":8111,"children":8112},{"style":1124},[8113],{"type":998,"value":1147},{"type":993,"tag":1026,"props":8115,"children":8116},{"style":1041},[8117],{"type":998,"value":1103},{"type":993,"tag":1026,"props":8119,"children":8120},{"class":1028,"line":100},[8121,8125,8129,8133,8138,8142,8147,8151,8155],{"type":993,"tag":1026,"props":8122,"children":8123},{"style":1058},[8124],{"type":998,"value":1111},{"type":993,"tag":1026,"props":8126,"children":8127},{"style":1041},[8128],{"type":998,"value":1116},{"type":993,"tag":1026,"props":8130,"children":8131},{"style":1047},[8132],{"type":998,"value":1121},{"type":993,"tag":1026,"props":8134,"children":8135},{"style":1124},[8136],{"type":998,"value":8137},"\"Modified grades: ",{"type":993,"tag":1026,"props":8139,"children":8140},{"style":1058},[8141],{"type":998,"value":1132},{"type":993,"tag":1026,"props":8143,"children":8144},{"style":1041},[8145],{"type":998,"value":8146},"modified_grades",{"type":993,"tag":1026,"props":8148,"children":8149},{"style":1058},[8150],{"type":998,"value":1142},{"type":993,"tag":1026,"props":8152,"children":8153},{"style":1124},[8154],{"type":998,"value":1147},{"type":993,"tag":1026,"props":8156,"children":8157},{"style":1041},[8158],{"type":998,"value":1103},{"type":993,"tag":1001,"props":8160,"children":8161},{},[8162],{"type":993,"tag":1415,"props":8163,"children":8164},{},[8165],{"type":998,"value":8166},"Key Learning Points:",{"type":993,"tag":1421,"props":8168,"children":8169},{},[8170,8188,8207,8224],{"type":993,"tag":1425,"props":8171,"children":8172},{},[8173,8175,8180,8182],{"type":998,"value":8174},"📌 ",{"type":993,"tag":1415,"props":8176,"children":8177},{},[8178],{"type":998,"value":8179},"Tuple comprehension",{"type":998,"value":8181},": Create new tuple with ",{"type":993,"tag":1022,"props":8183,"children":8185},{"className":8184},[],[8186],{"type":998,"value":8187},"tuple(expression for item in tuple)",{"type":993,"tag":1425,"props":8189,"children":8190},{},[8191,8192,8197,8199,8205],{"type":998,"value":8174},{"type":993,"tag":1415,"props":8193,"children":8194},{},[8195],{"type":998,"value":8196},"Conditional expression",{"type":998,"value":8198},": Use ",{"type":993,"tag":1022,"props":8200,"children":8202},{"className":8201},[],[8203],{"type":998,"value":8204},"value1 if condition else value2",{"type":998,"value":8206}," for inline conditions",{"type":993,"tag":1425,"props":8208,"children":8209},{},[8210,8211,8216,8218],{"type":998,"value":8174},{"type":993,"tag":1415,"props":8212,"children":8213},{},[8214],{"type":998,"value":8215},"Chained conditions",{"type":998,"value":8217},": Chain multiple conditions with ",{"type":993,"tag":1022,"props":8219,"children":8221},{"className":8220},[],[8222],{"type":998,"value":8223},"if...else if...else",{"type":993,"tag":1425,"props":8225,"children":8226},{},[8227,8228,8233],{"type":998,"value":8174},{"type":993,"tag":1415,"props":8229,"children":8230},{},[8231],{"type":998,"value":8232},"Immutable modification",{"type":998,"value":8234},": Create new tuple rather than modifying original",{"type":993,"tag":1393,"props":8236,"children":8238},{"id":8237},"test-your-knowledge",[8239],{"type":998,"value":8240},"Test Your Knowledge",{"type":993,"tag":1001,"props":8242,"children":8243},{},[8244],{"type":998,"value":8245},"Test what you've learned about changing tuples in Python:",{"type":993,"tag":8247,"props":8248,"children":8251},"redirect-button",{"label":8249,"url":8250},"Take Quiz","/tutorial-quiz/python/changing-tuples",[],{"type":993,"tag":1393,"props":8253,"children":8255},{"id":8254},"whats-next",[8256],{"type":998,"value":8257},"What's Next?",{"type":993,"tag":1001,"props":8259,"children":8260},{},[8261],{"type":998,"value":8262},"Now that you understand tuple immutability and modification techniques, you're ready to learn about tuple unpacking - a powerful feature for extracting values from tuples efficiently.",{"type":993,"tag":1001,"props":8264,"children":8265},{},[8266,8268,8272],{"type":998,"value":8267},"Ready to continue? Check out our lesson on ",{"type":993,"tag":7686,"props":8269,"children":8270},{"href":407},[8271],{"type":998,"value":408},{"type":998,"value":8273},".",{"type":993,"tag":8275,"props":8276,"children":8277},"style",{},[8278],{"type":998,"value":8279},"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":8281},[8282,8286,8291,8296,8301,8305,8308,8309],{"id":1395,"depth":27,"text":1398,"children":8283},[8284,8285],{"id":1499,"depth":36,"text":1502},{"id":1895,"depth":36,"text":1898},{"id":2212,"depth":27,"text":2215,"children":8287},[8288,8289,8290],{"id":2335,"depth":36,"text":2338},{"id":2804,"depth":36,"text":2807},{"id":3332,"depth":36,"text":3335},{"id":3822,"depth":27,"text":3825,"children":8292},[8293,8294,8295],{"id":3929,"depth":36,"text":3932},{"id":4308,"depth":36,"text":4311},{"id":4563,"depth":36,"text":4566},{"id":4849,"depth":27,"text":4852,"children":8297},[8298,8299,8300],{"id":4946,"depth":36,"text":4949},{"id":5461,"depth":36,"text":5464},{"id":6027,"depth":36,"text":6030},{"id":6467,"depth":27,"text":6470,"children":8302},[8303,8304],{"id":6560,"depth":36,"text":6563},{"id":7067,"depth":36,"text":7070},{"id":7450,"depth":27,"text":7453,"children":8306},[8307],{"id":7831,"depth":36,"text":7834},{"id":8237,"depth":27,"text":8240},{"id":8254,"depth":27,"text":8257},1782373739185]