[{"data":1,"prerenderedAt":5712},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/updating-dictionaries":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,"expanded":13},"/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,"expanded":13},"/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",[543],{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"body":989,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},{"type":990,"children":991,"toc":5689},"root",[992,1000,1006,1237,1244,1249,1491,1539,1545,1558,1565,1570,1757,1763,1768,1942,1948,1953,2137,2143,2148,2154,2159,2371,2377,2382,2738,2744,2906,2912,2918,2923,3466,3472,3477,4192,4198,4203,4209,4214,4644,4690,4695,4708,5068,5074,5643,5649,5654,5661,5667,5672,5683],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":547},[997],{"type":998,"value":999},"text","🔄 Updating Dictionaries",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Modifying dictionary data efficiently is essential for dynamic applications. Python provides multiple methods to update, add, and maintain dictionary content, each optimized for different scenarios and use cases.",{"type":993,"tag":1007,"props":1008,"children":1009},"code-try",{},[1010],{"type":993,"tag":1011,"props":1012,"children":1015},"pre",{"className":1013,"code":1014,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic dictionary updating\ninventory = {'apples': 50, 'bananas': 30}\nprint(\"Original:\", inventory)\n\n# Add new item\ninventory['oranges'] = 25\nprint(\"After adding oranges:\", inventory)\n\n# Update existing item\ninventory['apples'] = 45\nprint(\"After updating apples:\", inventory)\n",[1016],{"type":993,"tag":1017,"props":1018,"children":1019},"code",{"__ignoreMap":8},[1020,1031,1092,1115,1123,1131,1158,1178,1185,1193,1217],{"type":993,"tag":1021,"props":1022,"children":1024},"span",{"class":1023,"line":12},"line",[1025],{"type":993,"tag":1021,"props":1026,"children":1028},{"style":1027},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1029],{"type":998,"value":1030},"# Basic dictionary updating\n",{"type":993,"tag":1021,"props":1032,"children":1033},{"class":1023,"line":27},[1034,1040,1046,1051,1057,1062,1068,1073,1078,1082,1087],{"type":993,"tag":1021,"props":1035,"children":1037},{"style":1036},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1038],{"type":998,"value":1039},"inventory ",{"type":993,"tag":1021,"props":1041,"children":1043},{"style":1042},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1044],{"type":998,"value":1045},"=",{"type":993,"tag":1021,"props":1047,"children":1048},{"style":1036},[1049],{"type":998,"value":1050}," {",{"type":993,"tag":1021,"props":1052,"children":1054},{"style":1053},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1055],{"type":998,"value":1056},"'apples'",{"type":993,"tag":1021,"props":1058,"children":1059},{"style":1036},[1060],{"type":998,"value":1061},": ",{"type":993,"tag":1021,"props":1063,"children":1065},{"style":1064},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1066],{"type":998,"value":1067},"50",{"type":993,"tag":1021,"props":1069,"children":1070},{"style":1036},[1071],{"type":998,"value":1072},", ",{"type":993,"tag":1021,"props":1074,"children":1075},{"style":1053},[1076],{"type":998,"value":1077},"'bananas'",{"type":993,"tag":1021,"props":1079,"children":1080},{"style":1036},[1081],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1083,"children":1084},{"style":1064},[1085],{"type":998,"value":1086},"30",{"type":993,"tag":1021,"props":1088,"children":1089},{"style":1036},[1090],{"type":998,"value":1091},"}\n",{"type":993,"tag":1021,"props":1093,"children":1094},{"class":1023,"line":36},[1095,1100,1105,1110],{"type":993,"tag":1021,"props":1096,"children":1097},{"style":1064},[1098],{"type":998,"value":1099},"print",{"type":993,"tag":1021,"props":1101,"children":1102},{"style":1036},[1103],{"type":998,"value":1104},"(",{"type":993,"tag":1021,"props":1106,"children":1107},{"style":1053},[1108],{"type":998,"value":1109},"\"Original:\"",{"type":993,"tag":1021,"props":1111,"children":1112},{"style":1036},[1113],{"type":998,"value":1114},", inventory)\n",{"type":993,"tag":1021,"props":1116,"children":1117},{"class":1023,"line":45},[1118],{"type":993,"tag":1021,"props":1119,"children":1120},{"emptyLinePlaceholder":13},[1121],{"type":998,"value":1122},"\n",{"type":993,"tag":1021,"props":1124,"children":1125},{"class":1023,"line":54},[1126],{"type":993,"tag":1021,"props":1127,"children":1128},{"style":1027},[1129],{"type":998,"value":1130},"# Add new item\n",{"type":993,"tag":1021,"props":1132,"children":1133},{"class":1023,"line":63},[1134,1139,1144,1149,1153],{"type":993,"tag":1021,"props":1135,"children":1136},{"style":1036},[1137],{"type":998,"value":1138},"inventory[",{"type":993,"tag":1021,"props":1140,"children":1141},{"style":1053},[1142],{"type":998,"value":1143},"'oranges'",{"type":993,"tag":1021,"props":1145,"children":1146},{"style":1036},[1147],{"type":998,"value":1148},"] ",{"type":993,"tag":1021,"props":1150,"children":1151},{"style":1042},[1152],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1154,"children":1155},{"style":1064},[1156],{"type":998,"value":1157}," 25\n",{"type":993,"tag":1021,"props":1159,"children":1160},{"class":1023,"line":72},[1161,1165,1169,1174],{"type":993,"tag":1021,"props":1162,"children":1163},{"style":1064},[1164],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1166,"children":1167},{"style":1036},[1168],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1170,"children":1171},{"style":1053},[1172],{"type":998,"value":1173},"\"After adding oranges:\"",{"type":993,"tag":1021,"props":1175,"children":1176},{"style":1036},[1177],{"type":998,"value":1114},{"type":993,"tag":1021,"props":1179,"children":1180},{"class":1023,"line":81},[1181],{"type":993,"tag":1021,"props":1182,"children":1183},{"emptyLinePlaceholder":13},[1184],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1186,"children":1187},{"class":1023,"line":91},[1188],{"type":993,"tag":1021,"props":1189,"children":1190},{"style":1027},[1191],{"type":998,"value":1192},"# Update existing item\n",{"type":993,"tag":1021,"props":1194,"children":1195},{"class":1023,"line":100},[1196,1200,1204,1208,1212],{"type":993,"tag":1021,"props":1197,"children":1198},{"style":1036},[1199],{"type":998,"value":1138},{"type":993,"tag":1021,"props":1201,"children":1202},{"style":1053},[1203],{"type":998,"value":1056},{"type":993,"tag":1021,"props":1205,"children":1206},{"style":1036},[1207],{"type":998,"value":1148},{"type":993,"tag":1021,"props":1209,"children":1210},{"style":1042},[1211],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1213,"children":1214},{"style":1064},[1215],{"type":998,"value":1216}," 45\n",{"type":993,"tag":1021,"props":1218,"children":1219},{"class":1023,"line":109},[1220,1224,1228,1233],{"type":993,"tag":1021,"props":1221,"children":1222},{"style":1064},[1223],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1225,"children":1226},{"style":1036},[1227],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1229,"children":1230},{"style":1053},[1231],{"type":998,"value":1232},"\"After updating apples:\"",{"type":993,"tag":1021,"props":1234,"children":1235},{"style":1036},[1236],{"type":998,"value":1114},{"type":993,"tag":1238,"props":1239,"children":1241},"h2",{"id":1240},"direct-assignment",[1242],{"type":998,"value":1243},"🎯 Direct Assignment",{"type":993,"tag":1001,"props":1245,"children":1246},{},[1247],{"type":998,"value":1248},"Square bracket notation provides the most straightforward method for adding and updating dictionary values. This approach offers clarity and simplicity for single-item modifications.",{"type":993,"tag":1007,"props":1250,"children":1251},{},[1252],{"type":993,"tag":1011,"props":1253,"children":1255},{"className":1013,"code":1254,"language":6,"meta":8,"style":8},"student_grades = {'math': 85, 'science': 92}\n\n# Add new subject\nstudent_grades['english'] = 88\nprint(\"Added English:\", student_grades)\n\n# Update existing grade\nstudent_grades['math'] = 90\nprint(\"Updated math grade:\", student_grades)\n\n# Overwrite completely\nstudent_grades['science'] = 95\nprint(\"Final grades:\", student_grades)\n",[1256],{"type":993,"tag":1017,"props":1257,"children":1258},{"__ignoreMap":8},[1259,1311,1318,1326,1352,1373,1380,1388,1412,1432,1439,1447,1471],{"type":993,"tag":1021,"props":1260,"children":1261},{"class":1023,"line":12},[1262,1267,1271,1275,1280,1284,1289,1293,1298,1302,1307],{"type":993,"tag":1021,"props":1263,"children":1264},{"style":1036},[1265],{"type":998,"value":1266},"student_grades ",{"type":993,"tag":1021,"props":1268,"children":1269},{"style":1042},[1270],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1272,"children":1273},{"style":1036},[1274],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1276,"children":1277},{"style":1053},[1278],{"type":998,"value":1279},"'math'",{"type":993,"tag":1021,"props":1281,"children":1282},{"style":1036},[1283],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1285,"children":1286},{"style":1064},[1287],{"type":998,"value":1288},"85",{"type":993,"tag":1021,"props":1290,"children":1291},{"style":1036},[1292],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1294,"children":1295},{"style":1053},[1296],{"type":998,"value":1297},"'science'",{"type":993,"tag":1021,"props":1299,"children":1300},{"style":1036},[1301],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1303,"children":1304},{"style":1064},[1305],{"type":998,"value":1306},"92",{"type":993,"tag":1021,"props":1308,"children":1309},{"style":1036},[1310],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1312,"children":1313},{"class":1023,"line":27},[1314],{"type":993,"tag":1021,"props":1315,"children":1316},{"emptyLinePlaceholder":13},[1317],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1319,"children":1320},{"class":1023,"line":36},[1321],{"type":993,"tag":1021,"props":1322,"children":1323},{"style":1027},[1324],{"type":998,"value":1325},"# Add new subject\n",{"type":993,"tag":1021,"props":1327,"children":1328},{"class":1023,"line":45},[1329,1334,1339,1343,1347],{"type":993,"tag":1021,"props":1330,"children":1331},{"style":1036},[1332],{"type":998,"value":1333},"student_grades[",{"type":993,"tag":1021,"props":1335,"children":1336},{"style":1053},[1337],{"type":998,"value":1338},"'english'",{"type":993,"tag":1021,"props":1340,"children":1341},{"style":1036},[1342],{"type":998,"value":1148},{"type":993,"tag":1021,"props":1344,"children":1345},{"style":1042},[1346],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1348,"children":1349},{"style":1064},[1350],{"type":998,"value":1351}," 88\n",{"type":993,"tag":1021,"props":1353,"children":1354},{"class":1023,"line":54},[1355,1359,1363,1368],{"type":993,"tag":1021,"props":1356,"children":1357},{"style":1064},[1358],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1360,"children":1361},{"style":1036},[1362],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1364,"children":1365},{"style":1053},[1366],{"type":998,"value":1367},"\"Added English:\"",{"type":993,"tag":1021,"props":1369,"children":1370},{"style":1036},[1371],{"type":998,"value":1372},", student_grades)\n",{"type":993,"tag":1021,"props":1374,"children":1375},{"class":1023,"line":63},[1376],{"type":993,"tag":1021,"props":1377,"children":1378},{"emptyLinePlaceholder":13},[1379],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1381,"children":1382},{"class":1023,"line":72},[1383],{"type":993,"tag":1021,"props":1384,"children":1385},{"style":1027},[1386],{"type":998,"value":1387},"# Update existing grade\n",{"type":993,"tag":1021,"props":1389,"children":1390},{"class":1023,"line":81},[1391,1395,1399,1403,1407],{"type":993,"tag":1021,"props":1392,"children":1393},{"style":1036},[1394],{"type":998,"value":1333},{"type":993,"tag":1021,"props":1396,"children":1397},{"style":1053},[1398],{"type":998,"value":1279},{"type":993,"tag":1021,"props":1400,"children":1401},{"style":1036},[1402],{"type":998,"value":1148},{"type":993,"tag":1021,"props":1404,"children":1405},{"style":1042},[1406],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1408,"children":1409},{"style":1064},[1410],{"type":998,"value":1411}," 90\n",{"type":993,"tag":1021,"props":1413,"children":1414},{"class":1023,"line":91},[1415,1419,1423,1428],{"type":993,"tag":1021,"props":1416,"children":1417},{"style":1064},[1418],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1420,"children":1421},{"style":1036},[1422],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1424,"children":1425},{"style":1053},[1426],{"type":998,"value":1427},"\"Updated math grade:\"",{"type":993,"tag":1021,"props":1429,"children":1430},{"style":1036},[1431],{"type":998,"value":1372},{"type":993,"tag":1021,"props":1433,"children":1434},{"class":1023,"line":100},[1435],{"type":993,"tag":1021,"props":1436,"children":1437},{"emptyLinePlaceholder":13},[1438],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1440,"children":1441},{"class":1023,"line":109},[1442],{"type":993,"tag":1021,"props":1443,"children":1444},{"style":1027},[1445],{"type":998,"value":1446},"# Overwrite completely\n",{"type":993,"tag":1021,"props":1448,"children":1449},{"class":1023,"line":118},[1450,1454,1458,1462,1466],{"type":993,"tag":1021,"props":1451,"children":1452},{"style":1036},[1453],{"type":998,"value":1333},{"type":993,"tag":1021,"props":1455,"children":1456},{"style":1053},[1457],{"type":998,"value":1297},{"type":993,"tag":1021,"props":1459,"children":1460},{"style":1036},[1461],{"type":998,"value":1148},{"type":993,"tag":1021,"props":1463,"children":1464},{"style":1042},[1465],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1467,"children":1468},{"style":1064},[1469],{"type":998,"value":1470}," 95\n",{"type":993,"tag":1021,"props":1472,"children":1473},{"class":1023,"line":127},[1474,1478,1482,1487],{"type":993,"tag":1021,"props":1475,"children":1476},{"style":1064},[1477],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1479,"children":1480},{"style":1036},[1481],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1483,"children":1484},{"style":1053},[1485],{"type":998,"value":1486},"\"Final grades:\"",{"type":993,"tag":1021,"props":1488,"children":1489},{"style":1036},[1490],{"type":998,"value":1372},{"type":993,"tag":1492,"props":1493,"children":1497},"info-box",{"emoji":1494,"title":1495,"type":1496},"📝","Direct Assignment Behavior","info",[1498,1509,1519,1529],{"type":993,"tag":1001,"props":1499,"children":1500},{},[1501,1507],{"type":993,"tag":1502,"props":1503,"children":1504},"strong",{},[1505],{"type":998,"value":1506},"Simple Syntax:",{"type":998,"value":1508}," Uses familiar square bracket notation for immediate understanding.",{"type":993,"tag":1001,"props":1510,"children":1511},{},[1512,1517],{"type":993,"tag":1502,"props":1513,"children":1514},{},[1515],{"type":998,"value":1516},"Overwrite Safety:",{"type":998,"value":1518}," Always overwrites existing values without warning or confirmation.",{"type":993,"tag":1001,"props":1520,"children":1521},{},[1522,1527],{"type":993,"tag":1502,"props":1523,"children":1524},{},[1525],{"type":998,"value":1526},"New Key Creation:",{"type":998,"value":1528}," Automatically creates new keys if they don't exist in the dictionary.",{"type":993,"tag":1001,"props":1530,"children":1531},{},[1532,1537],{"type":993,"tag":1502,"props":1533,"children":1534},{},[1535],{"type":998,"value":1536},"Performance:",{"type":998,"value":1538}," O(1) average time complexity for single-item updates.",{"type":993,"tag":1238,"props":1540,"children":1542},{"id":1541},"the-update-method",[1543],{"type":998,"value":1544},"⚡ The update() Method",{"type":993,"tag":1001,"props":1546,"children":1547},{},[1548,1550,1556],{"type":998,"value":1549},"The ",{"type":993,"tag":1017,"props":1551,"children":1553},{"className":1552},[],[1554],{"type":998,"value":1555},"update()",{"type":998,"value":1557}," method efficiently merges multiple key-value pairs into existing dictionaries. This bulk operation reduces code repetition and improves performance for multiple updates.",{"type":993,"tag":1559,"props":1560,"children":1562},"h3",{"id":1561},"from-dictionary-objects",[1563],{"type":998,"value":1564},"From Dictionary Objects",{"type":993,"tag":1001,"props":1566,"children":1567},{},[1568],{"type":998,"value":1569},"Dictionary-to-dictionary updates provide clean syntax for merging configuration data and combining multiple data sources.",{"type":993,"tag":1007,"props":1571,"children":1572},{},[1573],{"type":993,"tag":1011,"props":1574,"children":1576},{"className":1013,"code":1575,"language":6,"meta":8,"style":8},"user_profile = {'name': 'Alice', 'age': 25}\nadditional_info = {'email': 'alice@example.com', 'city': 'New York', 'age': 26}\n\nprint(\"Before update:\", user_profile)\nuser_profile.update(additional_info)\nprint(\"After update:\", user_profile)\n",[1577],{"type":993,"tag":1017,"props":1578,"children":1579},{"__ignoreMap":8},[1580,1632,1701,1708,1729,1737],{"type":993,"tag":1021,"props":1581,"children":1582},{"class":1023,"line":12},[1583,1588,1592,1596,1601,1605,1610,1614,1619,1623,1628],{"type":993,"tag":1021,"props":1584,"children":1585},{"style":1036},[1586],{"type":998,"value":1587},"user_profile ",{"type":993,"tag":1021,"props":1589,"children":1590},{"style":1042},[1591],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1593,"children":1594},{"style":1036},[1595],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1597,"children":1598},{"style":1053},[1599],{"type":998,"value":1600},"'name'",{"type":993,"tag":1021,"props":1602,"children":1603},{"style":1036},[1604],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1606,"children":1607},{"style":1053},[1608],{"type":998,"value":1609},"'Alice'",{"type":993,"tag":1021,"props":1611,"children":1612},{"style":1036},[1613],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1615,"children":1616},{"style":1053},[1617],{"type":998,"value":1618},"'age'",{"type":993,"tag":1021,"props":1620,"children":1621},{"style":1036},[1622],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1624,"children":1625},{"style":1064},[1626],{"type":998,"value":1627},"25",{"type":993,"tag":1021,"props":1629,"children":1630},{"style":1036},[1631],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1633,"children":1634},{"class":1023,"line":27},[1635,1640,1644,1648,1653,1657,1662,1666,1671,1675,1680,1684,1688,1692,1697],{"type":993,"tag":1021,"props":1636,"children":1637},{"style":1036},[1638],{"type":998,"value":1639},"additional_info ",{"type":993,"tag":1021,"props":1641,"children":1642},{"style":1042},[1643],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1645,"children":1646},{"style":1036},[1647],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1649,"children":1650},{"style":1053},[1651],{"type":998,"value":1652},"'email'",{"type":993,"tag":1021,"props":1654,"children":1655},{"style":1036},[1656],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1658,"children":1659},{"style":1053},[1660],{"type":998,"value":1661},"'alice@example.com'",{"type":993,"tag":1021,"props":1663,"children":1664},{"style":1036},[1665],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1667,"children":1668},{"style":1053},[1669],{"type":998,"value":1670},"'city'",{"type":993,"tag":1021,"props":1672,"children":1673},{"style":1036},[1674],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1676,"children":1677},{"style":1053},[1678],{"type":998,"value":1679},"'New York'",{"type":993,"tag":1021,"props":1681,"children":1682},{"style":1036},[1683],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1685,"children":1686},{"style":1053},[1687],{"type":998,"value":1618},{"type":993,"tag":1021,"props":1689,"children":1690},{"style":1036},[1691],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1693,"children":1694},{"style":1064},[1695],{"type":998,"value":1696},"26",{"type":993,"tag":1021,"props":1698,"children":1699},{"style":1036},[1700],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1702,"children":1703},{"class":1023,"line":36},[1704],{"type":993,"tag":1021,"props":1705,"children":1706},{"emptyLinePlaceholder":13},[1707],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1709,"children":1710},{"class":1023,"line":45},[1711,1715,1719,1724],{"type":993,"tag":1021,"props":1712,"children":1713},{"style":1064},[1714],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1716,"children":1717},{"style":1036},[1718],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1720,"children":1721},{"style":1053},[1722],{"type":998,"value":1723},"\"Before update:\"",{"type":993,"tag":1021,"props":1725,"children":1726},{"style":1036},[1727],{"type":998,"value":1728},", user_profile)\n",{"type":993,"tag":1021,"props":1730,"children":1731},{"class":1023,"line":54},[1732],{"type":993,"tag":1021,"props":1733,"children":1734},{"style":1036},[1735],{"type":998,"value":1736},"user_profile.update(additional_info)\n",{"type":993,"tag":1021,"props":1738,"children":1739},{"class":1023,"line":63},[1740,1744,1748,1753],{"type":993,"tag":1021,"props":1741,"children":1742},{"style":1064},[1743],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1745,"children":1746},{"style":1036},[1747],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1749,"children":1750},{"style":1053},[1751],{"type":998,"value":1752},"\"After update:\"",{"type":993,"tag":1021,"props":1754,"children":1755},{"style":1036},[1756],{"type":998,"value":1728},{"type":993,"tag":1559,"props":1758,"children":1760},{"id":1759},"from-keyword-arguments",[1761],{"type":998,"value":1762},"From Keyword Arguments",{"type":993,"tag":1001,"props":1764,"children":1765},{},[1766],{"type":998,"value":1767},"Keyword argument updates offer convenient syntax for quick modifications with string keys and known values.",{"type":993,"tag":1007,"props":1769,"children":1770},{},[1771],{"type":993,"tag":1011,"props":1772,"children":1774},{"className":1013,"code":1773,"language":6,"meta":8,"style":8},"settings = {'theme': 'light', 'font_size': 12}\n\nprint(\"Original settings:\", settings)\nsettings.update(theme='dark', font_size=14, auto_save=True)\nprint(\"Updated settings:\", settings)\n",[1775],{"type":993,"tag":1017,"props":1776,"children":1777},{"__ignoreMap":8},[1778,1830,1837,1858,1922],{"type":993,"tag":1021,"props":1779,"children":1780},{"class":1023,"line":12},[1781,1786,1790,1794,1799,1803,1808,1812,1817,1821,1826],{"type":993,"tag":1021,"props":1782,"children":1783},{"style":1036},[1784],{"type":998,"value":1785},"settings ",{"type":993,"tag":1021,"props":1787,"children":1788},{"style":1042},[1789],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1791,"children":1792},{"style":1036},[1793],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1795,"children":1796},{"style":1053},[1797],{"type":998,"value":1798},"'theme'",{"type":993,"tag":1021,"props":1800,"children":1801},{"style":1036},[1802],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1804,"children":1805},{"style":1053},[1806],{"type":998,"value":1807},"'light'",{"type":993,"tag":1021,"props":1809,"children":1810},{"style":1036},[1811],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1813,"children":1814},{"style":1053},[1815],{"type":998,"value":1816},"'font_size'",{"type":993,"tag":1021,"props":1818,"children":1819},{"style":1036},[1820],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1822,"children":1823},{"style":1064},[1824],{"type":998,"value":1825},"12",{"type":993,"tag":1021,"props":1827,"children":1828},{"style":1036},[1829],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1831,"children":1832},{"class":1023,"line":27},[1833],{"type":993,"tag":1021,"props":1834,"children":1835},{"emptyLinePlaceholder":13},[1836],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1838,"children":1839},{"class":1023,"line":36},[1840,1844,1848,1853],{"type":993,"tag":1021,"props":1841,"children":1842},{"style":1064},[1843],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1845,"children":1846},{"style":1036},[1847],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1849,"children":1850},{"style":1053},[1851],{"type":998,"value":1852},"\"Original settings:\"",{"type":993,"tag":1021,"props":1854,"children":1855},{"style":1036},[1856],{"type":998,"value":1857},", settings)\n",{"type":993,"tag":1021,"props":1859,"children":1860},{"class":1023,"line":45},[1861,1866,1872,1876,1881,1885,1890,1894,1899,1903,1908,1912,1917],{"type":993,"tag":1021,"props":1862,"children":1863},{"style":1036},[1864],{"type":998,"value":1865},"settings.update(",{"type":993,"tag":1021,"props":1867,"children":1869},{"style":1868},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1870],{"type":998,"value":1871},"theme",{"type":993,"tag":1021,"props":1873,"children":1874},{"style":1042},[1875],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1877,"children":1878},{"style":1053},[1879],{"type":998,"value":1880},"'dark'",{"type":993,"tag":1021,"props":1882,"children":1883},{"style":1036},[1884],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1886,"children":1887},{"style":1868},[1888],{"type":998,"value":1889},"font_size",{"type":993,"tag":1021,"props":1891,"children":1892},{"style":1042},[1893],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1895,"children":1896},{"style":1064},[1897],{"type":998,"value":1898},"14",{"type":993,"tag":1021,"props":1900,"children":1901},{"style":1036},[1902],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1904,"children":1905},{"style":1868},[1906],{"type":998,"value":1907},"auto_save",{"type":993,"tag":1021,"props":1909,"children":1910},{"style":1042},[1911],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1913,"children":1914},{"style":1064},[1915],{"type":998,"value":1916},"True",{"type":993,"tag":1021,"props":1918,"children":1919},{"style":1036},[1920],{"type":998,"value":1921},")\n",{"type":993,"tag":1021,"props":1923,"children":1924},{"class":1023,"line":54},[1925,1929,1933,1938],{"type":993,"tag":1021,"props":1926,"children":1927},{"style":1064},[1928],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1930,"children":1931},{"style":1036},[1932],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1934,"children":1935},{"style":1053},[1936],{"type":998,"value":1937},"\"Updated settings:\"",{"type":993,"tag":1021,"props":1939,"children":1940},{"style":1036},[1941],{"type":998,"value":1857},{"type":993,"tag":1559,"props":1943,"children":1945},{"id":1944},"from-key-value-pairs",[1946],{"type":998,"value":1947},"From Key-Value Pairs",{"type":993,"tag":1001,"props":1949,"children":1950},{},[1951],{"type":998,"value":1952},"Sequence-based updates enable dynamic data processing from various sources like CSV files or API responses.",{"type":993,"tag":1007,"props":1954,"children":1955},{},[1956],{"type":993,"tag":1011,"props":1957,"children":1959},{"className":1013,"code":1958,"language":6,"meta":8,"style":8},"product_info = {'name': 'Laptop', 'price': 999}\n\n# Update from list of tuples\nupdates = [('category', 'Electronics'), ('warranty', '2 years'), ('price', 899)]\nproduct_info.update(updates)\n\nprint(\"Updated product:\", product_info)\n",[1960],{"type":993,"tag":1017,"props":1961,"children":1962},{"__ignoreMap":8},[1963,2014,2021,2029,2101,2109,2116],{"type":993,"tag":1021,"props":1964,"children":1965},{"class":1023,"line":12},[1966,1971,1975,1979,1983,1987,1992,1996,2001,2005,2010],{"type":993,"tag":1021,"props":1967,"children":1968},{"style":1036},[1969],{"type":998,"value":1970},"product_info ",{"type":993,"tag":1021,"props":1972,"children":1973},{"style":1042},[1974],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1976,"children":1977},{"style":1036},[1978],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1980,"children":1981},{"style":1053},[1982],{"type":998,"value":1600},{"type":993,"tag":1021,"props":1984,"children":1985},{"style":1036},[1986],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1988,"children":1989},{"style":1053},[1990],{"type":998,"value":1991},"'Laptop'",{"type":993,"tag":1021,"props":1993,"children":1994},{"style":1036},[1995],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1997,"children":1998},{"style":1053},[1999],{"type":998,"value":2000},"'price'",{"type":993,"tag":1021,"props":2002,"children":2003},{"style":1036},[2004],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2006,"children":2007},{"style":1064},[2008],{"type":998,"value":2009},"999",{"type":993,"tag":1021,"props":2011,"children":2012},{"style":1036},[2013],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2015,"children":2016},{"class":1023,"line":27},[2017],{"type":993,"tag":1021,"props":2018,"children":2019},{"emptyLinePlaceholder":13},[2020],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2022,"children":2023},{"class":1023,"line":36},[2024],{"type":993,"tag":1021,"props":2025,"children":2026},{"style":1027},[2027],{"type":998,"value":2028},"# Update from list of tuples\n",{"type":993,"tag":1021,"props":2030,"children":2031},{"class":1023,"line":45},[2032,2037,2041,2046,2051,2055,2060,2065,2070,2074,2079,2083,2087,2091,2096],{"type":993,"tag":1021,"props":2033,"children":2034},{"style":1036},[2035],{"type":998,"value":2036},"updates ",{"type":993,"tag":1021,"props":2038,"children":2039},{"style":1042},[2040],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2042,"children":2043},{"style":1036},[2044],{"type":998,"value":2045}," [(",{"type":993,"tag":1021,"props":2047,"children":2048},{"style":1053},[2049],{"type":998,"value":2050},"'category'",{"type":993,"tag":1021,"props":2052,"children":2053},{"style":1036},[2054],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2056,"children":2057},{"style":1053},[2058],{"type":998,"value":2059},"'Electronics'",{"type":993,"tag":1021,"props":2061,"children":2062},{"style":1036},[2063],{"type":998,"value":2064},"), (",{"type":993,"tag":1021,"props":2066,"children":2067},{"style":1053},[2068],{"type":998,"value":2069},"'warranty'",{"type":993,"tag":1021,"props":2071,"children":2072},{"style":1036},[2073],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2075,"children":2076},{"style":1053},[2077],{"type":998,"value":2078},"'2 years'",{"type":993,"tag":1021,"props":2080,"children":2081},{"style":1036},[2082],{"type":998,"value":2064},{"type":993,"tag":1021,"props":2084,"children":2085},{"style":1053},[2086],{"type":998,"value":2000},{"type":993,"tag":1021,"props":2088,"children":2089},{"style":1036},[2090],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2092,"children":2093},{"style":1064},[2094],{"type":998,"value":2095},"899",{"type":993,"tag":1021,"props":2097,"children":2098},{"style":1036},[2099],{"type":998,"value":2100},")]\n",{"type":993,"tag":1021,"props":2102,"children":2103},{"class":1023,"line":54},[2104],{"type":993,"tag":1021,"props":2105,"children":2106},{"style":1036},[2107],{"type":998,"value":2108},"product_info.update(updates)\n",{"type":993,"tag":1021,"props":2110,"children":2111},{"class":1023,"line":63},[2112],{"type":993,"tag":1021,"props":2113,"children":2114},{"emptyLinePlaceholder":13},[2115],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2117,"children":2118},{"class":1023,"line":72},[2119,2123,2127,2132],{"type":993,"tag":1021,"props":2120,"children":2121},{"style":1064},[2122],{"type":998,"value":1099},{"type":993,"tag":1021,"props":2124,"children":2125},{"style":1036},[2126],{"type":998,"value":1104},{"type":993,"tag":1021,"props":2128,"children":2129},{"style":1053},[2130],{"type":998,"value":2131},"\"Updated product:\"",{"type":993,"tag":1021,"props":2133,"children":2134},{"style":1036},[2135],{"type":998,"value":2136},", product_info)\n",{"type":993,"tag":1238,"props":2138,"children":2140},{"id":2139},"conditional-updates",[2141],{"type":998,"value":2142},"🚀 Conditional Updates",{"type":993,"tag":1001,"props":2144,"children":2145},{},[2146],{"type":998,"value":2147},"Conditional modification patterns prevent unwanted overwrites and enable sophisticated data management logic.",{"type":993,"tag":1559,"props":2149,"children":2151},{"id":2150},"update-if-key-exists",[2152],{"type":998,"value":2153},"Update if Key Exists",{"type":993,"tag":1001,"props":2155,"children":2156},{},[2157],{"type":998,"value":2158},"Existing-key updates preserve data integrity by modifying only established dictionary entries.",{"type":993,"tag":1007,"props":2160,"children":2161},{},[2162],{"type":993,"tag":1011,"props":2163,"children":2165},{"className":1013,"code":2164,"language":6,"meta":8,"style":8},"user_data = {'username': 'john_doe', 'email': 'john@example.com'}\n\n# Update only if key exists\nif 'email' in user_data:\n    user_data['email'] = 'john.doe@newdomain.com'\n\n# Won't update - key doesn't exist\nif 'phone' in user_data:\n    user_data['phone'] = '555-1234'\n\nprint(\"Selective update:\", user_data)\n",[2166],{"type":993,"tag":1017,"props":2167,"children":2168},{"__ignoreMap":8},[2169,2220,2227,2235,2258,2283,2290,2298,2318,2343,2350],{"type":993,"tag":1021,"props":2170,"children":2171},{"class":1023,"line":12},[2172,2177,2181,2185,2190,2194,2199,2203,2207,2211,2216],{"type":993,"tag":1021,"props":2173,"children":2174},{"style":1036},[2175],{"type":998,"value":2176},"user_data ",{"type":993,"tag":1021,"props":2178,"children":2179},{"style":1042},[2180],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2182,"children":2183},{"style":1036},[2184],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2186,"children":2187},{"style":1053},[2188],{"type":998,"value":2189},"'username'",{"type":993,"tag":1021,"props":2191,"children":2192},{"style":1036},[2193],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2195,"children":2196},{"style":1053},[2197],{"type":998,"value":2198},"'john_doe'",{"type":993,"tag":1021,"props":2200,"children":2201},{"style":1036},[2202],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2204,"children":2205},{"style":1053},[2206],{"type":998,"value":1652},{"type":993,"tag":1021,"props":2208,"children":2209},{"style":1036},[2210],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2212,"children":2213},{"style":1053},[2214],{"type":998,"value":2215},"'john@example.com'",{"type":993,"tag":1021,"props":2217,"children":2218},{"style":1036},[2219],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2221,"children":2222},{"class":1023,"line":27},[2223],{"type":993,"tag":1021,"props":2224,"children":2225},{"emptyLinePlaceholder":13},[2226],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2228,"children":2229},{"class":1023,"line":36},[2230],{"type":993,"tag":1021,"props":2231,"children":2232},{"style":1027},[2233],{"type":998,"value":2234},"# Update only if key exists\n",{"type":993,"tag":1021,"props":2236,"children":2237},{"class":1023,"line":45},[2238,2243,2248,2253],{"type":993,"tag":1021,"props":2239,"children":2240},{"style":1042},[2241],{"type":998,"value":2242},"if",{"type":993,"tag":1021,"props":2244,"children":2245},{"style":1053},[2246],{"type":998,"value":2247}," 'email'",{"type":993,"tag":1021,"props":2249,"children":2250},{"style":1042},[2251],{"type":998,"value":2252}," in",{"type":993,"tag":1021,"props":2254,"children":2255},{"style":1036},[2256],{"type":998,"value":2257}," user_data:\n",{"type":993,"tag":1021,"props":2259,"children":2260},{"class":1023,"line":54},[2261,2266,2270,2274,2278],{"type":993,"tag":1021,"props":2262,"children":2263},{"style":1036},[2264],{"type":998,"value":2265},"    user_data[",{"type":993,"tag":1021,"props":2267,"children":2268},{"style":1053},[2269],{"type":998,"value":1652},{"type":993,"tag":1021,"props":2271,"children":2272},{"style":1036},[2273],{"type":998,"value":1148},{"type":993,"tag":1021,"props":2275,"children":2276},{"style":1042},[2277],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2279,"children":2280},{"style":1053},[2281],{"type":998,"value":2282}," 'john.doe@newdomain.com'\n",{"type":993,"tag":1021,"props":2284,"children":2285},{"class":1023,"line":63},[2286],{"type":993,"tag":1021,"props":2287,"children":2288},{"emptyLinePlaceholder":13},[2289],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2291,"children":2292},{"class":1023,"line":72},[2293],{"type":993,"tag":1021,"props":2294,"children":2295},{"style":1027},[2296],{"type":998,"value":2297},"# Won't update - key doesn't exist\n",{"type":993,"tag":1021,"props":2299,"children":2300},{"class":1023,"line":81},[2301,2305,2310,2314],{"type":993,"tag":1021,"props":2302,"children":2303},{"style":1042},[2304],{"type":998,"value":2242},{"type":993,"tag":1021,"props":2306,"children":2307},{"style":1053},[2308],{"type":998,"value":2309}," 'phone'",{"type":993,"tag":1021,"props":2311,"children":2312},{"style":1042},[2313],{"type":998,"value":2252},{"type":993,"tag":1021,"props":2315,"children":2316},{"style":1036},[2317],{"type":998,"value":2257},{"type":993,"tag":1021,"props":2319,"children":2320},{"class":1023,"line":91},[2321,2325,2330,2334,2338],{"type":993,"tag":1021,"props":2322,"children":2323},{"style":1036},[2324],{"type":998,"value":2265},{"type":993,"tag":1021,"props":2326,"children":2327},{"style":1053},[2328],{"type":998,"value":2329},"'phone'",{"type":993,"tag":1021,"props":2331,"children":2332},{"style":1036},[2333],{"type":998,"value":1148},{"type":993,"tag":1021,"props":2335,"children":2336},{"style":1042},[2337],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2339,"children":2340},{"style":1053},[2341],{"type":998,"value":2342}," '555-1234'\n",{"type":993,"tag":1021,"props":2344,"children":2345},{"class":1023,"line":100},[2346],{"type":993,"tag":1021,"props":2347,"children":2348},{"emptyLinePlaceholder":13},[2349],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2351,"children":2352},{"class":1023,"line":109},[2353,2357,2361,2366],{"type":993,"tag":1021,"props":2354,"children":2355},{"style":1064},[2356],{"type":998,"value":1099},{"type":993,"tag":1021,"props":2358,"children":2359},{"style":1036},[2360],{"type":998,"value":1104},{"type":993,"tag":1021,"props":2362,"children":2363},{"style":1053},[2364],{"type":998,"value":2365},"\"Selective update:\"",{"type":993,"tag":1021,"props":2367,"children":2368},{"style":1036},[2369],{"type":998,"value":2370},", user_data)\n",{"type":993,"tag":1559,"props":2372,"children":2374},{"id":2373},"update-with-default-values",[2375],{"type":998,"value":2376},"Update with Default Values",{"type":993,"tag":1001,"props":2378,"children":2379},{},[2380],{"type":998,"value":2381},"Default value patterns ensure consistent data structure while allowing flexible updates based on data availability.",{"type":993,"tag":1007,"props":2383,"children":2384},{},[2385],{"type":993,"tag":1011,"props":2386,"children":2388},{"className":1013,"code":2387,"language":6,"meta":8,"style":8},"def update_user_preferences(prefs, updates):\n    \"\"\"Update preferences with fallback defaults\"\"\"\n    defaults = {'theme': 'light', 'notifications': True, 'language': 'en'}\n    \n    # Ensure all defaults exist\n    for key, default_value in defaults.items():\n        if key not in prefs:\n            prefs[key] = default_value\n    \n    # Apply updates\n    prefs.update(updates)\n    return prefs\n\npreferences = {'theme': 'dark'}\nnew_prefs = {'notifications': False, 'font_size': 14}\n\nresult = update_user_preferences(preferences, new_prefs)\nprint(\"Updated preferences:\", result)\n",[2389],{"type":993,"tag":1017,"props":2390,"children":2391},{"__ignoreMap":8},[2392,2411,2419,2486,2494,2502,2525,2552,2569,2576,2584,2592,2605,2612,2644,2693,2700,2717],{"type":993,"tag":1021,"props":2393,"children":2394},{"class":1023,"line":12},[2395,2400,2406],{"type":993,"tag":1021,"props":2396,"children":2397},{"style":1042},[2398],{"type":998,"value":2399},"def",{"type":993,"tag":1021,"props":2401,"children":2403},{"style":2402},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[2404],{"type":998,"value":2405}," update_user_preferences",{"type":993,"tag":1021,"props":2407,"children":2408},{"style":1036},[2409],{"type":998,"value":2410},"(prefs, updates):\n",{"type":993,"tag":1021,"props":2412,"children":2413},{"class":1023,"line":27},[2414],{"type":993,"tag":1021,"props":2415,"children":2416},{"style":1053},[2417],{"type":998,"value":2418},"    \"\"\"Update preferences with fallback defaults\"\"\"\n",{"type":993,"tag":1021,"props":2420,"children":2421},{"class":1023,"line":36},[2422,2427,2431,2435,2439,2443,2447,2451,2456,2460,2464,2468,2473,2477,2482],{"type":993,"tag":1021,"props":2423,"children":2424},{"style":1036},[2425],{"type":998,"value":2426},"    defaults ",{"type":993,"tag":1021,"props":2428,"children":2429},{"style":1042},[2430],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2432,"children":2433},{"style":1036},[2434],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2436,"children":2437},{"style":1053},[2438],{"type":998,"value":1798},{"type":993,"tag":1021,"props":2440,"children":2441},{"style":1036},[2442],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2444,"children":2445},{"style":1053},[2446],{"type":998,"value":1807},{"type":993,"tag":1021,"props":2448,"children":2449},{"style":1036},[2450],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2452,"children":2453},{"style":1053},[2454],{"type":998,"value":2455},"'notifications'",{"type":993,"tag":1021,"props":2457,"children":2458},{"style":1036},[2459],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2461,"children":2462},{"style":1064},[2463],{"type":998,"value":1916},{"type":993,"tag":1021,"props":2465,"children":2466},{"style":1036},[2467],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2469,"children":2470},{"style":1053},[2471],{"type":998,"value":2472},"'language'",{"type":993,"tag":1021,"props":2474,"children":2475},{"style":1036},[2476],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2478,"children":2479},{"style":1053},[2480],{"type":998,"value":2481},"'en'",{"type":993,"tag":1021,"props":2483,"children":2484},{"style":1036},[2485],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2487,"children":2488},{"class":1023,"line":45},[2489],{"type":993,"tag":1021,"props":2490,"children":2491},{"style":1036},[2492],{"type":998,"value":2493},"    \n",{"type":993,"tag":1021,"props":2495,"children":2496},{"class":1023,"line":54},[2497],{"type":993,"tag":1021,"props":2498,"children":2499},{"style":1027},[2500],{"type":998,"value":2501},"    # Ensure all defaults exist\n",{"type":993,"tag":1021,"props":2503,"children":2504},{"class":1023,"line":63},[2505,2510,2515,2520],{"type":993,"tag":1021,"props":2506,"children":2507},{"style":1042},[2508],{"type":998,"value":2509},"    for",{"type":993,"tag":1021,"props":2511,"children":2512},{"style":1036},[2513],{"type":998,"value":2514}," key, default_value ",{"type":993,"tag":1021,"props":2516,"children":2517},{"style":1042},[2518],{"type":998,"value":2519},"in",{"type":993,"tag":1021,"props":2521,"children":2522},{"style":1036},[2523],{"type":998,"value":2524}," defaults.items():\n",{"type":993,"tag":1021,"props":2526,"children":2527},{"class":1023,"line":72},[2528,2533,2538,2543,2547],{"type":993,"tag":1021,"props":2529,"children":2530},{"style":1042},[2531],{"type":998,"value":2532},"        if",{"type":993,"tag":1021,"props":2534,"children":2535},{"style":1036},[2536],{"type":998,"value":2537}," key ",{"type":993,"tag":1021,"props":2539,"children":2540},{"style":1042},[2541],{"type":998,"value":2542},"not",{"type":993,"tag":1021,"props":2544,"children":2545},{"style":1042},[2546],{"type":998,"value":2252},{"type":993,"tag":1021,"props":2548,"children":2549},{"style":1036},[2550],{"type":998,"value":2551}," prefs:\n",{"type":993,"tag":1021,"props":2553,"children":2554},{"class":1023,"line":81},[2555,2560,2564],{"type":993,"tag":1021,"props":2556,"children":2557},{"style":1036},[2558],{"type":998,"value":2559},"            prefs[key] ",{"type":993,"tag":1021,"props":2561,"children":2562},{"style":1042},[2563],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2565,"children":2566},{"style":1036},[2567],{"type":998,"value":2568}," default_value\n",{"type":993,"tag":1021,"props":2570,"children":2571},{"class":1023,"line":91},[2572],{"type":993,"tag":1021,"props":2573,"children":2574},{"style":1036},[2575],{"type":998,"value":2493},{"type":993,"tag":1021,"props":2577,"children":2578},{"class":1023,"line":100},[2579],{"type":993,"tag":1021,"props":2580,"children":2581},{"style":1027},[2582],{"type":998,"value":2583},"    # Apply updates\n",{"type":993,"tag":1021,"props":2585,"children":2586},{"class":1023,"line":109},[2587],{"type":993,"tag":1021,"props":2588,"children":2589},{"style":1036},[2590],{"type":998,"value":2591},"    prefs.update(updates)\n",{"type":993,"tag":1021,"props":2593,"children":2594},{"class":1023,"line":118},[2595,2600],{"type":993,"tag":1021,"props":2596,"children":2597},{"style":1042},[2598],{"type":998,"value":2599},"    return",{"type":993,"tag":1021,"props":2601,"children":2602},{"style":1036},[2603],{"type":998,"value":2604}," prefs\n",{"type":993,"tag":1021,"props":2606,"children":2607},{"class":1023,"line":127},[2608],{"type":993,"tag":1021,"props":2609,"children":2610},{"emptyLinePlaceholder":13},[2611],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2613,"children":2614},{"class":1023,"line":136},[2615,2620,2624,2628,2632,2636,2640],{"type":993,"tag":1021,"props":2616,"children":2617},{"style":1036},[2618],{"type":998,"value":2619},"preferences ",{"type":993,"tag":1021,"props":2621,"children":2622},{"style":1042},[2623],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2625,"children":2626},{"style":1036},[2627],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2629,"children":2630},{"style":1053},[2631],{"type":998,"value":1798},{"type":993,"tag":1021,"props":2633,"children":2634},{"style":1036},[2635],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2637,"children":2638},{"style":1053},[2639],{"type":998,"value":1880},{"type":993,"tag":1021,"props":2641,"children":2642},{"style":1036},[2643],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2645,"children":2646},{"class":1023,"line":146},[2647,2652,2656,2660,2664,2668,2673,2677,2681,2685,2689],{"type":993,"tag":1021,"props":2648,"children":2649},{"style":1036},[2650],{"type":998,"value":2651},"new_prefs ",{"type":993,"tag":1021,"props":2653,"children":2654},{"style":1042},[2655],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2657,"children":2658},{"style":1036},[2659],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2661,"children":2662},{"style":1053},[2663],{"type":998,"value":2455},{"type":993,"tag":1021,"props":2665,"children":2666},{"style":1036},[2667],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2669,"children":2670},{"style":1064},[2671],{"type":998,"value":2672},"False",{"type":993,"tag":1021,"props":2674,"children":2675},{"style":1036},[2676],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2678,"children":2679},{"style":1053},[2680],{"type":998,"value":1816},{"type":993,"tag":1021,"props":2682,"children":2683},{"style":1036},[2684],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2686,"children":2687},{"style":1064},[2688],{"type":998,"value":1898},{"type":993,"tag":1021,"props":2690,"children":2691},{"style":1036},[2692],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2694,"children":2695},{"class":1023,"line":155},[2696],{"type":993,"tag":1021,"props":2697,"children":2698},{"emptyLinePlaceholder":13},[2699],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2701,"children":2702},{"class":1023,"line":164},[2703,2708,2712],{"type":993,"tag":1021,"props":2704,"children":2705},{"style":1036},[2706],{"type":998,"value":2707},"result ",{"type":993,"tag":1021,"props":2709,"children":2710},{"style":1042},[2711],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2713,"children":2714},{"style":1036},[2715],{"type":998,"value":2716}," update_user_preferences(preferences, new_prefs)\n",{"type":993,"tag":1021,"props":2718,"children":2719},{"class":1023,"line":173},[2720,2724,2728,2733],{"type":993,"tag":1021,"props":2721,"children":2722},{"style":1064},[2723],{"type":998,"value":1099},{"type":993,"tag":1021,"props":2725,"children":2726},{"style":1036},[2727],{"type":998,"value":1104},{"type":993,"tag":1021,"props":2729,"children":2730},{"style":1053},[2731],{"type":998,"value":2732},"\"Updated preferences:\"",{"type":993,"tag":1021,"props":2734,"children":2735},{"style":1036},[2736],{"type":998,"value":2737},", result)\n",{"type":993,"tag":1238,"props":2739,"children":2741},{"id":2740},"dictionary-update-methods-comparison",[2742],{"type":998,"value":2743},"📚 Dictionary Update Methods Comparison",{"type":993,"tag":2745,"props":2746,"children":2747},"table",{},[2748,2777],{"type":993,"tag":2749,"props":2750,"children":2751},"thead",{},[2752],{"type":993,"tag":2753,"props":2754,"children":2755},"tr",{},[2756,2762,2767,2772],{"type":993,"tag":2757,"props":2758,"children":2759},"th",{},[2760],{"type":998,"value":2761},"Method",{"type":993,"tag":2757,"props":2763,"children":2764},{},[2765],{"type":998,"value":2766},"Use Case",{"type":993,"tag":2757,"props":2768,"children":2769},{},[2770],{"type":998,"value":2771},"Syntax",{"type":993,"tag":2757,"props":2773,"children":2774},{},[2775],{"type":998,"value":2776},"Behavior",{"type":993,"tag":2778,"props":2779,"children":2780},"tbody",{},[2781,2813,2844,2875],{"type":993,"tag":2753,"props":2782,"children":2783},{},[2784,2794,2799,2808],{"type":993,"tag":2785,"props":2786,"children":2787},"td",{},[2788],{"type":993,"tag":1017,"props":2789,"children":2791},{"className":2790},[],[2792],{"type":998,"value":2793},"dict[key] = value",{"type":993,"tag":2785,"props":2795,"children":2796},{},[2797],{"type":998,"value":2798},"Single updates",{"type":993,"tag":2785,"props":2800,"children":2801},{},[2802],{"type":993,"tag":1017,"props":2803,"children":2805},{"className":2804},[],[2806],{"type":998,"value":2807},"d['key'] = 'value'",{"type":993,"tag":2785,"props":2809,"children":2810},{},[2811],{"type":998,"value":2812},"Creates or overwrites",{"type":993,"tag":2753,"props":2814,"children":2815},{},[2816,2825,2830,2839],{"type":993,"tag":2785,"props":2817,"children":2818},{},[2819],{"type":993,"tag":1017,"props":2820,"children":2822},{"className":2821},[],[2823],{"type":998,"value":2824},"dict.update(other)",{"type":993,"tag":2785,"props":2826,"children":2827},{},[2828],{"type":998,"value":2829},"Bulk from dict",{"type":993,"tag":2785,"props":2831,"children":2832},{},[2833],{"type":993,"tag":1017,"props":2834,"children":2836},{"className":2835},[],[2837],{"type":998,"value":2838},"d.update({'a': 1})",{"type":993,"tag":2785,"props":2840,"children":2841},{},[2842],{"type":998,"value":2843},"Merges dictionaries",{"type":993,"tag":2753,"props":2845,"children":2846},{},[2847,2856,2861,2870],{"type":993,"tag":2785,"props":2848,"children":2849},{},[2850],{"type":993,"tag":1017,"props":2851,"children":2853},{"className":2852},[],[2854],{"type":998,"value":2855},"dict.update(**kwargs)",{"type":993,"tag":2785,"props":2857,"children":2858},{},[2859],{"type":998,"value":2860},"Keyword updates",{"type":993,"tag":2785,"props":2862,"children":2863},{},[2864],{"type":993,"tag":1017,"props":2865,"children":2867},{"className":2866},[],[2868],{"type":998,"value":2869},"d.update(key='value')",{"type":993,"tag":2785,"props":2871,"children":2872},{},[2873],{"type":998,"value":2874},"String keys only",{"type":993,"tag":2753,"props":2876,"children":2877},{},[2878,2887,2892,2901],{"type":993,"tag":2785,"props":2879,"children":2880},{},[2881],{"type":993,"tag":1017,"props":2882,"children":2884},{"className":2883},[],[2885],{"type":998,"value":2886},"dict.update(pairs)",{"type":993,"tag":2785,"props":2888,"children":2889},{},[2890],{"type":998,"value":2891},"From sequences",{"type":993,"tag":2785,"props":2893,"children":2894},{},[2895],{"type":993,"tag":1017,"props":2896,"children":2898},{"className":2897},[],[2899],{"type":998,"value":2900},"d.update([('a', 1)])",{"type":993,"tag":2785,"props":2902,"children":2903},{},[2904],{"type":998,"value":2905},"Flexible data sources",{"type":993,"tag":1238,"props":2907,"children":2909},{"id":2908},"advanced-update-patterns",[2910],{"type":998,"value":2911},"🌟 Advanced Update Patterns",{"type":993,"tag":1559,"props":2913,"children":2915},{"id":2914},"merging-with-custom-logic",[2916],{"type":998,"value":2917},"Merging with Custom Logic",{"type":993,"tag":1001,"props":2919,"children":2920},{},[2921],{"type":998,"value":2922},"Complex merging scenarios require custom logic to handle conflicting keys and preserve important data relationships.",{"type":993,"tag":1007,"props":2924,"children":2925},{},[2926],{"type":993,"tag":1011,"props":2927,"children":2929},{"className":1013,"code":2928,"language":6,"meta":8,"style":8},"def smart_merge(base_dict, update_dict, merge_lists=False):\n    \"\"\"Merge dictionaries with intelligent conflict resolution\"\"\"\n    result = base_dict.copy()\n    \n    for key, value in update_dict.items():\n        if key in result:\n            # Handle list merging\n            if merge_lists and isinstance(result[key], list) and isinstance(value, list):\n                result[key] = result[key] + value\n            # Handle nested dictionaries\n            elif isinstance(result[key], dict) and isinstance(value, dict):\n                result[key] = smart_merge(result[key], value, merge_lists)\n            else:\n                result[key] = value\n        else:\n            result[key] = value\n    \n    return result\n\nbase = {'skills': ['Python'], 'projects': {'web': 2}}\nupdates = {'skills': ['JavaScript'], 'projects': {'mobile': 1}}\n\nmerged = smart_merge(base, updates, merge_lists=True)\nprint(\"Smart merge result:\", merged)\n",[2930],{"type":993,"tag":1017,"props":2931,"children":2932},{"__ignoreMap":8},[2933,2963,2971,2988,2995,3016,3036,3044,3103,3130,3138,3183,3199,3212,3227,3239,3255,3262,3274,3281,3346,3404,3411,3445],{"type":993,"tag":1021,"props":2934,"children":2935},{"class":1023,"line":12},[2936,2940,2945,2950,2954,2958],{"type":993,"tag":1021,"props":2937,"children":2938},{"style":1042},[2939],{"type":998,"value":2399},{"type":993,"tag":1021,"props":2941,"children":2942},{"style":2402},[2943],{"type":998,"value":2944}," smart_merge",{"type":993,"tag":1021,"props":2946,"children":2947},{"style":1036},[2948],{"type":998,"value":2949},"(base_dict, update_dict, merge_lists",{"type":993,"tag":1021,"props":2951,"children":2952},{"style":1042},[2953],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2955,"children":2956},{"style":1064},[2957],{"type":998,"value":2672},{"type":993,"tag":1021,"props":2959,"children":2960},{"style":1036},[2961],{"type":998,"value":2962},"):\n",{"type":993,"tag":1021,"props":2964,"children":2965},{"class":1023,"line":27},[2966],{"type":993,"tag":1021,"props":2967,"children":2968},{"style":1053},[2969],{"type":998,"value":2970},"    \"\"\"Merge dictionaries with intelligent conflict resolution\"\"\"\n",{"type":993,"tag":1021,"props":2972,"children":2973},{"class":1023,"line":36},[2974,2979,2983],{"type":993,"tag":1021,"props":2975,"children":2976},{"style":1036},[2977],{"type":998,"value":2978},"    result ",{"type":993,"tag":1021,"props":2980,"children":2981},{"style":1042},[2982],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2984,"children":2985},{"style":1036},[2986],{"type":998,"value":2987}," base_dict.copy()\n",{"type":993,"tag":1021,"props":2989,"children":2990},{"class":1023,"line":45},[2991],{"type":993,"tag":1021,"props":2992,"children":2993},{"style":1036},[2994],{"type":998,"value":2493},{"type":993,"tag":1021,"props":2996,"children":2997},{"class":1023,"line":54},[2998,3002,3007,3011],{"type":993,"tag":1021,"props":2999,"children":3000},{"style":1042},[3001],{"type":998,"value":2509},{"type":993,"tag":1021,"props":3003,"children":3004},{"style":1036},[3005],{"type":998,"value":3006}," key, value ",{"type":993,"tag":1021,"props":3008,"children":3009},{"style":1042},[3010],{"type":998,"value":2519},{"type":993,"tag":1021,"props":3012,"children":3013},{"style":1036},[3014],{"type":998,"value":3015}," update_dict.items():\n",{"type":993,"tag":1021,"props":3017,"children":3018},{"class":1023,"line":63},[3019,3023,3027,3031],{"type":993,"tag":1021,"props":3020,"children":3021},{"style":1042},[3022],{"type":998,"value":2532},{"type":993,"tag":1021,"props":3024,"children":3025},{"style":1036},[3026],{"type":998,"value":2537},{"type":993,"tag":1021,"props":3028,"children":3029},{"style":1042},[3030],{"type":998,"value":2519},{"type":993,"tag":1021,"props":3032,"children":3033},{"style":1036},[3034],{"type":998,"value":3035}," result:\n",{"type":993,"tag":1021,"props":3037,"children":3038},{"class":1023,"line":72},[3039],{"type":993,"tag":1021,"props":3040,"children":3041},{"style":1027},[3042],{"type":998,"value":3043},"            # Handle list merging\n",{"type":993,"tag":1021,"props":3045,"children":3046},{"class":1023,"line":81},[3047,3052,3057,3062,3067,3072,3077,3082,3086,3090,3095,3099],{"type":993,"tag":1021,"props":3048,"children":3049},{"style":1042},[3050],{"type":998,"value":3051},"            if",{"type":993,"tag":1021,"props":3053,"children":3054},{"style":1036},[3055],{"type":998,"value":3056}," merge_lists ",{"type":993,"tag":1021,"props":3058,"children":3059},{"style":1042},[3060],{"type":998,"value":3061},"and",{"type":993,"tag":1021,"props":3063,"children":3064},{"style":1064},[3065],{"type":998,"value":3066}," isinstance",{"type":993,"tag":1021,"props":3068,"children":3069},{"style":1036},[3070],{"type":998,"value":3071},"(result[key], ",{"type":993,"tag":1021,"props":3073,"children":3074},{"style":1064},[3075],{"type":998,"value":3076},"list",{"type":993,"tag":1021,"props":3078,"children":3079},{"style":1036},[3080],{"type":998,"value":3081},") ",{"type":993,"tag":1021,"props":3083,"children":3084},{"style":1042},[3085],{"type":998,"value":3061},{"type":993,"tag":1021,"props":3087,"children":3088},{"style":1064},[3089],{"type":998,"value":3066},{"type":993,"tag":1021,"props":3091,"children":3092},{"style":1036},[3093],{"type":998,"value":3094},"(value, ",{"type":993,"tag":1021,"props":3096,"children":3097},{"style":1064},[3098],{"type":998,"value":3076},{"type":993,"tag":1021,"props":3100,"children":3101},{"style":1036},[3102],{"type":998,"value":2962},{"type":993,"tag":1021,"props":3104,"children":3105},{"class":1023,"line":91},[3106,3111,3115,3120,3125],{"type":993,"tag":1021,"props":3107,"children":3108},{"style":1036},[3109],{"type":998,"value":3110},"                result[key] ",{"type":993,"tag":1021,"props":3112,"children":3113},{"style":1042},[3114],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3116,"children":3117},{"style":1036},[3118],{"type":998,"value":3119}," result[key] ",{"type":993,"tag":1021,"props":3121,"children":3122},{"style":1042},[3123],{"type":998,"value":3124},"+",{"type":993,"tag":1021,"props":3126,"children":3127},{"style":1036},[3128],{"type":998,"value":3129}," value\n",{"type":993,"tag":1021,"props":3131,"children":3132},{"class":1023,"line":100},[3133],{"type":993,"tag":1021,"props":3134,"children":3135},{"style":1027},[3136],{"type":998,"value":3137},"            # Handle nested dictionaries\n",{"type":993,"tag":1021,"props":3139,"children":3140},{"class":1023,"line":109},[3141,3146,3150,3154,3159,3163,3167,3171,3175,3179],{"type":993,"tag":1021,"props":3142,"children":3143},{"style":1042},[3144],{"type":998,"value":3145},"            elif",{"type":993,"tag":1021,"props":3147,"children":3148},{"style":1064},[3149],{"type":998,"value":3066},{"type":993,"tag":1021,"props":3151,"children":3152},{"style":1036},[3153],{"type":998,"value":3071},{"type":993,"tag":1021,"props":3155,"children":3156},{"style":1064},[3157],{"type":998,"value":3158},"dict",{"type":993,"tag":1021,"props":3160,"children":3161},{"style":1036},[3162],{"type":998,"value":3081},{"type":993,"tag":1021,"props":3164,"children":3165},{"style":1042},[3166],{"type":998,"value":3061},{"type":993,"tag":1021,"props":3168,"children":3169},{"style":1064},[3170],{"type":998,"value":3066},{"type":993,"tag":1021,"props":3172,"children":3173},{"style":1036},[3174],{"type":998,"value":3094},{"type":993,"tag":1021,"props":3176,"children":3177},{"style":1064},[3178],{"type":998,"value":3158},{"type":993,"tag":1021,"props":3180,"children":3181},{"style":1036},[3182],{"type":998,"value":2962},{"type":993,"tag":1021,"props":3184,"children":3185},{"class":1023,"line":118},[3186,3190,3194],{"type":993,"tag":1021,"props":3187,"children":3188},{"style":1036},[3189],{"type":998,"value":3110},{"type":993,"tag":1021,"props":3191,"children":3192},{"style":1042},[3193],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3195,"children":3196},{"style":1036},[3197],{"type":998,"value":3198}," smart_merge(result[key], value, merge_lists)\n",{"type":993,"tag":1021,"props":3200,"children":3201},{"class":1023,"line":127},[3202,3207],{"type":993,"tag":1021,"props":3203,"children":3204},{"style":1042},[3205],{"type":998,"value":3206},"            else",{"type":993,"tag":1021,"props":3208,"children":3209},{"style":1036},[3210],{"type":998,"value":3211},":\n",{"type":993,"tag":1021,"props":3213,"children":3214},{"class":1023,"line":136},[3215,3219,3223],{"type":993,"tag":1021,"props":3216,"children":3217},{"style":1036},[3218],{"type":998,"value":3110},{"type":993,"tag":1021,"props":3220,"children":3221},{"style":1042},[3222],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3224,"children":3225},{"style":1036},[3226],{"type":998,"value":3129},{"type":993,"tag":1021,"props":3228,"children":3229},{"class":1023,"line":146},[3230,3235],{"type":993,"tag":1021,"props":3231,"children":3232},{"style":1042},[3233],{"type":998,"value":3234},"        else",{"type":993,"tag":1021,"props":3236,"children":3237},{"style":1036},[3238],{"type":998,"value":3211},{"type":993,"tag":1021,"props":3240,"children":3241},{"class":1023,"line":155},[3242,3247,3251],{"type":993,"tag":1021,"props":3243,"children":3244},{"style":1036},[3245],{"type":998,"value":3246},"            result[key] ",{"type":993,"tag":1021,"props":3248,"children":3249},{"style":1042},[3250],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3252,"children":3253},{"style":1036},[3254],{"type":998,"value":3129},{"type":993,"tag":1021,"props":3256,"children":3257},{"class":1023,"line":164},[3258],{"type":993,"tag":1021,"props":3259,"children":3260},{"style":1036},[3261],{"type":998,"value":2493},{"type":993,"tag":1021,"props":3263,"children":3264},{"class":1023,"line":173},[3265,3269],{"type":993,"tag":1021,"props":3266,"children":3267},{"style":1042},[3268],{"type":998,"value":2599},{"type":993,"tag":1021,"props":3270,"children":3271},{"style":1036},[3272],{"type":998,"value":3273}," result\n",{"type":993,"tag":1021,"props":3275,"children":3276},{"class":1023,"line":182},[3277],{"type":993,"tag":1021,"props":3278,"children":3279},{"emptyLinePlaceholder":13},[3280],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3282,"children":3283},{"class":1023,"line":191},[3284,3289,3293,3297,3302,3307,3312,3317,3322,3327,3332,3336,3341],{"type":993,"tag":1021,"props":3285,"children":3286},{"style":1036},[3287],{"type":998,"value":3288},"base ",{"type":993,"tag":1021,"props":3290,"children":3291},{"style":1042},[3292],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3294,"children":3295},{"style":1036},[3296],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3298,"children":3299},{"style":1053},[3300],{"type":998,"value":3301},"'skills'",{"type":993,"tag":1021,"props":3303,"children":3304},{"style":1036},[3305],{"type":998,"value":3306},": [",{"type":993,"tag":1021,"props":3308,"children":3309},{"style":1053},[3310],{"type":998,"value":3311},"'Python'",{"type":993,"tag":1021,"props":3313,"children":3314},{"style":1036},[3315],{"type":998,"value":3316},"], ",{"type":993,"tag":1021,"props":3318,"children":3319},{"style":1053},[3320],{"type":998,"value":3321},"'projects'",{"type":993,"tag":1021,"props":3323,"children":3324},{"style":1036},[3325],{"type":998,"value":3326},": {",{"type":993,"tag":1021,"props":3328,"children":3329},{"style":1053},[3330],{"type":998,"value":3331},"'web'",{"type":993,"tag":1021,"props":3333,"children":3334},{"style":1036},[3335],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3337,"children":3338},{"style":1064},[3339],{"type":998,"value":3340},"2",{"type":993,"tag":1021,"props":3342,"children":3343},{"style":1036},[3344],{"type":998,"value":3345},"}}\n",{"type":993,"tag":1021,"props":3347,"children":3348},{"class":1023,"line":201},[3349,3353,3357,3361,3365,3369,3374,3378,3382,3386,3391,3395,3400],{"type":993,"tag":1021,"props":3350,"children":3351},{"style":1036},[3352],{"type":998,"value":2036},{"type":993,"tag":1021,"props":3354,"children":3355},{"style":1042},[3356],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3358,"children":3359},{"style":1036},[3360],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3362,"children":3363},{"style":1053},[3364],{"type":998,"value":3301},{"type":993,"tag":1021,"props":3366,"children":3367},{"style":1036},[3368],{"type":998,"value":3306},{"type":993,"tag":1021,"props":3370,"children":3371},{"style":1053},[3372],{"type":998,"value":3373},"'JavaScript'",{"type":993,"tag":1021,"props":3375,"children":3376},{"style":1036},[3377],{"type":998,"value":3316},{"type":993,"tag":1021,"props":3379,"children":3380},{"style":1053},[3381],{"type":998,"value":3321},{"type":993,"tag":1021,"props":3383,"children":3384},{"style":1036},[3385],{"type":998,"value":3326},{"type":993,"tag":1021,"props":3387,"children":3388},{"style":1053},[3389],{"type":998,"value":3390},"'mobile'",{"type":993,"tag":1021,"props":3392,"children":3393},{"style":1036},[3394],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3396,"children":3397},{"style":1064},[3398],{"type":998,"value":3399},"1",{"type":993,"tag":1021,"props":3401,"children":3402},{"style":1036},[3403],{"type":998,"value":3345},{"type":993,"tag":1021,"props":3405,"children":3406},{"class":1023,"line":210},[3407],{"type":993,"tag":1021,"props":3408,"children":3409},{"emptyLinePlaceholder":13},[3410],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3412,"children":3413},{"class":1023,"line":219},[3414,3419,3423,3428,3433,3437,3441],{"type":993,"tag":1021,"props":3415,"children":3416},{"style":1036},[3417],{"type":998,"value":3418},"merged ",{"type":993,"tag":1021,"props":3420,"children":3421},{"style":1042},[3422],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3424,"children":3425},{"style":1036},[3426],{"type":998,"value":3427}," smart_merge(base, updates, ",{"type":993,"tag":1021,"props":3429,"children":3430},{"style":1868},[3431],{"type":998,"value":3432},"merge_lists",{"type":993,"tag":1021,"props":3434,"children":3435},{"style":1042},[3436],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3438,"children":3439},{"style":1064},[3440],{"type":998,"value":1916},{"type":993,"tag":1021,"props":3442,"children":3443},{"style":1036},[3444],{"type":998,"value":1921},{"type":993,"tag":1021,"props":3446,"children":3447},{"class":1023,"line":228},[3448,3452,3456,3461],{"type":993,"tag":1021,"props":3449,"children":3450},{"style":1064},[3451],{"type":998,"value":1099},{"type":993,"tag":1021,"props":3453,"children":3454},{"style":1036},[3455],{"type":998,"value":1104},{"type":993,"tag":1021,"props":3457,"children":3458},{"style":1053},[3459],{"type":998,"value":3460},"\"Smart merge result:\"",{"type":993,"tag":1021,"props":3462,"children":3463},{"style":1036},[3464],{"type":998,"value":3465},", merged)\n",{"type":993,"tag":1559,"props":3467,"children":3469},{"id":3468},"batch-updates-with-validation",[3470],{"type":998,"value":3471},"Batch Updates with Validation",{"type":993,"tag":1001,"props":3473,"children":3474},{},[3475],{"type":998,"value":3476},"Production applications require validation during updates to maintain data integrity and business rule compliance.",{"type":993,"tag":1007,"props":3478,"children":3479},{},[3480],{"type":993,"tag":1011,"props":3481,"children":3483},{"className":1013,"code":3482,"language":6,"meta":8,"style":8},"def update_product_catalog(catalog, updates, validate=True):\n    \"\"\"Update product catalog with validation\"\"\"\n    valid_fields = {'name', 'price', 'category', 'stock', 'description'}\n    \n    for product_id, product_updates in updates.items():\n        if product_id not in catalog:\n            catalog[product_id] = {}\n        \n        for field, value in product_updates.items():\n            if validate and field not in valid_fields:\n                print(f\"Warning: Invalid field '{field}' for product {product_id}\")\n                continue\n            \n            # Validate specific field types\n            if field == 'price' and not isinstance(value, (int, float)):\n                print(f\"Warning: Invalid price type for product {product_id}\")\n                continue\n            \n            catalog[product_id][field] = value\n    \n    return catalog\n\ncatalog = {'P001': {'name': 'Laptop', 'price': 999}}\nupdates = {\n    'P001': {'price': 899, 'stock': 50},\n    'P002': {'name': 'Mouse', 'price': 25, 'invalid_field': 'test'}\n}\n\nupdated_catalog = update_product_catalog(catalog, updates)\nprint(\"Updated catalog:\", updated_catalog)\n",[3484],{"type":993,"tag":1017,"props":3485,"children":3486},{"__ignoreMap":8},[3487,3516,3524,3582,3589,3610,3635,3652,3660,3682,3716,3780,3788,3796,3804,3863,3903,3910,3917,3933,3940,3952,3959,4016,4032,4077,4140,4147,4154,4171],{"type":993,"tag":1021,"props":3488,"children":3489},{"class":1023,"line":12},[3490,3494,3499,3504,3508,3512],{"type":993,"tag":1021,"props":3491,"children":3492},{"style":1042},[3493],{"type":998,"value":2399},{"type":993,"tag":1021,"props":3495,"children":3496},{"style":2402},[3497],{"type":998,"value":3498}," update_product_catalog",{"type":993,"tag":1021,"props":3500,"children":3501},{"style":1036},[3502],{"type":998,"value":3503},"(catalog, updates, validate",{"type":993,"tag":1021,"props":3505,"children":3506},{"style":1042},[3507],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3509,"children":3510},{"style":1064},[3511],{"type":998,"value":1916},{"type":993,"tag":1021,"props":3513,"children":3514},{"style":1036},[3515],{"type":998,"value":2962},{"type":993,"tag":1021,"props":3517,"children":3518},{"class":1023,"line":27},[3519],{"type":993,"tag":1021,"props":3520,"children":3521},{"style":1053},[3522],{"type":998,"value":3523},"    \"\"\"Update product catalog with validation\"\"\"\n",{"type":993,"tag":1021,"props":3525,"children":3526},{"class":1023,"line":36},[3527,3532,3536,3540,3544,3548,3552,3556,3560,3564,3569,3573,3578],{"type":993,"tag":1021,"props":3528,"children":3529},{"style":1036},[3530],{"type":998,"value":3531},"    valid_fields ",{"type":993,"tag":1021,"props":3533,"children":3534},{"style":1042},[3535],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3537,"children":3538},{"style":1036},[3539],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3541,"children":3542},{"style":1053},[3543],{"type":998,"value":1600},{"type":993,"tag":1021,"props":3545,"children":3546},{"style":1036},[3547],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3549,"children":3550},{"style":1053},[3551],{"type":998,"value":2000},{"type":993,"tag":1021,"props":3553,"children":3554},{"style":1036},[3555],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3557,"children":3558},{"style":1053},[3559],{"type":998,"value":2050},{"type":993,"tag":1021,"props":3561,"children":3562},{"style":1036},[3563],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3565,"children":3566},{"style":1053},[3567],{"type":998,"value":3568},"'stock'",{"type":993,"tag":1021,"props":3570,"children":3571},{"style":1036},[3572],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3574,"children":3575},{"style":1053},[3576],{"type":998,"value":3577},"'description'",{"type":993,"tag":1021,"props":3579,"children":3580},{"style":1036},[3581],{"type":998,"value":1091},{"type":993,"tag":1021,"props":3583,"children":3584},{"class":1023,"line":45},[3585],{"type":993,"tag":1021,"props":3586,"children":3587},{"style":1036},[3588],{"type":998,"value":2493},{"type":993,"tag":1021,"props":3590,"children":3591},{"class":1023,"line":54},[3592,3596,3601,3605],{"type":993,"tag":1021,"props":3593,"children":3594},{"style":1042},[3595],{"type":998,"value":2509},{"type":993,"tag":1021,"props":3597,"children":3598},{"style":1036},[3599],{"type":998,"value":3600}," product_id, product_updates ",{"type":993,"tag":1021,"props":3602,"children":3603},{"style":1042},[3604],{"type":998,"value":2519},{"type":993,"tag":1021,"props":3606,"children":3607},{"style":1036},[3608],{"type":998,"value":3609}," updates.items():\n",{"type":993,"tag":1021,"props":3611,"children":3612},{"class":1023,"line":63},[3613,3617,3622,3626,3630],{"type":993,"tag":1021,"props":3614,"children":3615},{"style":1042},[3616],{"type":998,"value":2532},{"type":993,"tag":1021,"props":3618,"children":3619},{"style":1036},[3620],{"type":998,"value":3621}," product_id ",{"type":993,"tag":1021,"props":3623,"children":3624},{"style":1042},[3625],{"type":998,"value":2542},{"type":993,"tag":1021,"props":3627,"children":3628},{"style":1042},[3629],{"type":998,"value":2252},{"type":993,"tag":1021,"props":3631,"children":3632},{"style":1036},[3633],{"type":998,"value":3634}," catalog:\n",{"type":993,"tag":1021,"props":3636,"children":3637},{"class":1023,"line":72},[3638,3643,3647],{"type":993,"tag":1021,"props":3639,"children":3640},{"style":1036},[3641],{"type":998,"value":3642},"            catalog[product_id] ",{"type":993,"tag":1021,"props":3644,"children":3645},{"style":1042},[3646],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3648,"children":3649},{"style":1036},[3650],{"type":998,"value":3651}," {}\n",{"type":993,"tag":1021,"props":3653,"children":3654},{"class":1023,"line":81},[3655],{"type":993,"tag":1021,"props":3656,"children":3657},{"style":1036},[3658],{"type":998,"value":3659},"        \n",{"type":993,"tag":1021,"props":3661,"children":3662},{"class":1023,"line":91},[3663,3668,3673,3677],{"type":993,"tag":1021,"props":3664,"children":3665},{"style":1042},[3666],{"type":998,"value":3667},"        for",{"type":993,"tag":1021,"props":3669,"children":3670},{"style":1036},[3671],{"type":998,"value":3672}," field, value ",{"type":993,"tag":1021,"props":3674,"children":3675},{"style":1042},[3676],{"type":998,"value":2519},{"type":993,"tag":1021,"props":3678,"children":3679},{"style":1036},[3680],{"type":998,"value":3681}," product_updates.items():\n",{"type":993,"tag":1021,"props":3683,"children":3684},{"class":1023,"line":100},[3685,3689,3694,3698,3703,3707,3711],{"type":993,"tag":1021,"props":3686,"children":3687},{"style":1042},[3688],{"type":998,"value":3051},{"type":993,"tag":1021,"props":3690,"children":3691},{"style":1036},[3692],{"type":998,"value":3693}," validate ",{"type":993,"tag":1021,"props":3695,"children":3696},{"style":1042},[3697],{"type":998,"value":3061},{"type":993,"tag":1021,"props":3699,"children":3700},{"style":1036},[3701],{"type":998,"value":3702}," field ",{"type":993,"tag":1021,"props":3704,"children":3705},{"style":1042},[3706],{"type":998,"value":2542},{"type":993,"tag":1021,"props":3708,"children":3709},{"style":1042},[3710],{"type":998,"value":2252},{"type":993,"tag":1021,"props":3712,"children":3713},{"style":1036},[3714],{"type":998,"value":3715}," valid_fields:\n",{"type":993,"tag":1021,"props":3717,"children":3718},{"class":1023,"line":109},[3719,3724,3728,3733,3738,3743,3748,3753,3758,3762,3767,3771,3776],{"type":993,"tag":1021,"props":3720,"children":3721},{"style":1064},[3722],{"type":998,"value":3723},"                print",{"type":993,"tag":1021,"props":3725,"children":3726},{"style":1036},[3727],{"type":998,"value":1104},{"type":993,"tag":1021,"props":3729,"children":3730},{"style":1042},[3731],{"type":998,"value":3732},"f",{"type":993,"tag":1021,"props":3734,"children":3735},{"style":1053},[3736],{"type":998,"value":3737},"\"Warning: Invalid field '",{"type":993,"tag":1021,"props":3739,"children":3740},{"style":1064},[3741],{"type":998,"value":3742},"{",{"type":993,"tag":1021,"props":3744,"children":3745},{"style":1036},[3746],{"type":998,"value":3747},"field",{"type":993,"tag":1021,"props":3749,"children":3750},{"style":1064},[3751],{"type":998,"value":3752},"}",{"type":993,"tag":1021,"props":3754,"children":3755},{"style":1053},[3756],{"type":998,"value":3757},"' for product ",{"type":993,"tag":1021,"props":3759,"children":3760},{"style":1064},[3761],{"type":998,"value":3742},{"type":993,"tag":1021,"props":3763,"children":3764},{"style":1036},[3765],{"type":998,"value":3766},"product_id",{"type":993,"tag":1021,"props":3768,"children":3769},{"style":1064},[3770],{"type":998,"value":3752},{"type":993,"tag":1021,"props":3772,"children":3773},{"style":1053},[3774],{"type":998,"value":3775},"\"",{"type":993,"tag":1021,"props":3777,"children":3778},{"style":1036},[3779],{"type":998,"value":1921},{"type":993,"tag":1021,"props":3781,"children":3782},{"class":1023,"line":118},[3783],{"type":993,"tag":1021,"props":3784,"children":3785},{"style":1042},[3786],{"type":998,"value":3787},"                continue\n",{"type":993,"tag":1021,"props":3789,"children":3790},{"class":1023,"line":127},[3791],{"type":993,"tag":1021,"props":3792,"children":3793},{"style":1036},[3794],{"type":998,"value":3795},"            \n",{"type":993,"tag":1021,"props":3797,"children":3798},{"class":1023,"line":136},[3799],{"type":993,"tag":1021,"props":3800,"children":3801},{"style":1027},[3802],{"type":998,"value":3803},"            # Validate specific field types\n",{"type":993,"tag":1021,"props":3805,"children":3806},{"class":1023,"line":146},[3807,3811,3815,3820,3825,3830,3835,3839,3844,3849,3853,3858],{"type":993,"tag":1021,"props":3808,"children":3809},{"style":1042},[3810],{"type":998,"value":3051},{"type":993,"tag":1021,"props":3812,"children":3813},{"style":1036},[3814],{"type":998,"value":3702},{"type":993,"tag":1021,"props":3816,"children":3817},{"style":1042},[3818],{"type":998,"value":3819},"==",{"type":993,"tag":1021,"props":3821,"children":3822},{"style":1053},[3823],{"type":998,"value":3824}," 'price'",{"type":993,"tag":1021,"props":3826,"children":3827},{"style":1042},[3828],{"type":998,"value":3829}," and",{"type":993,"tag":1021,"props":3831,"children":3832},{"style":1042},[3833],{"type":998,"value":3834}," not",{"type":993,"tag":1021,"props":3836,"children":3837},{"style":1064},[3838],{"type":998,"value":3066},{"type":993,"tag":1021,"props":3840,"children":3841},{"style":1036},[3842],{"type":998,"value":3843},"(value, (",{"type":993,"tag":1021,"props":3845,"children":3846},{"style":1064},[3847],{"type":998,"value":3848},"int",{"type":993,"tag":1021,"props":3850,"children":3851},{"style":1036},[3852],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3854,"children":3855},{"style":1064},[3856],{"type":998,"value":3857},"float",{"type":993,"tag":1021,"props":3859,"children":3860},{"style":1036},[3861],{"type":998,"value":3862},")):\n",{"type":993,"tag":1021,"props":3864,"children":3865},{"class":1023,"line":155},[3866,3870,3874,3878,3883,3887,3891,3895,3899],{"type":993,"tag":1021,"props":3867,"children":3868},{"style":1064},[3869],{"type":998,"value":3723},{"type":993,"tag":1021,"props":3871,"children":3872},{"style":1036},[3873],{"type":998,"value":1104},{"type":993,"tag":1021,"props":3875,"children":3876},{"style":1042},[3877],{"type":998,"value":3732},{"type":993,"tag":1021,"props":3879,"children":3880},{"style":1053},[3881],{"type":998,"value":3882},"\"Warning: Invalid price type for product ",{"type":993,"tag":1021,"props":3884,"children":3885},{"style":1064},[3886],{"type":998,"value":3742},{"type":993,"tag":1021,"props":3888,"children":3889},{"style":1036},[3890],{"type":998,"value":3766},{"type":993,"tag":1021,"props":3892,"children":3893},{"style":1064},[3894],{"type":998,"value":3752},{"type":993,"tag":1021,"props":3896,"children":3897},{"style":1053},[3898],{"type":998,"value":3775},{"type":993,"tag":1021,"props":3900,"children":3901},{"style":1036},[3902],{"type":998,"value":1921},{"type":993,"tag":1021,"props":3904,"children":3905},{"class":1023,"line":164},[3906],{"type":993,"tag":1021,"props":3907,"children":3908},{"style":1042},[3909],{"type":998,"value":3787},{"type":993,"tag":1021,"props":3911,"children":3912},{"class":1023,"line":173},[3913],{"type":993,"tag":1021,"props":3914,"children":3915},{"style":1036},[3916],{"type":998,"value":3795},{"type":993,"tag":1021,"props":3918,"children":3919},{"class":1023,"line":182},[3920,3925,3929],{"type":993,"tag":1021,"props":3921,"children":3922},{"style":1036},[3923],{"type":998,"value":3924},"            catalog[product_id][field] ",{"type":993,"tag":1021,"props":3926,"children":3927},{"style":1042},[3928],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3930,"children":3931},{"style":1036},[3932],{"type":998,"value":3129},{"type":993,"tag":1021,"props":3934,"children":3935},{"class":1023,"line":191},[3936],{"type":993,"tag":1021,"props":3937,"children":3938},{"style":1036},[3939],{"type":998,"value":2493},{"type":993,"tag":1021,"props":3941,"children":3942},{"class":1023,"line":201},[3943,3947],{"type":993,"tag":1021,"props":3944,"children":3945},{"style":1042},[3946],{"type":998,"value":2599},{"type":993,"tag":1021,"props":3948,"children":3949},{"style":1036},[3950],{"type":998,"value":3951}," catalog\n",{"type":993,"tag":1021,"props":3953,"children":3954},{"class":1023,"line":210},[3955],{"type":993,"tag":1021,"props":3956,"children":3957},{"emptyLinePlaceholder":13},[3958],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3960,"children":3961},{"class":1023,"line":219},[3962,3967,3971,3975,3980,3984,3988,3992,3996,4000,4004,4008,4012],{"type":993,"tag":1021,"props":3963,"children":3964},{"style":1036},[3965],{"type":998,"value":3966},"catalog ",{"type":993,"tag":1021,"props":3968,"children":3969},{"style":1042},[3970],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3972,"children":3973},{"style":1036},[3974],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3976,"children":3977},{"style":1053},[3978],{"type":998,"value":3979},"'P001'",{"type":993,"tag":1021,"props":3981,"children":3982},{"style":1036},[3983],{"type":998,"value":3326},{"type":993,"tag":1021,"props":3985,"children":3986},{"style":1053},[3987],{"type":998,"value":1600},{"type":993,"tag":1021,"props":3989,"children":3990},{"style":1036},[3991],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3993,"children":3994},{"style":1053},[3995],{"type":998,"value":1991},{"type":993,"tag":1021,"props":3997,"children":3998},{"style":1036},[3999],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4001,"children":4002},{"style":1053},[4003],{"type":998,"value":2000},{"type":993,"tag":1021,"props":4005,"children":4006},{"style":1036},[4007],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4009,"children":4010},{"style":1064},[4011],{"type":998,"value":2009},{"type":993,"tag":1021,"props":4013,"children":4014},{"style":1036},[4015],{"type":998,"value":3345},{"type":993,"tag":1021,"props":4017,"children":4018},{"class":1023,"line":228},[4019,4023,4027],{"type":993,"tag":1021,"props":4020,"children":4021},{"style":1036},[4022],{"type":998,"value":2036},{"type":993,"tag":1021,"props":4024,"children":4025},{"style":1042},[4026],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4028,"children":4029},{"style":1036},[4030],{"type":998,"value":4031}," {\n",{"type":993,"tag":1021,"props":4033,"children":4034},{"class":1023,"line":238},[4035,4040,4044,4048,4052,4056,4060,4064,4068,4072],{"type":993,"tag":1021,"props":4036,"children":4037},{"style":1053},[4038],{"type":998,"value":4039},"    'P001'",{"type":993,"tag":1021,"props":4041,"children":4042},{"style":1036},[4043],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4045,"children":4046},{"style":1053},[4047],{"type":998,"value":2000},{"type":993,"tag":1021,"props":4049,"children":4050},{"style":1036},[4051],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4053,"children":4054},{"style":1064},[4055],{"type":998,"value":2095},{"type":993,"tag":1021,"props":4057,"children":4058},{"style":1036},[4059],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4061,"children":4062},{"style":1053},[4063],{"type":998,"value":3568},{"type":993,"tag":1021,"props":4065,"children":4066},{"style":1036},[4067],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4069,"children":4070},{"style":1064},[4071],{"type":998,"value":1067},{"type":993,"tag":1021,"props":4073,"children":4074},{"style":1036},[4075],{"type":998,"value":4076},"},\n",{"type":993,"tag":1021,"props":4078,"children":4079},{"class":1023,"line":247},[4080,4085,4089,4093,4097,4102,4106,4110,4114,4118,4122,4127,4131,4136],{"type":993,"tag":1021,"props":4081,"children":4082},{"style":1053},[4083],{"type":998,"value":4084},"    'P002'",{"type":993,"tag":1021,"props":4086,"children":4087},{"style":1036},[4088],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4090,"children":4091},{"style":1053},[4092],{"type":998,"value":1600},{"type":993,"tag":1021,"props":4094,"children":4095},{"style":1036},[4096],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4098,"children":4099},{"style":1053},[4100],{"type":998,"value":4101},"'Mouse'",{"type":993,"tag":1021,"props":4103,"children":4104},{"style":1036},[4105],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4107,"children":4108},{"style":1053},[4109],{"type":998,"value":2000},{"type":993,"tag":1021,"props":4111,"children":4112},{"style":1036},[4113],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4115,"children":4116},{"style":1064},[4117],{"type":998,"value":1627},{"type":993,"tag":1021,"props":4119,"children":4120},{"style":1036},[4121],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4123,"children":4124},{"style":1053},[4125],{"type":998,"value":4126},"'invalid_field'",{"type":993,"tag":1021,"props":4128,"children":4129},{"style":1036},[4130],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4132,"children":4133},{"style":1053},[4134],{"type":998,"value":4135},"'test'",{"type":993,"tag":1021,"props":4137,"children":4138},{"style":1036},[4139],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4141,"children":4142},{"class":1023,"line":256},[4143],{"type":993,"tag":1021,"props":4144,"children":4145},{"style":1036},[4146],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4148,"children":4149},{"class":1023,"line":265},[4150],{"type":993,"tag":1021,"props":4151,"children":4152},{"emptyLinePlaceholder":13},[4153],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4155,"children":4156},{"class":1023,"line":274},[4157,4162,4166],{"type":993,"tag":1021,"props":4158,"children":4159},{"style":1036},[4160],{"type":998,"value":4161},"updated_catalog ",{"type":993,"tag":1021,"props":4163,"children":4164},{"style":1042},[4165],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4167,"children":4168},{"style":1036},[4169],{"type":998,"value":4170}," update_product_catalog(catalog, updates)\n",{"type":993,"tag":1021,"props":4172,"children":4173},{"class":1023,"line":284},[4174,4178,4182,4187],{"type":993,"tag":1021,"props":4175,"children":4176},{"style":1064},[4177],{"type":998,"value":1099},{"type":993,"tag":1021,"props":4179,"children":4180},{"style":1036},[4181],{"type":998,"value":1104},{"type":993,"tag":1021,"props":4183,"children":4184},{"style":1053},[4185],{"type":998,"value":4186},"\"Updated catalog:\"",{"type":993,"tag":1021,"props":4188,"children":4189},{"style":1036},[4190],{"type":998,"value":4191},", updated_catalog)\n",{"type":993,"tag":1238,"props":4193,"children":4195},{"id":4194},"nested-dictionary-updates",[4196],{"type":998,"value":4197},"💡 Nested Dictionary Updates",{"type":993,"tag":1001,"props":4199,"children":4200},{},[4201],{"type":998,"value":4202},"Complex data structures require specialized approaches for updating nested dictionary content safely and efficiently.",{"type":993,"tag":1559,"props":4204,"children":4206},{"id":4205},"deep-update-operations",[4207],{"type":998,"value":4208},"Deep Update Operations",{"type":993,"tag":1001,"props":4210,"children":4211},{},[4212],{"type":998,"value":4213},"Multi-level updates preserve existing nested structure while selectively modifying specific sub-dictionary elements.",{"type":993,"tag":1007,"props":4215,"children":4216},{},[4217],{"type":993,"tag":1011,"props":4218,"children":4220},{"className":1013,"code":4219,"language":6,"meta":8,"style":8},"def deep_update(target, source):\n    \"\"\"Recursively update nested dictionaries\"\"\"\n    for key, value in source.items():\n        if key in target and isinstance(target[key], dict) and isinstance(value, dict):\n            deep_update(target[key], value)\n        else:\n            target[key] = value\n    return target\n\nuser_config = {\n    'profile': {'name': 'Alice', 'age': 25},\n    'settings': {'theme': 'light', 'notifications': True}\n}\n\nupdates = {\n    'profile': {'city': 'Boston'},\n    'settings': {'theme': 'dark'},\n    'new_section': {'feature': True}\n}\n\ndeep_update(user_config, updates)\nprint(\"Deep updated config:\", user_config)\n",[4221],{"type":993,"tag":1017,"props":4222,"children":4223},{"__ignoreMap":8},[4224,4241,4249,4269,4330,4338,4349,4365,4377,4384,4400,4444,4488,4495,4502,4517,4545,4572,4601,4608,4615,4623],{"type":993,"tag":1021,"props":4225,"children":4226},{"class":1023,"line":12},[4227,4231,4236],{"type":993,"tag":1021,"props":4228,"children":4229},{"style":1042},[4230],{"type":998,"value":2399},{"type":993,"tag":1021,"props":4232,"children":4233},{"style":2402},[4234],{"type":998,"value":4235}," deep_update",{"type":993,"tag":1021,"props":4237,"children":4238},{"style":1036},[4239],{"type":998,"value":4240},"(target, source):\n",{"type":993,"tag":1021,"props":4242,"children":4243},{"class":1023,"line":27},[4244],{"type":993,"tag":1021,"props":4245,"children":4246},{"style":1053},[4247],{"type":998,"value":4248},"    \"\"\"Recursively update nested dictionaries\"\"\"\n",{"type":993,"tag":1021,"props":4250,"children":4251},{"class":1023,"line":36},[4252,4256,4260,4264],{"type":993,"tag":1021,"props":4253,"children":4254},{"style":1042},[4255],{"type":998,"value":2509},{"type":993,"tag":1021,"props":4257,"children":4258},{"style":1036},[4259],{"type":998,"value":3006},{"type":993,"tag":1021,"props":4261,"children":4262},{"style":1042},[4263],{"type":998,"value":2519},{"type":993,"tag":1021,"props":4265,"children":4266},{"style":1036},[4267],{"type":998,"value":4268}," source.items():\n",{"type":993,"tag":1021,"props":4270,"children":4271},{"class":1023,"line":45},[4272,4276,4280,4284,4289,4293,4297,4302,4306,4310,4314,4318,4322,4326],{"type":993,"tag":1021,"props":4273,"children":4274},{"style":1042},[4275],{"type":998,"value":2532},{"type":993,"tag":1021,"props":4277,"children":4278},{"style":1036},[4279],{"type":998,"value":2537},{"type":993,"tag":1021,"props":4281,"children":4282},{"style":1042},[4283],{"type":998,"value":2519},{"type":993,"tag":1021,"props":4285,"children":4286},{"style":1036},[4287],{"type":998,"value":4288}," target ",{"type":993,"tag":1021,"props":4290,"children":4291},{"style":1042},[4292],{"type":998,"value":3061},{"type":993,"tag":1021,"props":4294,"children":4295},{"style":1064},[4296],{"type":998,"value":3066},{"type":993,"tag":1021,"props":4298,"children":4299},{"style":1036},[4300],{"type":998,"value":4301},"(target[key], ",{"type":993,"tag":1021,"props":4303,"children":4304},{"style":1064},[4305],{"type":998,"value":3158},{"type":993,"tag":1021,"props":4307,"children":4308},{"style":1036},[4309],{"type":998,"value":3081},{"type":993,"tag":1021,"props":4311,"children":4312},{"style":1042},[4313],{"type":998,"value":3061},{"type":993,"tag":1021,"props":4315,"children":4316},{"style":1064},[4317],{"type":998,"value":3066},{"type":993,"tag":1021,"props":4319,"children":4320},{"style":1036},[4321],{"type":998,"value":3094},{"type":993,"tag":1021,"props":4323,"children":4324},{"style":1064},[4325],{"type":998,"value":3158},{"type":993,"tag":1021,"props":4327,"children":4328},{"style":1036},[4329],{"type":998,"value":2962},{"type":993,"tag":1021,"props":4331,"children":4332},{"class":1023,"line":54},[4333],{"type":993,"tag":1021,"props":4334,"children":4335},{"style":1036},[4336],{"type":998,"value":4337},"            deep_update(target[key], value)\n",{"type":993,"tag":1021,"props":4339,"children":4340},{"class":1023,"line":63},[4341,4345],{"type":993,"tag":1021,"props":4342,"children":4343},{"style":1042},[4344],{"type":998,"value":3234},{"type":993,"tag":1021,"props":4346,"children":4347},{"style":1036},[4348],{"type":998,"value":3211},{"type":993,"tag":1021,"props":4350,"children":4351},{"class":1023,"line":72},[4352,4357,4361],{"type":993,"tag":1021,"props":4353,"children":4354},{"style":1036},[4355],{"type":998,"value":4356},"            target[key] ",{"type":993,"tag":1021,"props":4358,"children":4359},{"style":1042},[4360],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4362,"children":4363},{"style":1036},[4364],{"type":998,"value":3129},{"type":993,"tag":1021,"props":4366,"children":4367},{"class":1023,"line":81},[4368,4372],{"type":993,"tag":1021,"props":4369,"children":4370},{"style":1042},[4371],{"type":998,"value":2599},{"type":993,"tag":1021,"props":4373,"children":4374},{"style":1036},[4375],{"type":998,"value":4376}," target\n",{"type":993,"tag":1021,"props":4378,"children":4379},{"class":1023,"line":91},[4380],{"type":993,"tag":1021,"props":4381,"children":4382},{"emptyLinePlaceholder":13},[4383],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4385,"children":4386},{"class":1023,"line":100},[4387,4392,4396],{"type":993,"tag":1021,"props":4388,"children":4389},{"style":1036},[4390],{"type":998,"value":4391},"user_config ",{"type":993,"tag":1021,"props":4393,"children":4394},{"style":1042},[4395],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4397,"children":4398},{"style":1036},[4399],{"type":998,"value":4031},{"type":993,"tag":1021,"props":4401,"children":4402},{"class":1023,"line":109},[4403,4408,4412,4416,4420,4424,4428,4432,4436,4440],{"type":993,"tag":1021,"props":4404,"children":4405},{"style":1053},[4406],{"type":998,"value":4407},"    'profile'",{"type":993,"tag":1021,"props":4409,"children":4410},{"style":1036},[4411],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4413,"children":4414},{"style":1053},[4415],{"type":998,"value":1600},{"type":993,"tag":1021,"props":4417,"children":4418},{"style":1036},[4419],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4421,"children":4422},{"style":1053},[4423],{"type":998,"value":1609},{"type":993,"tag":1021,"props":4425,"children":4426},{"style":1036},[4427],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4429,"children":4430},{"style":1053},[4431],{"type":998,"value":1618},{"type":993,"tag":1021,"props":4433,"children":4434},{"style":1036},[4435],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4437,"children":4438},{"style":1064},[4439],{"type":998,"value":1627},{"type":993,"tag":1021,"props":4441,"children":4442},{"style":1036},[4443],{"type":998,"value":4076},{"type":993,"tag":1021,"props":4445,"children":4446},{"class":1023,"line":118},[4447,4452,4456,4460,4464,4468,4472,4476,4480,4484],{"type":993,"tag":1021,"props":4448,"children":4449},{"style":1053},[4450],{"type":998,"value":4451},"    'settings'",{"type":993,"tag":1021,"props":4453,"children":4454},{"style":1036},[4455],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4457,"children":4458},{"style":1053},[4459],{"type":998,"value":1798},{"type":993,"tag":1021,"props":4461,"children":4462},{"style":1036},[4463],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4465,"children":4466},{"style":1053},[4467],{"type":998,"value":1807},{"type":993,"tag":1021,"props":4469,"children":4470},{"style":1036},[4471],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4473,"children":4474},{"style":1053},[4475],{"type":998,"value":2455},{"type":993,"tag":1021,"props":4477,"children":4478},{"style":1036},[4479],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4481,"children":4482},{"style":1064},[4483],{"type":998,"value":1916},{"type":993,"tag":1021,"props":4485,"children":4486},{"style":1036},[4487],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4489,"children":4490},{"class":1023,"line":127},[4491],{"type":993,"tag":1021,"props":4492,"children":4493},{"style":1036},[4494],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4496,"children":4497},{"class":1023,"line":136},[4498],{"type":993,"tag":1021,"props":4499,"children":4500},{"emptyLinePlaceholder":13},[4501],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4503,"children":4504},{"class":1023,"line":146},[4505,4509,4513],{"type":993,"tag":1021,"props":4506,"children":4507},{"style":1036},[4508],{"type":998,"value":2036},{"type":993,"tag":1021,"props":4510,"children":4511},{"style":1042},[4512],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4514,"children":4515},{"style":1036},[4516],{"type":998,"value":4031},{"type":993,"tag":1021,"props":4518,"children":4519},{"class":1023,"line":155},[4520,4524,4528,4532,4536,4541],{"type":993,"tag":1021,"props":4521,"children":4522},{"style":1053},[4523],{"type":998,"value":4407},{"type":993,"tag":1021,"props":4525,"children":4526},{"style":1036},[4527],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4529,"children":4530},{"style":1053},[4531],{"type":998,"value":1670},{"type":993,"tag":1021,"props":4533,"children":4534},{"style":1036},[4535],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4537,"children":4538},{"style":1053},[4539],{"type":998,"value":4540},"'Boston'",{"type":993,"tag":1021,"props":4542,"children":4543},{"style":1036},[4544],{"type":998,"value":4076},{"type":993,"tag":1021,"props":4546,"children":4547},{"class":1023,"line":164},[4548,4552,4556,4560,4564,4568],{"type":993,"tag":1021,"props":4549,"children":4550},{"style":1053},[4551],{"type":998,"value":4451},{"type":993,"tag":1021,"props":4553,"children":4554},{"style":1036},[4555],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4557,"children":4558},{"style":1053},[4559],{"type":998,"value":1798},{"type":993,"tag":1021,"props":4561,"children":4562},{"style":1036},[4563],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4565,"children":4566},{"style":1053},[4567],{"type":998,"value":1880},{"type":993,"tag":1021,"props":4569,"children":4570},{"style":1036},[4571],{"type":998,"value":4076},{"type":993,"tag":1021,"props":4573,"children":4574},{"class":1023,"line":173},[4575,4580,4584,4589,4593,4597],{"type":993,"tag":1021,"props":4576,"children":4577},{"style":1053},[4578],{"type":998,"value":4579},"    'new_section'",{"type":993,"tag":1021,"props":4581,"children":4582},{"style":1036},[4583],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4585,"children":4586},{"style":1053},[4587],{"type":998,"value":4588},"'feature'",{"type":993,"tag":1021,"props":4590,"children":4591},{"style":1036},[4592],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4594,"children":4595},{"style":1064},[4596],{"type":998,"value":1916},{"type":993,"tag":1021,"props":4598,"children":4599},{"style":1036},[4600],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4602,"children":4603},{"class":1023,"line":182},[4604],{"type":993,"tag":1021,"props":4605,"children":4606},{"style":1036},[4607],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4609,"children":4610},{"class":1023,"line":191},[4611],{"type":993,"tag":1021,"props":4612,"children":4613},{"emptyLinePlaceholder":13},[4614],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4616,"children":4617},{"class":1023,"line":201},[4618],{"type":993,"tag":1021,"props":4619,"children":4620},{"style":1036},[4621],{"type":998,"value":4622},"deep_update(user_config, updates)\n",{"type":993,"tag":1021,"props":4624,"children":4625},{"class":1023,"line":210},[4626,4630,4634,4639],{"type":993,"tag":1021,"props":4627,"children":4628},{"style":1064},[4629],{"type":998,"value":1099},{"type":993,"tag":1021,"props":4631,"children":4632},{"style":1036},[4633],{"type":998,"value":1104},{"type":993,"tag":1021,"props":4635,"children":4636},{"style":1053},[4637],{"type":998,"value":4638},"\"Deep updated config:\"",{"type":993,"tag":1021,"props":4640,"children":4641},{"style":1036},[4642],{"type":998,"value":4643},", user_config)\n",{"type":993,"tag":1492,"props":4645,"children":4649},{"emoji":4646,"title":4647,"type":4648},"✅","Best Practices","success",[4650,4660,4670,4680],{"type":993,"tag":1001,"props":4651,"children":4652},{},[4653,4658],{"type":993,"tag":1502,"props":4654,"children":4655},{},[4656],{"type":998,"value":4657},"Choose Right Method:",{"type":998,"value":4659}," Use direct assignment for single updates, update() for bulk changes.",{"type":993,"tag":1001,"props":4661,"children":4662},{},[4663,4668],{"type":993,"tag":1502,"props":4664,"children":4665},{},[4666],{"type":998,"value":4667},"Validate Data:",{"type":998,"value":4669}," Consider validation for user inputs and external data sources.",{"type":993,"tag":1001,"props":4671,"children":4672},{},[4673,4678],{"type":993,"tag":1502,"props":4674,"children":4675},{},[4676],{"type":998,"value":4677},"Handle Conflicts:",{"type":998,"value":4679}," Design merge strategies for overlapping data scenarios.",{"type":993,"tag":1001,"props":4681,"children":4682},{},[4683,4688],{"type":993,"tag":1502,"props":4684,"children":4685},{},[4686],{"type":998,"value":4687},"Test Edge Cases:",{"type":998,"value":4689}," Account for empty dictionaries and missing keys in your logic.",{"type":993,"tag":4691,"props":4692,"children":4694},"content-exercise",{":widget-view":4693,"category":6,"id":547},"true",[],{"type":993,"tag":1001,"props":4696,"children":4697},{},[4698,4700,4706],{"type":998,"value":4699},"Learn more about ",{"type":993,"tag":4701,"props":4702,"children":4703},"a",{"href":553},[4704],{"type":998,"value":4705},"adding dictionary items",{"type":998,"value":4707}," to master expanding dictionaries with new data efficiently.",{"type":993,"tag":4709,"props":4710,"children":4713},"exercise",{"hint":4711,"prompt":4712},"Use dictionary assignment and update() method to modify the student information","Create a function that updates a student's information. Add new subjects and update existing ones, but don't change the student_id. Return the updated student dictionary.",[4714],{"type":993,"tag":1011,"props":4715,"children":4717},{"className":1013,"code":4716,"language":6,"meta":8,"style":8},"def update_student(student, new_info):\n    # TODO: Update student information with new data\n    # TODO: Don't change the student_id\n    pass\n\n# Test data\nstudent = {\n    'student_id': 12345,\n    'name': 'Alice',\n    'subjects': {'math': 85, 'science': 90}\n}\n\nnew_data = {\n    'student_id': 99999,  # Should not change\n    'email': 'alice@school.edu',\n    'subjects': {'math': 88, 'english': 92}  # Update math, add english\n}\n\nupdated_student = update_student(student, new_data)\nprint(updated_student)\n",[4718],{"type":993,"tag":1017,"props":4719,"children":4720},{"__ignoreMap":8},[4721,4738,4756,4772,4780,4787,4795,4811,4833,4853,4898,4905,4912,4928,4954,4975,5025,5032,5039,5056],{"type":993,"tag":1021,"props":4722,"children":4723},{"class":1023,"line":12},[4724,4728,4733],{"type":993,"tag":1021,"props":4725,"children":4726},{"style":1042},[4727],{"type":998,"value":2399},{"type":993,"tag":1021,"props":4729,"children":4730},{"style":2402},[4731],{"type":998,"value":4732}," update_student",{"type":993,"tag":1021,"props":4734,"children":4735},{"style":1036},[4736],{"type":998,"value":4737},"(student, new_info):\n",{"type":993,"tag":1021,"props":4739,"children":4740},{"class":1023,"line":27},[4741,4746,4751],{"type":993,"tag":1021,"props":4742,"children":4743},{"style":1027},[4744],{"type":998,"value":4745},"    # ",{"type":993,"tag":1021,"props":4747,"children":4748},{"style":1042},[4749],{"type":998,"value":4750},"TODO",{"type":993,"tag":1021,"props":4752,"children":4753},{"style":1027},[4754],{"type":998,"value":4755},": Update student information with new data\n",{"type":993,"tag":1021,"props":4757,"children":4758},{"class":1023,"line":36},[4759,4763,4767],{"type":993,"tag":1021,"props":4760,"children":4761},{"style":1027},[4762],{"type":998,"value":4745},{"type":993,"tag":1021,"props":4764,"children":4765},{"style":1042},[4766],{"type":998,"value":4750},{"type":993,"tag":1021,"props":4768,"children":4769},{"style":1027},[4770],{"type":998,"value":4771},": Don't change the student_id\n",{"type":993,"tag":1021,"props":4773,"children":4774},{"class":1023,"line":45},[4775],{"type":993,"tag":1021,"props":4776,"children":4777},{"style":1042},[4778],{"type":998,"value":4779},"    pass\n",{"type":993,"tag":1021,"props":4781,"children":4782},{"class":1023,"line":54},[4783],{"type":993,"tag":1021,"props":4784,"children":4785},{"emptyLinePlaceholder":13},[4786],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4788,"children":4789},{"class":1023,"line":63},[4790],{"type":993,"tag":1021,"props":4791,"children":4792},{"style":1027},[4793],{"type":998,"value":4794},"# Test data\n",{"type":993,"tag":1021,"props":4796,"children":4797},{"class":1023,"line":72},[4798,4803,4807],{"type":993,"tag":1021,"props":4799,"children":4800},{"style":1036},[4801],{"type":998,"value":4802},"student ",{"type":993,"tag":1021,"props":4804,"children":4805},{"style":1042},[4806],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4808,"children":4809},{"style":1036},[4810],{"type":998,"value":4031},{"type":993,"tag":1021,"props":4812,"children":4813},{"class":1023,"line":81},[4814,4819,4823,4828],{"type":993,"tag":1021,"props":4815,"children":4816},{"style":1053},[4817],{"type":998,"value":4818},"    'student_id'",{"type":993,"tag":1021,"props":4820,"children":4821},{"style":1036},[4822],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4824,"children":4825},{"style":1064},[4826],{"type":998,"value":4827},"12345",{"type":993,"tag":1021,"props":4829,"children":4830},{"style":1036},[4831],{"type":998,"value":4832},",\n",{"type":993,"tag":1021,"props":4834,"children":4835},{"class":1023,"line":91},[4836,4841,4845,4849],{"type":993,"tag":1021,"props":4837,"children":4838},{"style":1053},[4839],{"type":998,"value":4840},"    'name'",{"type":993,"tag":1021,"props":4842,"children":4843},{"style":1036},[4844],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4846,"children":4847},{"style":1053},[4848],{"type":998,"value":1609},{"type":993,"tag":1021,"props":4850,"children":4851},{"style":1036},[4852],{"type":998,"value":4832},{"type":993,"tag":1021,"props":4854,"children":4855},{"class":1023,"line":100},[4856,4861,4865,4869,4873,4877,4881,4885,4889,4894],{"type":993,"tag":1021,"props":4857,"children":4858},{"style":1053},[4859],{"type":998,"value":4860},"    'subjects'",{"type":993,"tag":1021,"props":4862,"children":4863},{"style":1036},[4864],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4866,"children":4867},{"style":1053},[4868],{"type":998,"value":1279},{"type":993,"tag":1021,"props":4870,"children":4871},{"style":1036},[4872],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4874,"children":4875},{"style":1064},[4876],{"type":998,"value":1288},{"type":993,"tag":1021,"props":4878,"children":4879},{"style":1036},[4880],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4882,"children":4883},{"style":1053},[4884],{"type":998,"value":1297},{"type":993,"tag":1021,"props":4886,"children":4887},{"style":1036},[4888],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4890,"children":4891},{"style":1064},[4892],{"type":998,"value":4893},"90",{"type":993,"tag":1021,"props":4895,"children":4896},{"style":1036},[4897],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4899,"children":4900},{"class":1023,"line":109},[4901],{"type":993,"tag":1021,"props":4902,"children":4903},{"style":1036},[4904],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4906,"children":4907},{"class":1023,"line":118},[4908],{"type":993,"tag":1021,"props":4909,"children":4910},{"emptyLinePlaceholder":13},[4911],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4913,"children":4914},{"class":1023,"line":127},[4915,4920,4924],{"type":993,"tag":1021,"props":4916,"children":4917},{"style":1036},[4918],{"type":998,"value":4919},"new_data ",{"type":993,"tag":1021,"props":4921,"children":4922},{"style":1042},[4923],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4925,"children":4926},{"style":1036},[4927],{"type":998,"value":4031},{"type":993,"tag":1021,"props":4929,"children":4930},{"class":1023,"line":136},[4931,4935,4939,4944,4949],{"type":993,"tag":1021,"props":4932,"children":4933},{"style":1053},[4934],{"type":998,"value":4818},{"type":993,"tag":1021,"props":4936,"children":4937},{"style":1036},[4938],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4940,"children":4941},{"style":1064},[4942],{"type":998,"value":4943},"99999",{"type":993,"tag":1021,"props":4945,"children":4946},{"style":1036},[4947],{"type":998,"value":4948},",  ",{"type":993,"tag":1021,"props":4950,"children":4951},{"style":1027},[4952],{"type":998,"value":4953},"# Should not change\n",{"type":993,"tag":1021,"props":4955,"children":4956},{"class":1023,"line":146},[4957,4962,4966,4971],{"type":993,"tag":1021,"props":4958,"children":4959},{"style":1053},[4960],{"type":998,"value":4961},"    'email'",{"type":993,"tag":1021,"props":4963,"children":4964},{"style":1036},[4965],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4967,"children":4968},{"style":1053},[4969],{"type":998,"value":4970},"'alice@school.edu'",{"type":993,"tag":1021,"props":4972,"children":4973},{"style":1036},[4974],{"type":998,"value":4832},{"type":993,"tag":1021,"props":4976,"children":4977},{"class":1023,"line":155},[4978,4982,4986,4990,4994,4999,5003,5007,5011,5015,5020],{"type":993,"tag":1021,"props":4979,"children":4980},{"style":1053},[4981],{"type":998,"value":4860},{"type":993,"tag":1021,"props":4983,"children":4984},{"style":1036},[4985],{"type":998,"value":3326},{"type":993,"tag":1021,"props":4987,"children":4988},{"style":1053},[4989],{"type":998,"value":1279},{"type":993,"tag":1021,"props":4991,"children":4992},{"style":1036},[4993],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4995,"children":4996},{"style":1064},[4997],{"type":998,"value":4998},"88",{"type":993,"tag":1021,"props":5000,"children":5001},{"style":1036},[5002],{"type":998,"value":1072},{"type":993,"tag":1021,"props":5004,"children":5005},{"style":1053},[5006],{"type":998,"value":1338},{"type":993,"tag":1021,"props":5008,"children":5009},{"style":1036},[5010],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5012,"children":5013},{"style":1064},[5014],{"type":998,"value":1306},{"type":993,"tag":1021,"props":5016,"children":5017},{"style":1036},[5018],{"type":998,"value":5019},"}  ",{"type":993,"tag":1021,"props":5021,"children":5022},{"style":1027},[5023],{"type":998,"value":5024},"# Update math, add english\n",{"type":993,"tag":1021,"props":5026,"children":5027},{"class":1023,"line":164},[5028],{"type":993,"tag":1021,"props":5029,"children":5030},{"style":1036},[5031],{"type":998,"value":1091},{"type":993,"tag":1021,"props":5033,"children":5034},{"class":1023,"line":173},[5035],{"type":993,"tag":1021,"props":5036,"children":5037},{"emptyLinePlaceholder":13},[5038],{"type":998,"value":1122},{"type":993,"tag":1021,"props":5040,"children":5041},{"class":1023,"line":182},[5042,5047,5051],{"type":993,"tag":1021,"props":5043,"children":5044},{"style":1036},[5045],{"type":998,"value":5046},"updated_student ",{"type":993,"tag":1021,"props":5048,"children":5049},{"style":1042},[5050],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5052,"children":5053},{"style":1036},[5054],{"type":998,"value":5055}," update_student(student, new_data)\n",{"type":993,"tag":1021,"props":5057,"children":5058},{"class":1023,"line":191},[5059,5063],{"type":993,"tag":1021,"props":5060,"children":5061},{"style":1064},[5062],{"type":998,"value":1099},{"type":993,"tag":1021,"props":5064,"children":5065},{"style":1036},[5066],{"type":998,"value":5067},"(updated_student)\n",{"type":993,"tag":1559,"props":5069,"children":5071},{"id":5070},"solution-and-explanation",[5072],{"type":998,"value":5073},"Solution and Explanation 💡",{"type":993,"tag":5075,"props":5076,"children":5077},"details",{},[5078,5086,5571,5579],{"type":993,"tag":5079,"props":5080,"children":5083},"summary",{"className":5081},[5082],"cursor-pointer",[5084],{"type":998,"value":5085},"Click to see the complete solution",{"type":993,"tag":1007,"props":5087,"children":5088},{},[5089],{"type":993,"tag":1011,"props":5090,"children":5092},{"className":1013,"code":5091,"language":6,"meta":8,"style":8},"def update_student(student, new_info):\n    # Create a copy to avoid changing the original\n    updated = student.copy()\n    \n    # Update most fields but protect student_id\n    for key, value in new_info.items():\n        if key == 'student_id':\n            continue  # Skip student_id\n        elif key == 'subjects':\n            # Update subjects dictionary\n            updated[key].update(value)\n        else:\n            # Update other fields normally\n            updated[key] = value\n    \n    return updated\n\n# Test data\nstudent = {\n    'student_id': 12345,\n    'name': 'Alice',\n    'subjects': {'math': 85, 'science': 90}\n}\n\nnew_data = {\n    'student_id': 99999,  # Should not change\n    'email': 'alice@school.edu',\n    'subjects': {'math': 88, 'english': 92}  # Update math, add english\n}\n\nupdated_student = update_student(student, new_data)\nprint(updated_student)\n",[5093],{"type":993,"tag":1017,"props":5094,"children":5095},{"__ignoreMap":8},[5096,5111,5119,5136,5143,5151,5171,5195,5208,5233,5241,5249,5260,5268,5284,5291,5303,5310,5317,5332,5351,5370,5413,5420,5427,5442,5465,5484,5531,5538,5545,5560],{"type":993,"tag":1021,"props":5097,"children":5098},{"class":1023,"line":12},[5099,5103,5107],{"type":993,"tag":1021,"props":5100,"children":5101},{"style":1042},[5102],{"type":998,"value":2399},{"type":993,"tag":1021,"props":5104,"children":5105},{"style":2402},[5106],{"type":998,"value":4732},{"type":993,"tag":1021,"props":5108,"children":5109},{"style":1036},[5110],{"type":998,"value":4737},{"type":993,"tag":1021,"props":5112,"children":5113},{"class":1023,"line":27},[5114],{"type":993,"tag":1021,"props":5115,"children":5116},{"style":1027},[5117],{"type":998,"value":5118},"    # Create a copy to avoid changing the original\n",{"type":993,"tag":1021,"props":5120,"children":5121},{"class":1023,"line":36},[5122,5127,5131],{"type":993,"tag":1021,"props":5123,"children":5124},{"style":1036},[5125],{"type":998,"value":5126},"    updated ",{"type":993,"tag":1021,"props":5128,"children":5129},{"style":1042},[5130],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5132,"children":5133},{"style":1036},[5134],{"type":998,"value":5135}," student.copy()\n",{"type":993,"tag":1021,"props":5137,"children":5138},{"class":1023,"line":45},[5139],{"type":993,"tag":1021,"props":5140,"children":5141},{"style":1036},[5142],{"type":998,"value":2493},{"type":993,"tag":1021,"props":5144,"children":5145},{"class":1023,"line":54},[5146],{"type":993,"tag":1021,"props":5147,"children":5148},{"style":1027},[5149],{"type":998,"value":5150},"    # Update most fields but protect student_id\n",{"type":993,"tag":1021,"props":5152,"children":5153},{"class":1023,"line":63},[5154,5158,5162,5166],{"type":993,"tag":1021,"props":5155,"children":5156},{"style":1042},[5157],{"type":998,"value":2509},{"type":993,"tag":1021,"props":5159,"children":5160},{"style":1036},[5161],{"type":998,"value":3006},{"type":993,"tag":1021,"props":5163,"children":5164},{"style":1042},[5165],{"type":998,"value":2519},{"type":993,"tag":1021,"props":5167,"children":5168},{"style":1036},[5169],{"type":998,"value":5170}," new_info.items():\n",{"type":993,"tag":1021,"props":5172,"children":5173},{"class":1023,"line":72},[5174,5178,5182,5186,5191],{"type":993,"tag":1021,"props":5175,"children":5176},{"style":1042},[5177],{"type":998,"value":2532},{"type":993,"tag":1021,"props":5179,"children":5180},{"style":1036},[5181],{"type":998,"value":2537},{"type":993,"tag":1021,"props":5183,"children":5184},{"style":1042},[5185],{"type":998,"value":3819},{"type":993,"tag":1021,"props":5187,"children":5188},{"style":1053},[5189],{"type":998,"value":5190}," 'student_id'",{"type":993,"tag":1021,"props":5192,"children":5193},{"style":1036},[5194],{"type":998,"value":3211},{"type":993,"tag":1021,"props":5196,"children":5197},{"class":1023,"line":81},[5198,5203],{"type":993,"tag":1021,"props":5199,"children":5200},{"style":1042},[5201],{"type":998,"value":5202},"            continue",{"type":993,"tag":1021,"props":5204,"children":5205},{"style":1027},[5206],{"type":998,"value":5207},"  # Skip student_id\n",{"type":993,"tag":1021,"props":5209,"children":5210},{"class":1023,"line":91},[5211,5216,5220,5224,5229],{"type":993,"tag":1021,"props":5212,"children":5213},{"style":1042},[5214],{"type":998,"value":5215},"        elif",{"type":993,"tag":1021,"props":5217,"children":5218},{"style":1036},[5219],{"type":998,"value":2537},{"type":993,"tag":1021,"props":5221,"children":5222},{"style":1042},[5223],{"type":998,"value":3819},{"type":993,"tag":1021,"props":5225,"children":5226},{"style":1053},[5227],{"type":998,"value":5228}," 'subjects'",{"type":993,"tag":1021,"props":5230,"children":5231},{"style":1036},[5232],{"type":998,"value":3211},{"type":993,"tag":1021,"props":5234,"children":5235},{"class":1023,"line":100},[5236],{"type":993,"tag":1021,"props":5237,"children":5238},{"style":1027},[5239],{"type":998,"value":5240},"            # Update subjects dictionary\n",{"type":993,"tag":1021,"props":5242,"children":5243},{"class":1023,"line":109},[5244],{"type":993,"tag":1021,"props":5245,"children":5246},{"style":1036},[5247],{"type":998,"value":5248},"            updated[key].update(value)\n",{"type":993,"tag":1021,"props":5250,"children":5251},{"class":1023,"line":118},[5252,5256],{"type":993,"tag":1021,"props":5253,"children":5254},{"style":1042},[5255],{"type":998,"value":3234},{"type":993,"tag":1021,"props":5257,"children":5258},{"style":1036},[5259],{"type":998,"value":3211},{"type":993,"tag":1021,"props":5261,"children":5262},{"class":1023,"line":127},[5263],{"type":993,"tag":1021,"props":5264,"children":5265},{"style":1027},[5266],{"type":998,"value":5267},"            # Update other fields normally\n",{"type":993,"tag":1021,"props":5269,"children":5270},{"class":1023,"line":136},[5271,5276,5280],{"type":993,"tag":1021,"props":5272,"children":5273},{"style":1036},[5274],{"type":998,"value":5275},"            updated[key] ",{"type":993,"tag":1021,"props":5277,"children":5278},{"style":1042},[5279],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5281,"children":5282},{"style":1036},[5283],{"type":998,"value":3129},{"type":993,"tag":1021,"props":5285,"children":5286},{"class":1023,"line":146},[5287],{"type":993,"tag":1021,"props":5288,"children":5289},{"style":1036},[5290],{"type":998,"value":2493},{"type":993,"tag":1021,"props":5292,"children":5293},{"class":1023,"line":155},[5294,5298],{"type":993,"tag":1021,"props":5295,"children":5296},{"style":1042},[5297],{"type":998,"value":2599},{"type":993,"tag":1021,"props":5299,"children":5300},{"style":1036},[5301],{"type":998,"value":5302}," updated\n",{"type":993,"tag":1021,"props":5304,"children":5305},{"class":1023,"line":164},[5306],{"type":993,"tag":1021,"props":5307,"children":5308},{"emptyLinePlaceholder":13},[5309],{"type":998,"value":1122},{"type":993,"tag":1021,"props":5311,"children":5312},{"class":1023,"line":173},[5313],{"type":993,"tag":1021,"props":5314,"children":5315},{"style":1027},[5316],{"type":998,"value":4794},{"type":993,"tag":1021,"props":5318,"children":5319},{"class":1023,"line":182},[5320,5324,5328],{"type":993,"tag":1021,"props":5321,"children":5322},{"style":1036},[5323],{"type":998,"value":4802},{"type":993,"tag":1021,"props":5325,"children":5326},{"style":1042},[5327],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5329,"children":5330},{"style":1036},[5331],{"type":998,"value":4031},{"type":993,"tag":1021,"props":5333,"children":5334},{"class":1023,"line":191},[5335,5339,5343,5347],{"type":993,"tag":1021,"props":5336,"children":5337},{"style":1053},[5338],{"type":998,"value":4818},{"type":993,"tag":1021,"props":5340,"children":5341},{"style":1036},[5342],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5344,"children":5345},{"style":1064},[5346],{"type":998,"value":4827},{"type":993,"tag":1021,"props":5348,"children":5349},{"style":1036},[5350],{"type":998,"value":4832},{"type":993,"tag":1021,"props":5352,"children":5353},{"class":1023,"line":201},[5354,5358,5362,5366],{"type":993,"tag":1021,"props":5355,"children":5356},{"style":1053},[5357],{"type":998,"value":4840},{"type":993,"tag":1021,"props":5359,"children":5360},{"style":1036},[5361],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5363,"children":5364},{"style":1053},[5365],{"type":998,"value":1609},{"type":993,"tag":1021,"props":5367,"children":5368},{"style":1036},[5369],{"type":998,"value":4832},{"type":993,"tag":1021,"props":5371,"children":5372},{"class":1023,"line":210},[5373,5377,5381,5385,5389,5393,5397,5401,5405,5409],{"type":993,"tag":1021,"props":5374,"children":5375},{"style":1053},[5376],{"type":998,"value":4860},{"type":993,"tag":1021,"props":5378,"children":5379},{"style":1036},[5380],{"type":998,"value":3326},{"type":993,"tag":1021,"props":5382,"children":5383},{"style":1053},[5384],{"type":998,"value":1279},{"type":993,"tag":1021,"props":5386,"children":5387},{"style":1036},[5388],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5390,"children":5391},{"style":1064},[5392],{"type":998,"value":1288},{"type":993,"tag":1021,"props":5394,"children":5395},{"style":1036},[5396],{"type":998,"value":1072},{"type":993,"tag":1021,"props":5398,"children":5399},{"style":1053},[5400],{"type":998,"value":1297},{"type":993,"tag":1021,"props":5402,"children":5403},{"style":1036},[5404],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5406,"children":5407},{"style":1064},[5408],{"type":998,"value":4893},{"type":993,"tag":1021,"props":5410,"children":5411},{"style":1036},[5412],{"type":998,"value":1091},{"type":993,"tag":1021,"props":5414,"children":5415},{"class":1023,"line":219},[5416],{"type":993,"tag":1021,"props":5417,"children":5418},{"style":1036},[5419],{"type":998,"value":1091},{"type":993,"tag":1021,"props":5421,"children":5422},{"class":1023,"line":228},[5423],{"type":993,"tag":1021,"props":5424,"children":5425},{"emptyLinePlaceholder":13},[5426],{"type":998,"value":1122},{"type":993,"tag":1021,"props":5428,"children":5429},{"class":1023,"line":238},[5430,5434,5438],{"type":993,"tag":1021,"props":5431,"children":5432},{"style":1036},[5433],{"type":998,"value":4919},{"type":993,"tag":1021,"props":5435,"children":5436},{"style":1042},[5437],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5439,"children":5440},{"style":1036},[5441],{"type":998,"value":4031},{"type":993,"tag":1021,"props":5443,"children":5444},{"class":1023,"line":247},[5445,5449,5453,5457,5461],{"type":993,"tag":1021,"props":5446,"children":5447},{"style":1053},[5448],{"type":998,"value":4818},{"type":993,"tag":1021,"props":5450,"children":5451},{"style":1036},[5452],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5454,"children":5455},{"style":1064},[5456],{"type":998,"value":4943},{"type":993,"tag":1021,"props":5458,"children":5459},{"style":1036},[5460],{"type":998,"value":4948},{"type":993,"tag":1021,"props":5462,"children":5463},{"style":1027},[5464],{"type":998,"value":4953},{"type":993,"tag":1021,"props":5466,"children":5467},{"class":1023,"line":256},[5468,5472,5476,5480],{"type":993,"tag":1021,"props":5469,"children":5470},{"style":1053},[5471],{"type":998,"value":4961},{"type":993,"tag":1021,"props":5473,"children":5474},{"style":1036},[5475],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5477,"children":5478},{"style":1053},[5479],{"type":998,"value":4970},{"type":993,"tag":1021,"props":5481,"children":5482},{"style":1036},[5483],{"type":998,"value":4832},{"type":993,"tag":1021,"props":5485,"children":5486},{"class":1023,"line":265},[5487,5491,5495,5499,5503,5507,5511,5515,5519,5523,5527],{"type":993,"tag":1021,"props":5488,"children":5489},{"style":1053},[5490],{"type":998,"value":4860},{"type":993,"tag":1021,"props":5492,"children":5493},{"style":1036},[5494],{"type":998,"value":3326},{"type":993,"tag":1021,"props":5496,"children":5497},{"style":1053},[5498],{"type":998,"value":1279},{"type":993,"tag":1021,"props":5500,"children":5501},{"style":1036},[5502],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5504,"children":5505},{"style":1064},[5506],{"type":998,"value":4998},{"type":993,"tag":1021,"props":5508,"children":5509},{"style":1036},[5510],{"type":998,"value":1072},{"type":993,"tag":1021,"props":5512,"children":5513},{"style":1053},[5514],{"type":998,"value":1338},{"type":993,"tag":1021,"props":5516,"children":5517},{"style":1036},[5518],{"type":998,"value":1061},{"type":993,"tag":1021,"props":5520,"children":5521},{"style":1064},[5522],{"type":998,"value":1306},{"type":993,"tag":1021,"props":5524,"children":5525},{"style":1036},[5526],{"type":998,"value":5019},{"type":993,"tag":1021,"props":5528,"children":5529},{"style":1027},[5530],{"type":998,"value":5024},{"type":993,"tag":1021,"props":5532,"children":5533},{"class":1023,"line":274},[5534],{"type":993,"tag":1021,"props":5535,"children":5536},{"style":1036},[5537],{"type":998,"value":1091},{"type":993,"tag":1021,"props":5539,"children":5540},{"class":1023,"line":284},[5541],{"type":993,"tag":1021,"props":5542,"children":5543},{"emptyLinePlaceholder":13},[5544],{"type":998,"value":1122},{"type":993,"tag":1021,"props":5546,"children":5547},{"class":1023,"line":293},[5548,5552,5556],{"type":993,"tag":1021,"props":5549,"children":5550},{"style":1036},[5551],{"type":998,"value":5046},{"type":993,"tag":1021,"props":5553,"children":5554},{"style":1042},[5555],{"type":998,"value":1045},{"type":993,"tag":1021,"props":5557,"children":5558},{"style":1036},[5559],{"type":998,"value":5055},{"type":993,"tag":1021,"props":5561,"children":5562},{"class":1023,"line":302},[5563,5567],{"type":993,"tag":1021,"props":5564,"children":5565},{"style":1064},[5566],{"type":998,"value":1099},{"type":993,"tag":1021,"props":5568,"children":5569},{"style":1036},[5570],{"type":998,"value":5067},{"type":993,"tag":1001,"props":5572,"children":5573},{},[5574],{"type":993,"tag":1502,"props":5575,"children":5576},{},[5577],{"type":998,"value":5578},"Key Learning Points:",{"type":993,"tag":5580,"props":5581,"children":5582},"ul",{},[5583,5604,5615,5632],{"type":993,"tag":5584,"props":5585,"children":5586},"li",{},[5587,5589,5594,5596,5602],{"type":998,"value":5588},"📌 ",{"type":993,"tag":1502,"props":5590,"children":5591},{},[5592],{"type":998,"value":5593},"Dictionary copying",{"type":998,"value":5595},": Use ",{"type":993,"tag":1017,"props":5597,"children":5599},{"className":5598},[],[5600],{"type":998,"value":5601},"copy()",{"type":998,"value":5603}," to avoid modifying the original dictionary",{"type":993,"tag":5584,"props":5605,"children":5606},{},[5607,5608,5613],{"type":998,"value":5588},{"type":993,"tag":1502,"props":5609,"children":5610},{},[5611],{"type":998,"value":5612},"Conditional updates",{"type":998,"value":5614},": Skip certain fields using if statements",{"type":993,"tag":5584,"props":5616,"children":5617},{},[5618,5619,5624,5625,5630],{"type":998,"value":5588},{"type":993,"tag":1502,"props":5620,"children":5621},{},[5622],{"type":998,"value":5623},"Nested dictionary updates",{"type":998,"value":5595},{"type":993,"tag":1017,"props":5626,"children":5628},{"className":5627},[],[5629],{"type":998,"value":1555},{"type":998,"value":5631}," method for dictionary values",{"type":993,"tag":5584,"props":5633,"children":5634},{},[5635,5636,5641],{"type":998,"value":5588},{"type":993,"tag":1502,"props":5637,"children":5638},{},[5639],{"type":998,"value":5640},"Iterating updates",{"type":998,"value":5642},": Loop through new data to apply changes selectively",{"type":993,"tag":1238,"props":5644,"children":5646},{"id":5645},"test-your-knowledge",[5647],{"type":998,"value":5648},"Test Your Knowledge",{"type":993,"tag":1001,"props":5650,"children":5651},{},[5652],{"type":998,"value":5653},"Test what you've learned about updating dictionaries:",{"type":993,"tag":5655,"props":5656,"children":5660},"redirect-button",{"icon":5657,"label":5658,"url":5659},"pi pi-send","Take Quiz","/tutorial-quiz/python/updating-dictionaries",[],{"type":993,"tag":1238,"props":5662,"children":5664},{"id":5663},"whats-next",[5665],{"type":998,"value":5666},"What's Next?",{"type":993,"tag":1001,"props":5668,"children":5669},{},[5670],{"type":998,"value":5671},"Now that you can update existing dictionary data, you're ready to learn specialized techniques for adding new items. Understanding different addition methods will complete your dictionary manipulation skills.",{"type":993,"tag":1001,"props":5673,"children":5674},{},[5675,5677,5681],{"type":998,"value":5676},"Ready to continue? Check out our lesson on ",{"type":993,"tag":4701,"props":5678,"children":5679},{"href":553},[5680],{"type":998,"value":554},{"type":998,"value":5682},".",{"type":993,"tag":5684,"props":5685,"children":5686},"style",{},[5687],{"type":998,"value":5688},"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":5690},[5691,5692,5697,5701,5702,5706,5710,5711],{"id":1240,"depth":27,"text":1243},{"id":1541,"depth":27,"text":1544,"children":5693},[5694,5695,5696],{"id":1561,"depth":36,"text":1564},{"id":1759,"depth":36,"text":1762},{"id":1944,"depth":36,"text":1947},{"id":2139,"depth":27,"text":2142,"children":5698},[5699,5700],{"id":2150,"depth":36,"text":2153},{"id":2373,"depth":36,"text":2376},{"id":2740,"depth":27,"text":2743},{"id":2908,"depth":27,"text":2911,"children":5703},[5704,5705],{"id":2914,"depth":36,"text":2917},{"id":3468,"depth":36,"text":3471},{"id":4194,"depth":27,"text":4197,"children":5707},[5708,5709],{"id":4205,"depth":36,"text":4208},{"id":5070,"depth":36,"text":5073},{"id":5645,"depth":27,"text":5648},{"id":5663,"depth":27,"text":5666},1782373742482]