[{"data":1,"prerenderedAt":4835},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/adding-dictionary-items":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",[552],{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"body":989,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},{"type":990,"children":991,"toc":4814},"root",[992,1000,1006,1257,1264,1269,1470,1518,1524,1529,1536,1541,1729,1735,1740,1962,1968,1973,2162,2168,2173,2179,2184,2426,2432,2437,2826,2832,3025,3031,3036,3321,3367,3373,3379,3384,3760,3766,3771,4201,4206,4219,4423,4429,4768,4774,4779,4786,4792,4797,4808],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":556},[997],{"type":998,"value":999},"text","➕ Adding Dictionary Items",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Expanding dictionaries with new data is a fundamental skill in Python programming. Whether you're building user profiles, collecting form data, or processing API responses, knowing how to add items efficiently makes your applications more dynamic and responsive.",{"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","# Adding items to a shopping cart\ncart = {'apples': 3, 'bananas': 2}\nprint(\"Original cart:\", cart)\n\n# Add new item\ncart['oranges'] = 4\nprint(\"After adding oranges:\", cart)\n\n# Add multiple items\ncart.update({'milk': 1, 'bread': 2})\nprint(\"Final cart:\", cart)\n",[1016],{"type":993,"tag":1017,"props":1018,"children":1019},"code",{"__ignoreMap":8},[1020,1031,1092,1115,1123,1131,1158,1178,1185,1193,1237],{"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},"# Adding items to a shopping cart\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},"cart ",{"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},"3",{"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},"2",{"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 cart:\"",{"type":993,"tag":1021,"props":1111,"children":1112},{"style":1036},[1113],{"type":998,"value":1114},", cart)\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},"cart[",{"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}," 4\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},"# Add multiple items\n",{"type":993,"tag":1021,"props":1194,"children":1195},{"class":1023,"line":100},[1196,1201,1206,1210,1215,1219,1224,1228,1232],{"type":993,"tag":1021,"props":1197,"children":1198},{"style":1036},[1199],{"type":998,"value":1200},"cart.update({",{"type":993,"tag":1021,"props":1202,"children":1203},{"style":1053},[1204],{"type":998,"value":1205},"'milk'",{"type":993,"tag":1021,"props":1207,"children":1208},{"style":1036},[1209],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1211,"children":1212},{"style":1064},[1213],{"type":998,"value":1214},"1",{"type":993,"tag":1021,"props":1216,"children":1217},{"style":1036},[1218],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1220,"children":1221},{"style":1053},[1222],{"type":998,"value":1223},"'bread'",{"type":993,"tag":1021,"props":1225,"children":1226},{"style":1036},[1227],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1229,"children":1230},{"style":1064},[1231],{"type":998,"value":1086},{"type":993,"tag":1021,"props":1233,"children":1234},{"style":1036},[1235],{"type":998,"value":1236},"})\n",{"type":993,"tag":1021,"props":1238,"children":1239},{"class":1023,"line":109},[1240,1244,1248,1253],{"type":993,"tag":1021,"props":1241,"children":1242},{"style":1064},[1243],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1245,"children":1246},{"style":1036},[1247],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1249,"children":1250},{"style":1053},[1251],{"type":998,"value":1252},"\"Final cart:\"",{"type":993,"tag":1021,"props":1254,"children":1255},{"style":1036},[1256],{"type":998,"value":1114},{"type":993,"tag":1258,"props":1259,"children":1261},"h2",{"id":1260},"direct-assignment-for-new-items",[1262],{"type":998,"value":1263},"🎯 Direct Assignment for New Items",{"type":993,"tag":1001,"props":1265,"children":1266},{},[1267],{"type":998,"value":1268},"Square bracket notation provides the most straightforward approach for adding individual dictionary items. When you assign a value to a non-existent key, Python automatically creates that key-value pair.",{"type":993,"tag":1007,"props":1270,"children":1271},{},[1272],{"type":993,"tag":1011,"props":1273,"children":1275},{"className":1013,"code":1274,"language":6,"meta":8,"style":8},"student_scores = {'math': 85, 'science': 92}\nprint(\"Original scores:\", student_scores)\n\n# Add new subjects\nstudent_scores['english'] = 78\nstudent_scores['history'] = 89\nstudent_scores['art'] = 95\n\nprint(\"Expanded scores:\", student_scores)\n",[1276],{"type":993,"tag":1017,"props":1277,"children":1278},{"__ignoreMap":8},[1279,1331,1352,1359,1367,1393,1418,1443,1450],{"type":993,"tag":1021,"props":1280,"children":1281},{"class":1023,"line":12},[1282,1287,1291,1295,1300,1304,1309,1313,1318,1322,1327],{"type":993,"tag":1021,"props":1283,"children":1284},{"style":1036},[1285],{"type":998,"value":1286},"student_scores ",{"type":993,"tag":1021,"props":1288,"children":1289},{"style":1042},[1290],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1292,"children":1293},{"style":1036},[1294],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1296,"children":1297},{"style":1053},[1298],{"type":998,"value":1299},"'math'",{"type":993,"tag":1021,"props":1301,"children":1302},{"style":1036},[1303],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1305,"children":1306},{"style":1064},[1307],{"type":998,"value":1308},"85",{"type":993,"tag":1021,"props":1310,"children":1311},{"style":1036},[1312],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1314,"children":1315},{"style":1053},[1316],{"type":998,"value":1317},"'science'",{"type":993,"tag":1021,"props":1319,"children":1320},{"style":1036},[1321],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1323,"children":1324},{"style":1064},[1325],{"type":998,"value":1326},"92",{"type":993,"tag":1021,"props":1328,"children":1329},{"style":1036},[1330],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1332,"children":1333},{"class":1023,"line":27},[1334,1338,1342,1347],{"type":993,"tag":1021,"props":1335,"children":1336},{"style":1064},[1337],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1339,"children":1340},{"style":1036},[1341],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1343,"children":1344},{"style":1053},[1345],{"type":998,"value":1346},"\"Original scores:\"",{"type":993,"tag":1021,"props":1348,"children":1349},{"style":1036},[1350],{"type":998,"value":1351},", student_scores)\n",{"type":993,"tag":1021,"props":1353,"children":1354},{"class":1023,"line":36},[1355],{"type":993,"tag":1021,"props":1356,"children":1357},{"emptyLinePlaceholder":13},[1358],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1360,"children":1361},{"class":1023,"line":45},[1362],{"type":993,"tag":1021,"props":1363,"children":1364},{"style":1027},[1365],{"type":998,"value":1366},"# Add new subjects\n",{"type":993,"tag":1021,"props":1368,"children":1369},{"class":1023,"line":54},[1370,1375,1380,1384,1388],{"type":993,"tag":1021,"props":1371,"children":1372},{"style":1036},[1373],{"type":998,"value":1374},"student_scores[",{"type":993,"tag":1021,"props":1376,"children":1377},{"style":1053},[1378],{"type":998,"value":1379},"'english'",{"type":993,"tag":1021,"props":1381,"children":1382},{"style":1036},[1383],{"type":998,"value":1148},{"type":993,"tag":1021,"props":1385,"children":1386},{"style":1042},[1387],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1389,"children":1390},{"style":1064},[1391],{"type":998,"value":1392}," 78\n",{"type":993,"tag":1021,"props":1394,"children":1395},{"class":1023,"line":63},[1396,1400,1405,1409,1413],{"type":993,"tag":1021,"props":1397,"children":1398},{"style":1036},[1399],{"type":998,"value":1374},{"type":993,"tag":1021,"props":1401,"children":1402},{"style":1053},[1403],{"type":998,"value":1404},"'history'",{"type":993,"tag":1021,"props":1406,"children":1407},{"style":1036},[1408],{"type":998,"value":1148},{"type":993,"tag":1021,"props":1410,"children":1411},{"style":1042},[1412],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1414,"children":1415},{"style":1064},[1416],{"type":998,"value":1417}," 89\n",{"type":993,"tag":1021,"props":1419,"children":1420},{"class":1023,"line":72},[1421,1425,1430,1434,1438],{"type":993,"tag":1021,"props":1422,"children":1423},{"style":1036},[1424],{"type":998,"value":1374},{"type":993,"tag":1021,"props":1426,"children":1427},{"style":1053},[1428],{"type":998,"value":1429},"'art'",{"type":993,"tag":1021,"props":1431,"children":1432},{"style":1036},[1433],{"type":998,"value":1148},{"type":993,"tag":1021,"props":1435,"children":1436},{"style":1042},[1437],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1439,"children":1440},{"style":1064},[1441],{"type":998,"value":1442}," 95\n",{"type":993,"tag":1021,"props":1444,"children":1445},{"class":1023,"line":81},[1446],{"type":993,"tag":1021,"props":1447,"children":1448},{"emptyLinePlaceholder":13},[1449],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1451,"children":1452},{"class":1023,"line":91},[1453,1457,1461,1466],{"type":993,"tag":1021,"props":1454,"children":1455},{"style":1064},[1456],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1458,"children":1459},{"style":1036},[1460],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1462,"children":1463},{"style":1053},[1464],{"type":998,"value":1465},"\"Expanded scores:\"",{"type":993,"tag":1021,"props":1467,"children":1468},{"style":1036},[1469],{"type":998,"value":1351},{"type":993,"tag":1471,"props":1472,"children":1476},"info-box",{"emoji":1473,"title":1474,"type":1475},"📝","Direct Assignment Benefits","info",[1477,1488,1498,1508],{"type":993,"tag":1001,"props":1478,"children":1479},{},[1480,1486],{"type":993,"tag":1481,"props":1482,"children":1483},"strong",{},[1484],{"type":998,"value":1485},"Simplicity:",{"type":998,"value":1487}," Uses familiar syntax that's easy to read and understand.",{"type":993,"tag":1001,"props":1489,"children":1490},{},[1491,1496],{"type":993,"tag":1481,"props":1492,"children":1493},{},[1494],{"type":998,"value":1495},"Immediate Creation:",{"type":998,"value":1497}," Automatically creates new keys without checking existence first.",{"type":993,"tag":1001,"props":1499,"children":1500},{},[1501,1506],{"type":993,"tag":1481,"props":1502,"children":1503},{},[1504],{"type":998,"value":1505},"Performance:",{"type":998,"value":1507}," O(1) average time complexity for single-item additions.",{"type":993,"tag":1001,"props":1509,"children":1510},{},[1511,1516],{"type":993,"tag":1481,"props":1512,"children":1513},{},[1514],{"type":998,"value":1515},"Flexibility:",{"type":998,"value":1517}," Works with any hashable key type and any value type.",{"type":993,"tag":1258,"props":1519,"children":1521},{"id":1520},"adding-multiple-items-with-update",[1522],{"type":998,"value":1523},"⚡ Adding Multiple Items with update()",{"type":993,"tag":1001,"props":1525,"children":1526},{},[1527],{"type":998,"value":1528},"The update() method excels at adding multiple dictionary items simultaneously. This bulk operation approach reduces code repetition and improves performance when expanding dictionaries with several new entries.",{"type":993,"tag":1530,"props":1531,"children":1533},"h3",{"id":1532},"from-dictionary-sources",[1534],{"type":998,"value":1535},"From Dictionary Sources",{"type":993,"tag":1001,"props":1537,"children":1538},{},[1539],{"type":998,"value":1540},"Merging entire dictionaries provides clean syntax for bulk additions from various data sources.",{"type":993,"tag":1007,"props":1542,"children":1543},{},[1544],{"type":993,"tag":1011,"props":1545,"children":1547},{"className":1013,"code":1546,"language":6,"meta":8,"style":8},"main_inventory = {'laptops': 15, 'mice': 50}\nnew_products = {'keyboards': 25, 'monitors': 8, 'headphones': 30}\n\nprint(\"Before expansion:\", main_inventory)\nmain_inventory.update(new_products)\nprint(\"After adding new products:\", main_inventory)\n",[1548],{"type":993,"tag":1017,"props":1549,"children":1550},{"__ignoreMap":8},[1551,1603,1673,1680,1701,1709],{"type":993,"tag":1021,"props":1552,"children":1553},{"class":1023,"line":12},[1554,1559,1563,1567,1572,1576,1581,1585,1590,1594,1599],{"type":993,"tag":1021,"props":1555,"children":1556},{"style":1036},[1557],{"type":998,"value":1558},"main_inventory ",{"type":993,"tag":1021,"props":1560,"children":1561},{"style":1042},[1562],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1564,"children":1565},{"style":1036},[1566],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1568,"children":1569},{"style":1053},[1570],{"type":998,"value":1571},"'laptops'",{"type":993,"tag":1021,"props":1573,"children":1574},{"style":1036},[1575],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1577,"children":1578},{"style":1064},[1579],{"type":998,"value":1580},"15",{"type":993,"tag":1021,"props":1582,"children":1583},{"style":1036},[1584],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1586,"children":1587},{"style":1053},[1588],{"type":998,"value":1589},"'mice'",{"type":993,"tag":1021,"props":1591,"children":1592},{"style":1036},[1593],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1595,"children":1596},{"style":1064},[1597],{"type":998,"value":1598},"50",{"type":993,"tag":1021,"props":1600,"children":1601},{"style":1036},[1602],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1604,"children":1605},{"class":1023,"line":27},[1606,1611,1615,1619,1624,1628,1633,1637,1642,1646,1651,1655,1660,1664,1669],{"type":993,"tag":1021,"props":1607,"children":1608},{"style":1036},[1609],{"type":998,"value":1610},"new_products ",{"type":993,"tag":1021,"props":1612,"children":1613},{"style":1042},[1614],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1616,"children":1617},{"style":1036},[1618],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1620,"children":1621},{"style":1053},[1622],{"type":998,"value":1623},"'keyboards'",{"type":993,"tag":1021,"props":1625,"children":1626},{"style":1036},[1627],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1629,"children":1630},{"style":1064},[1631],{"type":998,"value":1632},"25",{"type":993,"tag":1021,"props":1634,"children":1635},{"style":1036},[1636],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1638,"children":1639},{"style":1053},[1640],{"type":998,"value":1641},"'monitors'",{"type":993,"tag":1021,"props":1643,"children":1644},{"style":1036},[1645],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1647,"children":1648},{"style":1064},[1649],{"type":998,"value":1650},"8",{"type":993,"tag":1021,"props":1652,"children":1653},{"style":1036},[1654],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1656,"children":1657},{"style":1053},[1658],{"type":998,"value":1659},"'headphones'",{"type":993,"tag":1021,"props":1661,"children":1662},{"style":1036},[1663],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1665,"children":1666},{"style":1064},[1667],{"type":998,"value":1668},"30",{"type":993,"tag":1021,"props":1670,"children":1671},{"style":1036},[1672],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1674,"children":1675},{"class":1023,"line":36},[1676],{"type":993,"tag":1021,"props":1677,"children":1678},{"emptyLinePlaceholder":13},[1679],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1681,"children":1682},{"class":1023,"line":45},[1683,1687,1691,1696],{"type":993,"tag":1021,"props":1684,"children":1685},{"style":1064},[1686],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1688,"children":1689},{"style":1036},[1690],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1692,"children":1693},{"style":1053},[1694],{"type":998,"value":1695},"\"Before expansion:\"",{"type":993,"tag":1021,"props":1697,"children":1698},{"style":1036},[1699],{"type":998,"value":1700},", main_inventory)\n",{"type":993,"tag":1021,"props":1702,"children":1703},{"class":1023,"line":54},[1704],{"type":993,"tag":1021,"props":1705,"children":1706},{"style":1036},[1707],{"type":998,"value":1708},"main_inventory.update(new_products)\n",{"type":993,"tag":1021,"props":1710,"children":1711},{"class":1023,"line":63},[1712,1716,1720,1725],{"type":993,"tag":1021,"props":1713,"children":1714},{"style":1064},[1715],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1717,"children":1718},{"style":1036},[1719],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1721,"children":1722},{"style":1053},[1723],{"type":998,"value":1724},"\"After adding new products:\"",{"type":993,"tag":1021,"props":1726,"children":1727},{"style":1036},[1728],{"type":998,"value":1700},{"type":993,"tag":1530,"props":1730,"children":1732},{"id":1731},"from-keyword-arguments",[1733],{"type":998,"value":1734},"From Keyword Arguments",{"type":993,"tag":1001,"props":1736,"children":1737},{},[1738],{"type":998,"value":1739},"Keyword-based additions offer convenient syntax for adding multiple string-keyed items quickly.",{"type":993,"tag":1007,"props":1741,"children":1742},{},[1743],{"type":993,"tag":1011,"props":1744,"children":1746},{"className":1013,"code":1745,"language":6,"meta":8,"style":8},"user_prefs = {'theme': 'dark', 'font_size': 14}\nprint(\"Current preferences:\", user_prefs)\n\n# Add multiple preferences\nuser_prefs.update(\n    notifications=True,\n    auto_save=True,\n    language='English',\n    backup_frequency='daily'\n)\n\nprint(\"Enhanced preferences:\", user_prefs)\n",[1747],{"type":993,"tag":1017,"props":1748,"children":1749},{"__ignoreMap":8},[1750,1802,1823,1830,1838,1846,1869,1889,1910,1927,1935,1942],{"type":993,"tag":1021,"props":1751,"children":1752},{"class":1023,"line":12},[1753,1758,1762,1766,1771,1775,1780,1784,1789,1793,1798],{"type":993,"tag":1021,"props":1754,"children":1755},{"style":1036},[1756],{"type":998,"value":1757},"user_prefs ",{"type":993,"tag":1021,"props":1759,"children":1760},{"style":1042},[1761],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1763,"children":1764},{"style":1036},[1765],{"type":998,"value":1050},{"type":993,"tag":1021,"props":1767,"children":1768},{"style":1053},[1769],{"type":998,"value":1770},"'theme'",{"type":993,"tag":1021,"props":1772,"children":1773},{"style":1036},[1774],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1776,"children":1777},{"style":1053},[1778],{"type":998,"value":1779},"'dark'",{"type":993,"tag":1021,"props":1781,"children":1782},{"style":1036},[1783],{"type":998,"value":1072},{"type":993,"tag":1021,"props":1785,"children":1786},{"style":1053},[1787],{"type":998,"value":1788},"'font_size'",{"type":993,"tag":1021,"props":1790,"children":1791},{"style":1036},[1792],{"type":998,"value":1061},{"type":993,"tag":1021,"props":1794,"children":1795},{"style":1064},[1796],{"type":998,"value":1797},"14",{"type":993,"tag":1021,"props":1799,"children":1800},{"style":1036},[1801],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1803,"children":1804},{"class":1023,"line":27},[1805,1809,1813,1818],{"type":993,"tag":1021,"props":1806,"children":1807},{"style":1064},[1808],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1810,"children":1811},{"style":1036},[1812],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1814,"children":1815},{"style":1053},[1816],{"type":998,"value":1817},"\"Current preferences:\"",{"type":993,"tag":1021,"props":1819,"children":1820},{"style":1036},[1821],{"type":998,"value":1822},", user_prefs)\n",{"type":993,"tag":1021,"props":1824,"children":1825},{"class":1023,"line":36},[1826],{"type":993,"tag":1021,"props":1827,"children":1828},{"emptyLinePlaceholder":13},[1829],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1831,"children":1832},{"class":1023,"line":45},[1833],{"type":993,"tag":1021,"props":1834,"children":1835},{"style":1027},[1836],{"type":998,"value":1837},"# Add multiple preferences\n",{"type":993,"tag":1021,"props":1839,"children":1840},{"class":1023,"line":54},[1841],{"type":993,"tag":1021,"props":1842,"children":1843},{"style":1036},[1844],{"type":998,"value":1845},"user_prefs.update(\n",{"type":993,"tag":1021,"props":1847,"children":1848},{"class":1023,"line":63},[1849,1855,1859,1864],{"type":993,"tag":1021,"props":1850,"children":1852},{"style":1851},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1853],{"type":998,"value":1854},"    notifications",{"type":993,"tag":1021,"props":1856,"children":1857},{"style":1042},[1858],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1860,"children":1861},{"style":1064},[1862],{"type":998,"value":1863},"True",{"type":993,"tag":1021,"props":1865,"children":1866},{"style":1036},[1867],{"type":998,"value":1868},",\n",{"type":993,"tag":1021,"props":1870,"children":1871},{"class":1023,"line":72},[1872,1877,1881,1885],{"type":993,"tag":1021,"props":1873,"children":1874},{"style":1851},[1875],{"type":998,"value":1876},"    auto_save",{"type":993,"tag":1021,"props":1878,"children":1879},{"style":1042},[1880],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1882,"children":1883},{"style":1064},[1884],{"type":998,"value":1863},{"type":993,"tag":1021,"props":1886,"children":1887},{"style":1036},[1888],{"type":998,"value":1868},{"type":993,"tag":1021,"props":1890,"children":1891},{"class":1023,"line":81},[1892,1897,1901,1906],{"type":993,"tag":1021,"props":1893,"children":1894},{"style":1851},[1895],{"type":998,"value":1896},"    language",{"type":993,"tag":1021,"props":1898,"children":1899},{"style":1042},[1900],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1902,"children":1903},{"style":1053},[1904],{"type":998,"value":1905},"'English'",{"type":993,"tag":1021,"props":1907,"children":1908},{"style":1036},[1909],{"type":998,"value":1868},{"type":993,"tag":1021,"props":1911,"children":1912},{"class":1023,"line":91},[1913,1918,1922],{"type":993,"tag":1021,"props":1914,"children":1915},{"style":1851},[1916],{"type":998,"value":1917},"    backup_frequency",{"type":993,"tag":1021,"props":1919,"children":1920},{"style":1042},[1921],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1923,"children":1924},{"style":1053},[1925],{"type":998,"value":1926},"'daily'\n",{"type":993,"tag":1021,"props":1928,"children":1929},{"class":1023,"line":100},[1930],{"type":993,"tag":1021,"props":1931,"children":1932},{"style":1036},[1933],{"type":998,"value":1934},")\n",{"type":993,"tag":1021,"props":1936,"children":1937},{"class":1023,"line":109},[1938],{"type":993,"tag":1021,"props":1939,"children":1940},{"emptyLinePlaceholder":13},[1941],{"type":998,"value":1122},{"type":993,"tag":1021,"props":1943,"children":1944},{"class":1023,"line":118},[1945,1949,1953,1958],{"type":993,"tag":1021,"props":1946,"children":1947},{"style":1064},[1948],{"type":998,"value":1099},{"type":993,"tag":1021,"props":1950,"children":1951},{"style":1036},[1952],{"type":998,"value":1104},{"type":993,"tag":1021,"props":1954,"children":1955},{"style":1053},[1956],{"type":998,"value":1957},"\"Enhanced preferences:\"",{"type":993,"tag":1021,"props":1959,"children":1960},{"style":1036},[1961],{"type":998,"value":1822},{"type":993,"tag":1530,"props":1963,"children":1965},{"id":1964},"from-sequence-data",[1966],{"type":998,"value":1967},"From Sequence Data",{"type":993,"tag":1001,"props":1969,"children":1970},{},[1971],{"type":998,"value":1972},"Converting sequences into dictionary additions enables dynamic data processing from various sources.",{"type":993,"tag":1007,"props":1974,"children":1975},{},[1976],{"type":993,"tag":1011,"props":1977,"children":1979},{"className":1013,"code":1978,"language":6,"meta":8,"style":8},"survey_results = {'question1': 'Yes', 'question2': 'No'}\nnew_responses = [('question3', 'Maybe'), ('question4', 'Yes'), ('question5', 'No')]\n\nprint(\"Initial survey:\", survey_results)\nsurvey_results.update(new_responses)\nprint(\"Complete survey:\", survey_results)\n",[1980],{"type":993,"tag":1017,"props":1981,"children":1982},{"__ignoreMap":8},[1983,2035,2106,2113,2134,2142],{"type":993,"tag":1021,"props":1984,"children":1985},{"class":1023,"line":12},[1986,1991,1995,1999,2004,2008,2013,2017,2022,2026,2031],{"type":993,"tag":1021,"props":1987,"children":1988},{"style":1036},[1989],{"type":998,"value":1990},"survey_results ",{"type":993,"tag":1021,"props":1992,"children":1993},{"style":1042},[1994],{"type":998,"value":1045},{"type":993,"tag":1021,"props":1996,"children":1997},{"style":1036},[1998],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2000,"children":2001},{"style":1053},[2002],{"type":998,"value":2003},"'question1'",{"type":993,"tag":1021,"props":2005,"children":2006},{"style":1036},[2007],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2009,"children":2010},{"style":1053},[2011],{"type":998,"value":2012},"'Yes'",{"type":993,"tag":1021,"props":2014,"children":2015},{"style":1036},[2016],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2018,"children":2019},{"style":1053},[2020],{"type":998,"value":2021},"'question2'",{"type":993,"tag":1021,"props":2023,"children":2024},{"style":1036},[2025],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2027,"children":2028},{"style":1053},[2029],{"type":998,"value":2030},"'No'",{"type":993,"tag":1021,"props":2032,"children":2033},{"style":1036},[2034],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2036,"children":2037},{"class":1023,"line":27},[2038,2043,2047,2052,2057,2061,2066,2071,2076,2080,2084,2088,2093,2097,2101],{"type":993,"tag":1021,"props":2039,"children":2040},{"style":1036},[2041],{"type":998,"value":2042},"new_responses ",{"type":993,"tag":1021,"props":2044,"children":2045},{"style":1042},[2046],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2048,"children":2049},{"style":1036},[2050],{"type":998,"value":2051}," [(",{"type":993,"tag":1021,"props":2053,"children":2054},{"style":1053},[2055],{"type":998,"value":2056},"'question3'",{"type":993,"tag":1021,"props":2058,"children":2059},{"style":1036},[2060],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2062,"children":2063},{"style":1053},[2064],{"type":998,"value":2065},"'Maybe'",{"type":993,"tag":1021,"props":2067,"children":2068},{"style":1036},[2069],{"type":998,"value":2070},"), (",{"type":993,"tag":1021,"props":2072,"children":2073},{"style":1053},[2074],{"type":998,"value":2075},"'question4'",{"type":993,"tag":1021,"props":2077,"children":2078},{"style":1036},[2079],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2081,"children":2082},{"style":1053},[2083],{"type":998,"value":2012},{"type":993,"tag":1021,"props":2085,"children":2086},{"style":1036},[2087],{"type":998,"value":2070},{"type":993,"tag":1021,"props":2089,"children":2090},{"style":1053},[2091],{"type":998,"value":2092},"'question5'",{"type":993,"tag":1021,"props":2094,"children":2095},{"style":1036},[2096],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2098,"children":2099},{"style":1053},[2100],{"type":998,"value":2030},{"type":993,"tag":1021,"props":2102,"children":2103},{"style":1036},[2104],{"type":998,"value":2105},")]\n",{"type":993,"tag":1021,"props":2107,"children":2108},{"class":1023,"line":36},[2109],{"type":993,"tag":1021,"props":2110,"children":2111},{"emptyLinePlaceholder":13},[2112],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2114,"children":2115},{"class":1023,"line":45},[2116,2120,2124,2129],{"type":993,"tag":1021,"props":2117,"children":2118},{"style":1064},[2119],{"type":998,"value":1099},{"type":993,"tag":1021,"props":2121,"children":2122},{"style":1036},[2123],{"type":998,"value":1104},{"type":993,"tag":1021,"props":2125,"children":2126},{"style":1053},[2127],{"type":998,"value":2128},"\"Initial survey:\"",{"type":993,"tag":1021,"props":2130,"children":2131},{"style":1036},[2132],{"type":998,"value":2133},", survey_results)\n",{"type":993,"tag":1021,"props":2135,"children":2136},{"class":1023,"line":54},[2137],{"type":993,"tag":1021,"props":2138,"children":2139},{"style":1036},[2140],{"type":998,"value":2141},"survey_results.update(new_responses)\n",{"type":993,"tag":1021,"props":2143,"children":2144},{"class":1023,"line":63},[2145,2149,2153,2158],{"type":993,"tag":1021,"props":2146,"children":2147},{"style":1064},[2148],{"type":998,"value":1099},{"type":993,"tag":1021,"props":2150,"children":2151},{"style":1036},[2152],{"type":998,"value":1104},{"type":993,"tag":1021,"props":2154,"children":2155},{"style":1053},[2156],{"type":998,"value":2157},"\"Complete survey:\"",{"type":993,"tag":1021,"props":2159,"children":2160},{"style":1036},[2161],{"type":998,"value":2133},{"type":993,"tag":1258,"props":2163,"children":2165},{"id":2164},"conditional-item-addition",[2166],{"type":998,"value":2167},"🚀 Conditional Item Addition",{"type":993,"tag":1001,"props":2169,"children":2170},{},[2171],{"type":998,"value":2172},"Smart addition patterns prevent accidental overwrites and enable sophisticated data management strategies that preserve existing information while selectively expanding dictionaries.",{"type":993,"tag":1530,"props":2174,"children":2176},{"id":2175},"adding-only-new-keys",[2177],{"type":998,"value":2178},"Adding Only New Keys",{"type":993,"tag":1001,"props":2180,"children":2181},{},[2182],{"type":998,"value":2183},"Protecting existing data while adding new entries maintains data integrity in applications where preserving original values is crucial.",{"type":993,"tag":1007,"props":2185,"children":2186},{},[2187],{"type":993,"tag":1011,"props":2188,"children":2190},{"className":1013,"code":2189,"language":6,"meta":8,"style":8},"user_profile = {'name': 'Alice', 'email': 'alice@example.com'}\npotential_updates = {'email': 'new@example.com', 'phone': '555-1234', 'city': 'Boston'}\n\n# Add only non-existing keys\nfor key, value in potential_updates.items():\n    if key not in user_profile:\n        user_profile[key] = value\n\nprint(\"Safely updated profile:\", user_profile)\n",[2191],{"type":993,"tag":1017,"props":2192,"children":2193},{"__ignoreMap":8},[2194,2246,2315,2322,2330,2353,2381,2398,2405],{"type":993,"tag":1021,"props":2195,"children":2196},{"class":1023,"line":12},[2197,2202,2206,2210,2215,2219,2224,2228,2233,2237,2242],{"type":993,"tag":1021,"props":2198,"children":2199},{"style":1036},[2200],{"type":998,"value":2201},"user_profile ",{"type":993,"tag":1021,"props":2203,"children":2204},{"style":1042},[2205],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2207,"children":2208},{"style":1036},[2209],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2211,"children":2212},{"style":1053},[2213],{"type":998,"value":2214},"'name'",{"type":993,"tag":1021,"props":2216,"children":2217},{"style":1036},[2218],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2220,"children":2221},{"style":1053},[2222],{"type":998,"value":2223},"'Alice'",{"type":993,"tag":1021,"props":2225,"children":2226},{"style":1036},[2227],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2229,"children":2230},{"style":1053},[2231],{"type":998,"value":2232},"'email'",{"type":993,"tag":1021,"props":2234,"children":2235},{"style":1036},[2236],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2238,"children":2239},{"style":1053},[2240],{"type":998,"value":2241},"'alice@example.com'",{"type":993,"tag":1021,"props":2243,"children":2244},{"style":1036},[2245],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2247,"children":2248},{"class":1023,"line":27},[2249,2254,2258,2262,2266,2270,2275,2279,2284,2288,2293,2297,2302,2306,2311],{"type":993,"tag":1021,"props":2250,"children":2251},{"style":1036},[2252],{"type":998,"value":2253},"potential_updates ",{"type":993,"tag":1021,"props":2255,"children":2256},{"style":1042},[2257],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2259,"children":2260},{"style":1036},[2261],{"type":998,"value":1050},{"type":993,"tag":1021,"props":2263,"children":2264},{"style":1053},[2265],{"type":998,"value":2232},{"type":993,"tag":1021,"props":2267,"children":2268},{"style":1036},[2269],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2271,"children":2272},{"style":1053},[2273],{"type":998,"value":2274},"'new@example.com'",{"type":993,"tag":1021,"props":2276,"children":2277},{"style":1036},[2278],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2280,"children":2281},{"style":1053},[2282],{"type":998,"value":2283},"'phone'",{"type":993,"tag":1021,"props":2285,"children":2286},{"style":1036},[2287],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2289,"children":2290},{"style":1053},[2291],{"type":998,"value":2292},"'555-1234'",{"type":993,"tag":1021,"props":2294,"children":2295},{"style":1036},[2296],{"type":998,"value":1072},{"type":993,"tag":1021,"props":2298,"children":2299},{"style":1053},[2300],{"type":998,"value":2301},"'city'",{"type":993,"tag":1021,"props":2303,"children":2304},{"style":1036},[2305],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2307,"children":2308},{"style":1053},[2309],{"type":998,"value":2310},"'Boston'",{"type":993,"tag":1021,"props":2312,"children":2313},{"style":1036},[2314],{"type":998,"value":1091},{"type":993,"tag":1021,"props":2316,"children":2317},{"class":1023,"line":36},[2318],{"type":993,"tag":1021,"props":2319,"children":2320},{"emptyLinePlaceholder":13},[2321],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2323,"children":2324},{"class":1023,"line":45},[2325],{"type":993,"tag":1021,"props":2326,"children":2327},{"style":1027},[2328],{"type":998,"value":2329},"# Add only non-existing keys\n",{"type":993,"tag":1021,"props":2331,"children":2332},{"class":1023,"line":54},[2333,2338,2343,2348],{"type":993,"tag":1021,"props":2334,"children":2335},{"style":1042},[2336],{"type":998,"value":2337},"for",{"type":993,"tag":1021,"props":2339,"children":2340},{"style":1036},[2341],{"type":998,"value":2342}," key, value ",{"type":993,"tag":1021,"props":2344,"children":2345},{"style":1042},[2346],{"type":998,"value":2347},"in",{"type":993,"tag":1021,"props":2349,"children":2350},{"style":1036},[2351],{"type":998,"value":2352}," potential_updates.items():\n",{"type":993,"tag":1021,"props":2354,"children":2355},{"class":1023,"line":63},[2356,2361,2366,2371,2376],{"type":993,"tag":1021,"props":2357,"children":2358},{"style":1042},[2359],{"type":998,"value":2360},"    if",{"type":993,"tag":1021,"props":2362,"children":2363},{"style":1036},[2364],{"type":998,"value":2365}," key ",{"type":993,"tag":1021,"props":2367,"children":2368},{"style":1042},[2369],{"type":998,"value":2370},"not",{"type":993,"tag":1021,"props":2372,"children":2373},{"style":1042},[2374],{"type":998,"value":2375}," in",{"type":993,"tag":1021,"props":2377,"children":2378},{"style":1036},[2379],{"type":998,"value":2380}," user_profile:\n",{"type":993,"tag":1021,"props":2382,"children":2383},{"class":1023,"line":72},[2384,2389,2393],{"type":993,"tag":1021,"props":2385,"children":2386},{"style":1036},[2387],{"type":998,"value":2388},"        user_profile[key] ",{"type":993,"tag":1021,"props":2390,"children":2391},{"style":1042},[2392],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2394,"children":2395},{"style":1036},[2396],{"type":998,"value":2397}," value\n",{"type":993,"tag":1021,"props":2399,"children":2400},{"class":1023,"line":81},[2401],{"type":993,"tag":1021,"props":2402,"children":2403},{"emptyLinePlaceholder":13},[2404],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2406,"children":2407},{"class":1023,"line":91},[2408,2412,2416,2421],{"type":993,"tag":1021,"props":2409,"children":2410},{"style":1064},[2411],{"type":998,"value":1099},{"type":993,"tag":1021,"props":2413,"children":2414},{"style":1036},[2415],{"type":998,"value":1104},{"type":993,"tag":1021,"props":2417,"children":2418},{"style":1053},[2419],{"type":998,"value":2420},"\"Safely updated profile:\"",{"type":993,"tag":1021,"props":2422,"children":2423},{"style":1036},[2424],{"type":998,"value":2425},", user_profile)\n",{"type":993,"tag":1530,"props":2427,"children":2429},{"id":2428},"default-value-patterns",[2430],{"type":998,"value":2431},"Default Value Patterns",{"type":993,"tag":1001,"props":2433,"children":2434},{},[2435],{"type":998,"value":2436},"Ensuring consistent dictionary structure while adding new items creates predictable data layouts for application logic.",{"type":993,"tag":1007,"props":2438,"children":2439},{},[2440],{"type":993,"tag":1011,"props":2441,"children":2443},{"className":1013,"code":2442,"language":6,"meta":8,"style":8},"def initialize_game_settings(custom_settings=None):\n    \"\"\"Initialize game with defaults and custom settings\"\"\"\n    defaults = {\n        'difficulty': 'medium',\n        'sound': True,\n        'graphics': 'high',\n        'controls': 'keyboard'\n    }\n    \n    if custom_settings:\n        # Add custom settings without overwriting defaults\n        for key, value in custom_settings.items():\n            if key not in defaults:\n                defaults[key] = value\n    \n    return defaults\n\n# Create customized game settings\ngame_config = initialize_game_settings({\n    'multiplayer': True,\n    'save_slot': 3,\n    'tutorial': False\n})\n\nprint(\"Game configuration:\", game_config)\n",[2444],{"type":993,"tag":1017,"props":2445,"children":2446},{"__ignoreMap":8},[2447,2480,2488,2505,2526,2546,2567,2584,2592,2600,2612,2620,2641,2666,2682,2689,2702,2709,2717,2734,2754,2774,2791,2798,2805],{"type":993,"tag":1021,"props":2448,"children":2449},{"class":1023,"line":12},[2450,2455,2461,2466,2470,2475],{"type":993,"tag":1021,"props":2451,"children":2452},{"style":1042},[2453],{"type":998,"value":2454},"def",{"type":993,"tag":1021,"props":2456,"children":2458},{"style":2457},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[2459],{"type":998,"value":2460}," initialize_game_settings",{"type":993,"tag":1021,"props":2462,"children":2463},{"style":1036},[2464],{"type":998,"value":2465},"(custom_settings",{"type":993,"tag":1021,"props":2467,"children":2468},{"style":1042},[2469],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2471,"children":2472},{"style":1064},[2473],{"type":998,"value":2474},"None",{"type":993,"tag":1021,"props":2476,"children":2477},{"style":1036},[2478],{"type":998,"value":2479},"):\n",{"type":993,"tag":1021,"props":2481,"children":2482},{"class":1023,"line":27},[2483],{"type":993,"tag":1021,"props":2484,"children":2485},{"style":1053},[2486],{"type":998,"value":2487},"    \"\"\"Initialize game with defaults and custom settings\"\"\"\n",{"type":993,"tag":1021,"props":2489,"children":2490},{"class":1023,"line":36},[2491,2496,2500],{"type":993,"tag":1021,"props":2492,"children":2493},{"style":1036},[2494],{"type":998,"value":2495},"    defaults ",{"type":993,"tag":1021,"props":2497,"children":2498},{"style":1042},[2499],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2501,"children":2502},{"style":1036},[2503],{"type":998,"value":2504}," {\n",{"type":993,"tag":1021,"props":2506,"children":2507},{"class":1023,"line":45},[2508,2513,2517,2522],{"type":993,"tag":1021,"props":2509,"children":2510},{"style":1053},[2511],{"type":998,"value":2512},"        'difficulty'",{"type":993,"tag":1021,"props":2514,"children":2515},{"style":1036},[2516],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2518,"children":2519},{"style":1053},[2520],{"type":998,"value":2521},"'medium'",{"type":993,"tag":1021,"props":2523,"children":2524},{"style":1036},[2525],{"type":998,"value":1868},{"type":993,"tag":1021,"props":2527,"children":2528},{"class":1023,"line":54},[2529,2534,2538,2542],{"type":993,"tag":1021,"props":2530,"children":2531},{"style":1053},[2532],{"type":998,"value":2533},"        'sound'",{"type":993,"tag":1021,"props":2535,"children":2536},{"style":1036},[2537],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2539,"children":2540},{"style":1064},[2541],{"type":998,"value":1863},{"type":993,"tag":1021,"props":2543,"children":2544},{"style":1036},[2545],{"type":998,"value":1868},{"type":993,"tag":1021,"props":2547,"children":2548},{"class":1023,"line":63},[2549,2554,2558,2563],{"type":993,"tag":1021,"props":2550,"children":2551},{"style":1053},[2552],{"type":998,"value":2553},"        'graphics'",{"type":993,"tag":1021,"props":2555,"children":2556},{"style":1036},[2557],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2559,"children":2560},{"style":1053},[2561],{"type":998,"value":2562},"'high'",{"type":993,"tag":1021,"props":2564,"children":2565},{"style":1036},[2566],{"type":998,"value":1868},{"type":993,"tag":1021,"props":2568,"children":2569},{"class":1023,"line":72},[2570,2575,2579],{"type":993,"tag":1021,"props":2571,"children":2572},{"style":1053},[2573],{"type":998,"value":2574},"        'controls'",{"type":993,"tag":1021,"props":2576,"children":2577},{"style":1036},[2578],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2580,"children":2581},{"style":1053},[2582],{"type":998,"value":2583},"'keyboard'\n",{"type":993,"tag":1021,"props":2585,"children":2586},{"class":1023,"line":81},[2587],{"type":993,"tag":1021,"props":2588,"children":2589},{"style":1036},[2590],{"type":998,"value":2591},"    }\n",{"type":993,"tag":1021,"props":2593,"children":2594},{"class":1023,"line":91},[2595],{"type":993,"tag":1021,"props":2596,"children":2597},{"style":1036},[2598],{"type":998,"value":2599},"    \n",{"type":993,"tag":1021,"props":2601,"children":2602},{"class":1023,"line":100},[2603,2607],{"type":993,"tag":1021,"props":2604,"children":2605},{"style":1042},[2606],{"type":998,"value":2360},{"type":993,"tag":1021,"props":2608,"children":2609},{"style":1036},[2610],{"type":998,"value":2611}," custom_settings:\n",{"type":993,"tag":1021,"props":2613,"children":2614},{"class":1023,"line":109},[2615],{"type":993,"tag":1021,"props":2616,"children":2617},{"style":1027},[2618],{"type":998,"value":2619},"        # Add custom settings without overwriting defaults\n",{"type":993,"tag":1021,"props":2621,"children":2622},{"class":1023,"line":118},[2623,2628,2632,2636],{"type":993,"tag":1021,"props":2624,"children":2625},{"style":1042},[2626],{"type":998,"value":2627},"        for",{"type":993,"tag":1021,"props":2629,"children":2630},{"style":1036},[2631],{"type":998,"value":2342},{"type":993,"tag":1021,"props":2633,"children":2634},{"style":1042},[2635],{"type":998,"value":2347},{"type":993,"tag":1021,"props":2637,"children":2638},{"style":1036},[2639],{"type":998,"value":2640}," custom_settings.items():\n",{"type":993,"tag":1021,"props":2642,"children":2643},{"class":1023,"line":127},[2644,2649,2653,2657,2661],{"type":993,"tag":1021,"props":2645,"children":2646},{"style":1042},[2647],{"type":998,"value":2648},"            if",{"type":993,"tag":1021,"props":2650,"children":2651},{"style":1036},[2652],{"type":998,"value":2365},{"type":993,"tag":1021,"props":2654,"children":2655},{"style":1042},[2656],{"type":998,"value":2370},{"type":993,"tag":1021,"props":2658,"children":2659},{"style":1042},[2660],{"type":998,"value":2375},{"type":993,"tag":1021,"props":2662,"children":2663},{"style":1036},[2664],{"type":998,"value":2665}," defaults:\n",{"type":993,"tag":1021,"props":2667,"children":2668},{"class":1023,"line":136},[2669,2674,2678],{"type":993,"tag":1021,"props":2670,"children":2671},{"style":1036},[2672],{"type":998,"value":2673},"                defaults[key] ",{"type":993,"tag":1021,"props":2675,"children":2676},{"style":1042},[2677],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2679,"children":2680},{"style":1036},[2681],{"type":998,"value":2397},{"type":993,"tag":1021,"props":2683,"children":2684},{"class":1023,"line":146},[2685],{"type":993,"tag":1021,"props":2686,"children":2687},{"style":1036},[2688],{"type":998,"value":2599},{"type":993,"tag":1021,"props":2690,"children":2691},{"class":1023,"line":155},[2692,2697],{"type":993,"tag":1021,"props":2693,"children":2694},{"style":1042},[2695],{"type":998,"value":2696},"    return",{"type":993,"tag":1021,"props":2698,"children":2699},{"style":1036},[2700],{"type":998,"value":2701}," defaults\n",{"type":993,"tag":1021,"props":2703,"children":2704},{"class":1023,"line":164},[2705],{"type":993,"tag":1021,"props":2706,"children":2707},{"emptyLinePlaceholder":13},[2708],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2710,"children":2711},{"class":1023,"line":173},[2712],{"type":993,"tag":1021,"props":2713,"children":2714},{"style":1027},[2715],{"type":998,"value":2716},"# Create customized game settings\n",{"type":993,"tag":1021,"props":2718,"children":2719},{"class":1023,"line":182},[2720,2725,2729],{"type":993,"tag":1021,"props":2721,"children":2722},{"style":1036},[2723],{"type":998,"value":2724},"game_config ",{"type":993,"tag":1021,"props":2726,"children":2727},{"style":1042},[2728],{"type":998,"value":1045},{"type":993,"tag":1021,"props":2730,"children":2731},{"style":1036},[2732],{"type":998,"value":2733}," initialize_game_settings({\n",{"type":993,"tag":1021,"props":2735,"children":2736},{"class":1023,"line":191},[2737,2742,2746,2750],{"type":993,"tag":1021,"props":2738,"children":2739},{"style":1053},[2740],{"type":998,"value":2741},"    'multiplayer'",{"type":993,"tag":1021,"props":2743,"children":2744},{"style":1036},[2745],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2747,"children":2748},{"style":1064},[2749],{"type":998,"value":1863},{"type":993,"tag":1021,"props":2751,"children":2752},{"style":1036},[2753],{"type":998,"value":1868},{"type":993,"tag":1021,"props":2755,"children":2756},{"class":1023,"line":201},[2757,2762,2766,2770],{"type":993,"tag":1021,"props":2758,"children":2759},{"style":1053},[2760],{"type":998,"value":2761},"    'save_slot'",{"type":993,"tag":1021,"props":2763,"children":2764},{"style":1036},[2765],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2767,"children":2768},{"style":1064},[2769],{"type":998,"value":1067},{"type":993,"tag":1021,"props":2771,"children":2772},{"style":1036},[2773],{"type":998,"value":1868},{"type":993,"tag":1021,"props":2775,"children":2776},{"class":1023,"line":210},[2777,2782,2786],{"type":993,"tag":1021,"props":2778,"children":2779},{"style":1053},[2780],{"type":998,"value":2781},"    'tutorial'",{"type":993,"tag":1021,"props":2783,"children":2784},{"style":1036},[2785],{"type":998,"value":1061},{"type":993,"tag":1021,"props":2787,"children":2788},{"style":1064},[2789],{"type":998,"value":2790},"False\n",{"type":993,"tag":1021,"props":2792,"children":2793},{"class":1023,"line":219},[2794],{"type":993,"tag":1021,"props":2795,"children":2796},{"style":1036},[2797],{"type":998,"value":1236},{"type":993,"tag":1021,"props":2799,"children":2800},{"class":1023,"line":228},[2801],{"type":993,"tag":1021,"props":2802,"children":2803},{"emptyLinePlaceholder":13},[2804],{"type":998,"value":1122},{"type":993,"tag":1021,"props":2806,"children":2807},{"class":1023,"line":238},[2808,2812,2816,2821],{"type":993,"tag":1021,"props":2809,"children":2810},{"style":1064},[2811],{"type":998,"value":1099},{"type":993,"tag":1021,"props":2813,"children":2814},{"style":1036},[2815],{"type":998,"value":1104},{"type":993,"tag":1021,"props":2817,"children":2818},{"style":1053},[2819],{"type":998,"value":2820},"\"Game configuration:\"",{"type":993,"tag":1021,"props":2822,"children":2823},{"style":1036},[2824],{"type":998,"value":2825},", game_config)\n",{"type":993,"tag":1258,"props":2827,"children":2829},{"id":2828},"dictionary-addition-methods-comparison",[2830],{"type":998,"value":2831},"📚 Dictionary Addition Methods Comparison",{"type":993,"tag":2833,"props":2834,"children":2835},"table",{},[2836,2865],{"type":993,"tag":2837,"props":2838,"children":2839},"thead",{},[2840],{"type":993,"tag":2841,"props":2842,"children":2843},"tr",{},[2844,2850,2855,2860],{"type":993,"tag":2845,"props":2846,"children":2847},"th",{},[2848],{"type":998,"value":2849},"Method",{"type":993,"tag":2845,"props":2851,"children":2852},{},[2853],{"type":998,"value":2854},"Use Case",{"type":993,"tag":2845,"props":2856,"children":2857},{},[2858],{"type":998,"value":2859},"Syntax",{"type":993,"tag":2845,"props":2861,"children":2862},{},[2863],{"type":998,"value":2864},"Best For",{"type":993,"tag":2866,"props":2867,"children":2868},"tbody",{},[2869,2901,2932,2963,2994],{"type":993,"tag":2841,"props":2870,"children":2871},{},[2872,2882,2887,2896],{"type":993,"tag":2873,"props":2874,"children":2875},"td",{},[2876],{"type":993,"tag":1017,"props":2877,"children":2879},{"className":2878},[],[2880],{"type":998,"value":2881},"dict[key] = value",{"type":993,"tag":2873,"props":2883,"children":2884},{},[2885],{"type":998,"value":2886},"Single items",{"type":993,"tag":2873,"props":2888,"children":2889},{},[2890],{"type":993,"tag":1017,"props":2891,"children":2893},{"className":2892},[],[2894],{"type":998,"value":2895},"d['new_key'] = 'value'",{"type":993,"tag":2873,"props":2897,"children":2898},{},[2899],{"type":998,"value":2900},"Simple, known additions",{"type":993,"tag":2841,"props":2902,"children":2903},{},[2904,2913,2918,2927],{"type":993,"tag":2873,"props":2905,"children":2906},{},[2907],{"type":993,"tag":1017,"props":2908,"children":2910},{"className":2909},[],[2911],{"type":998,"value":2912},"dict.update(other)",{"type":993,"tag":2873,"props":2914,"children":2915},{},[2916],{"type":998,"value":2917},"Bulk from dict",{"type":993,"tag":2873,"props":2919,"children":2920},{},[2921],{"type":993,"tag":1017,"props":2922,"children":2924},{"className":2923},[],[2925],{"type":998,"value":2926},"d.update({'a': 1, 'b': 2})",{"type":993,"tag":2873,"props":2928,"children":2929},{},[2930],{"type":998,"value":2931},"Merging dictionaries",{"type":993,"tag":2841,"props":2933,"children":2934},{},[2935,2944,2949,2958],{"type":993,"tag":2873,"props":2936,"children":2937},{},[2938],{"type":993,"tag":1017,"props":2939,"children":2941},{"className":2940},[],[2942],{"type":998,"value":2943},"dict.update(**kwargs)",{"type":993,"tag":2873,"props":2945,"children":2946},{},[2947],{"type":998,"value":2948},"Multiple string keys",{"type":993,"tag":2873,"props":2950,"children":2951},{},[2952],{"type":993,"tag":1017,"props":2953,"children":2955},{"className":2954},[],[2956],{"type":998,"value":2957},"d.update(key1='val1', key2='val2')",{"type":993,"tag":2873,"props":2959,"children":2960},{},[2961],{"type":998,"value":2962},"Configuration updates",{"type":993,"tag":2841,"props":2964,"children":2965},{},[2966,2975,2980,2989],{"type":993,"tag":2873,"props":2967,"children":2968},{},[2969],{"type":993,"tag":1017,"props":2970,"children":2972},{"className":2971},[],[2973],{"type":998,"value":2974},"dict.update(pairs)",{"type":993,"tag":2873,"props":2976,"children":2977},{},[2978],{"type":998,"value":2979},"From sequences",{"type":993,"tag":2873,"props":2981,"children":2982},{},[2983],{"type":993,"tag":1017,"props":2984,"children":2986},{"className":2985},[],[2987],{"type":998,"value":2988},"d.update([('a', 1), ('b', 2)])",{"type":993,"tag":2873,"props":2990,"children":2991},{},[2992],{"type":998,"value":2993},"Dynamic data sources",{"type":993,"tag":2841,"props":2995,"children":2996},{},[2997,3006,3011,3020],{"type":993,"tag":2873,"props":2998,"children":2999},{},[3000],{"type":993,"tag":1017,"props":3001,"children":3003},{"className":3002},[],[3004],{"type":998,"value":3005},"dict.setdefault(key, default)",{"type":993,"tag":2873,"props":3007,"children":3008},{},[3009],{"type":998,"value":3010},"Conditional add",{"type":993,"tag":2873,"props":3012,"children":3013},{},[3014],{"type":993,"tag":1017,"props":3015,"children":3017},{"className":3016},[],[3018],{"type":998,"value":3019},"d.setdefault('key', 'default')",{"type":993,"tag":2873,"props":3021,"children":3022},{},[3023],{"type":998,"value":3024},"Safe initialization",{"type":993,"tag":1258,"props":3026,"children":3028},{"id":3027},"the-setdefault-method",[3029],{"type":998,"value":3030},"🌟 The setdefault() Method",{"type":993,"tag":1001,"props":3032,"children":3033},{},[3034],{"type":998,"value":3035},"The setdefault() method provides elegant conditional addition that only creates new keys when they don't already exist. This approach combines checking and adding in a single, atomic operation.",{"type":993,"tag":1007,"props":3037,"children":3038},{},[3039],{"type":993,"tag":1011,"props":3040,"children":3042},{"className":1013,"code":3041,"language":6,"meta":8,"style":8},"user_statistics = {'login_count': 15, 'last_login': '2024-01-15'}\n\n# Add only if key doesn't exist\nuser_statistics.setdefault('first_login', '2024-01-01')\nuser_statistics.setdefault('login_count', 0)  # Won't change existing value\nuser_statistics.setdefault('preferences', {})\n\nprint(\"User stats:\", user_statistics)\n\n# Useful for nested initialization\nuser_statistics['preferences'].setdefault('theme', 'light')\nuser_statistics['preferences'].setdefault('notifications', True)\n\nprint(\"With preferences:\", user_statistics)\n",[3043],{"type":993,"tag":1017,"props":3044,"children":3045},{"__ignoreMap":8},[3046,3097,3104,3112,3138,3168,3185,3192,3213,3220,3228,3262,3294,3301],{"type":993,"tag":1021,"props":3047,"children":3048},{"class":1023,"line":12},[3049,3054,3058,3062,3067,3071,3075,3079,3084,3088,3093],{"type":993,"tag":1021,"props":3050,"children":3051},{"style":1036},[3052],{"type":998,"value":3053},"user_statistics ",{"type":993,"tag":1021,"props":3055,"children":3056},{"style":1042},[3057],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3059,"children":3060},{"style":1036},[3061],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3063,"children":3064},{"style":1053},[3065],{"type":998,"value":3066},"'login_count'",{"type":993,"tag":1021,"props":3068,"children":3069},{"style":1036},[3070],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3072,"children":3073},{"style":1064},[3074],{"type":998,"value":1580},{"type":993,"tag":1021,"props":3076,"children":3077},{"style":1036},[3078],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3080,"children":3081},{"style":1053},[3082],{"type":998,"value":3083},"'last_login'",{"type":993,"tag":1021,"props":3085,"children":3086},{"style":1036},[3087],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3089,"children":3090},{"style":1053},[3091],{"type":998,"value":3092},"'2024-01-15'",{"type":993,"tag":1021,"props":3094,"children":3095},{"style":1036},[3096],{"type":998,"value":1091},{"type":993,"tag":1021,"props":3098,"children":3099},{"class":1023,"line":27},[3100],{"type":993,"tag":1021,"props":3101,"children":3102},{"emptyLinePlaceholder":13},[3103],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3105,"children":3106},{"class":1023,"line":36},[3107],{"type":993,"tag":1021,"props":3108,"children":3109},{"style":1027},[3110],{"type":998,"value":3111},"# Add only if key doesn't exist\n",{"type":993,"tag":1021,"props":3113,"children":3114},{"class":1023,"line":45},[3115,3120,3125,3129,3134],{"type":993,"tag":1021,"props":3116,"children":3117},{"style":1036},[3118],{"type":998,"value":3119},"user_statistics.setdefault(",{"type":993,"tag":1021,"props":3121,"children":3122},{"style":1053},[3123],{"type":998,"value":3124},"'first_login'",{"type":993,"tag":1021,"props":3126,"children":3127},{"style":1036},[3128],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3130,"children":3131},{"style":1053},[3132],{"type":998,"value":3133},"'2024-01-01'",{"type":993,"tag":1021,"props":3135,"children":3136},{"style":1036},[3137],{"type":998,"value":1934},{"type":993,"tag":1021,"props":3139,"children":3140},{"class":1023,"line":54},[3141,3145,3149,3153,3158,3163],{"type":993,"tag":1021,"props":3142,"children":3143},{"style":1036},[3144],{"type":998,"value":3119},{"type":993,"tag":1021,"props":3146,"children":3147},{"style":1053},[3148],{"type":998,"value":3066},{"type":993,"tag":1021,"props":3150,"children":3151},{"style":1036},[3152],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3154,"children":3155},{"style":1064},[3156],{"type":998,"value":3157},"0",{"type":993,"tag":1021,"props":3159,"children":3160},{"style":1036},[3161],{"type":998,"value":3162},")  ",{"type":993,"tag":1021,"props":3164,"children":3165},{"style":1027},[3166],{"type":998,"value":3167},"# Won't change existing value\n",{"type":993,"tag":1021,"props":3169,"children":3170},{"class":1023,"line":63},[3171,3175,3180],{"type":993,"tag":1021,"props":3172,"children":3173},{"style":1036},[3174],{"type":998,"value":3119},{"type":993,"tag":1021,"props":3176,"children":3177},{"style":1053},[3178],{"type":998,"value":3179},"'preferences'",{"type":993,"tag":1021,"props":3181,"children":3182},{"style":1036},[3183],{"type":998,"value":3184},", {})\n",{"type":993,"tag":1021,"props":3186,"children":3187},{"class":1023,"line":72},[3188],{"type":993,"tag":1021,"props":3189,"children":3190},{"emptyLinePlaceholder":13},[3191],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3193,"children":3194},{"class":1023,"line":81},[3195,3199,3203,3208],{"type":993,"tag":1021,"props":3196,"children":3197},{"style":1064},[3198],{"type":998,"value":1099},{"type":993,"tag":1021,"props":3200,"children":3201},{"style":1036},[3202],{"type":998,"value":1104},{"type":993,"tag":1021,"props":3204,"children":3205},{"style":1053},[3206],{"type":998,"value":3207},"\"User stats:\"",{"type":993,"tag":1021,"props":3209,"children":3210},{"style":1036},[3211],{"type":998,"value":3212},", user_statistics)\n",{"type":993,"tag":1021,"props":3214,"children":3215},{"class":1023,"line":91},[3216],{"type":993,"tag":1021,"props":3217,"children":3218},{"emptyLinePlaceholder":13},[3219],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3221,"children":3222},{"class":1023,"line":100},[3223],{"type":993,"tag":1021,"props":3224,"children":3225},{"style":1027},[3226],{"type":998,"value":3227},"# Useful for nested initialization\n",{"type":993,"tag":1021,"props":3229,"children":3230},{"class":1023,"line":109},[3231,3236,3240,3245,3249,3253,3258],{"type":993,"tag":1021,"props":3232,"children":3233},{"style":1036},[3234],{"type":998,"value":3235},"user_statistics[",{"type":993,"tag":1021,"props":3237,"children":3238},{"style":1053},[3239],{"type":998,"value":3179},{"type":993,"tag":1021,"props":3241,"children":3242},{"style":1036},[3243],{"type":998,"value":3244},"].setdefault(",{"type":993,"tag":1021,"props":3246,"children":3247},{"style":1053},[3248],{"type":998,"value":1770},{"type":993,"tag":1021,"props":3250,"children":3251},{"style":1036},[3252],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3254,"children":3255},{"style":1053},[3256],{"type":998,"value":3257},"'light'",{"type":993,"tag":1021,"props":3259,"children":3260},{"style":1036},[3261],{"type":998,"value":1934},{"type":993,"tag":1021,"props":3263,"children":3264},{"class":1023,"line":118},[3265,3269,3273,3277,3282,3286,3290],{"type":993,"tag":1021,"props":3266,"children":3267},{"style":1036},[3268],{"type":998,"value":3235},{"type":993,"tag":1021,"props":3270,"children":3271},{"style":1053},[3272],{"type":998,"value":3179},{"type":993,"tag":1021,"props":3274,"children":3275},{"style":1036},[3276],{"type":998,"value":3244},{"type":993,"tag":1021,"props":3278,"children":3279},{"style":1053},[3280],{"type":998,"value":3281},"'notifications'",{"type":993,"tag":1021,"props":3283,"children":3284},{"style":1036},[3285],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3287,"children":3288},{"style":1064},[3289],{"type":998,"value":1863},{"type":993,"tag":1021,"props":3291,"children":3292},{"style":1036},[3293],{"type":998,"value":1934},{"type":993,"tag":1021,"props":3295,"children":3296},{"class":1023,"line":127},[3297],{"type":993,"tag":1021,"props":3298,"children":3299},{"emptyLinePlaceholder":13},[3300],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3302,"children":3303},{"class":1023,"line":136},[3304,3308,3312,3317],{"type":993,"tag":1021,"props":3305,"children":3306},{"style":1064},[3307],{"type":998,"value":1099},{"type":993,"tag":1021,"props":3309,"children":3310},{"style":1036},[3311],{"type":998,"value":1104},{"type":993,"tag":1021,"props":3313,"children":3314},{"style":1053},[3315],{"type":998,"value":3316},"\"With preferences:\"",{"type":993,"tag":1021,"props":3318,"children":3319},{"style":1036},[3320],{"type":998,"value":3212},{"type":993,"tag":1471,"props":3322,"children":3326},{"emoji":3323,"title":3324,"type":3325},"✅","setdefault() Advantages","success",[3327,3337,3347,3357],{"type":993,"tag":1001,"props":3328,"children":3329},{},[3330,3335],{"type":993,"tag":1481,"props":3331,"children":3332},{},[3333],{"type":998,"value":3334},"Atomic Operation:",{"type":998,"value":3336}," Checks existence and adds in one step, preventing race conditions.",{"type":993,"tag":1001,"props":3338,"children":3339},{},[3340,3345],{"type":993,"tag":1481,"props":3341,"children":3342},{},[3343],{"type":998,"value":3344},"Returns Value:",{"type":998,"value":3346}," Returns either existing value or newly set default value.",{"type":993,"tag":1001,"props":3348,"children":3349},{},[3350,3355],{"type":993,"tag":1481,"props":3351,"children":3352},{},[3353],{"type":998,"value":3354},"Safe Initialization:",{"type":998,"value":3356}," Perfect for nested dictionary structures and list collections.",{"type":993,"tag":1001,"props":3358,"children":3359},{},[3360,3365],{"type":993,"tag":1481,"props":3361,"children":3362},{},[3363],{"type":998,"value":3364},"No Overwrites:",{"type":998,"value":3366}," Preserves existing data while ensuring keys exist for further operations.",{"type":993,"tag":1258,"props":3368,"children":3370},{"id":3369},"practical-applications",[3371],{"type":998,"value":3372},"💡 Practical Applications",{"type":993,"tag":1530,"props":3374,"children":3376},{"id":3375},"building-user-profiles",[3377],{"type":998,"value":3378},"Building User Profiles",{"type":993,"tag":1001,"props":3380,"children":3381},{},[3382],{"type":998,"value":3383},"Progressive profile building allows applications to collect user information gradually while maintaining flexible data structures.",{"type":993,"tag":1007,"props":3385,"children":3386},{},[3387],{"type":993,"tag":1011,"props":3388,"children":3390},{"className":1013,"code":3389,"language":6,"meta":8,"style":8},"def add_profile_section(profile, section_name, section_data):\n    \"\"\"Add new section to user profile\"\"\"\n    profile.setdefault('sections', {})\n    profile['sections'][section_name] = section_data\n    profile.setdefault('last_updated', 'now')\n    return profile\n\n# Start with basic profile\nuser = {'user_id': 123, 'name': 'John Doe'}\n\n# Add profile sections progressively\nadd_profile_section(user, 'contact', {'email': 'john@example.com', 'phone': '555-0123'})\nadd_profile_section(user, 'preferences', {'theme': 'dark', 'language': 'en'})\nadd_profile_section(user, 'activity', {'last_login': 'today', 'session_count': 45})\n\nprint(\"Complete profile:\", user)\n",[3391],{"type":993,"tag":1017,"props":3392,"children":3393},{"__ignoreMap":8},[3394,3411,3419,3436,3462,3487,3499,3506,3514,3565,3572,3580,3632,3681,3732,3739],{"type":993,"tag":1021,"props":3395,"children":3396},{"class":1023,"line":12},[3397,3401,3406],{"type":993,"tag":1021,"props":3398,"children":3399},{"style":1042},[3400],{"type":998,"value":2454},{"type":993,"tag":1021,"props":3402,"children":3403},{"style":2457},[3404],{"type":998,"value":3405}," add_profile_section",{"type":993,"tag":1021,"props":3407,"children":3408},{"style":1036},[3409],{"type":998,"value":3410},"(profile, section_name, section_data):\n",{"type":993,"tag":1021,"props":3412,"children":3413},{"class":1023,"line":27},[3414],{"type":993,"tag":1021,"props":3415,"children":3416},{"style":1053},[3417],{"type":998,"value":3418},"    \"\"\"Add new section to user profile\"\"\"\n",{"type":993,"tag":1021,"props":3420,"children":3421},{"class":1023,"line":36},[3422,3427,3432],{"type":993,"tag":1021,"props":3423,"children":3424},{"style":1036},[3425],{"type":998,"value":3426},"    profile.setdefault(",{"type":993,"tag":1021,"props":3428,"children":3429},{"style":1053},[3430],{"type":998,"value":3431},"'sections'",{"type":993,"tag":1021,"props":3433,"children":3434},{"style":1036},[3435],{"type":998,"value":3184},{"type":993,"tag":1021,"props":3437,"children":3438},{"class":1023,"line":45},[3439,3444,3448,3453,3457],{"type":993,"tag":1021,"props":3440,"children":3441},{"style":1036},[3442],{"type":998,"value":3443},"    profile[",{"type":993,"tag":1021,"props":3445,"children":3446},{"style":1053},[3447],{"type":998,"value":3431},{"type":993,"tag":1021,"props":3449,"children":3450},{"style":1036},[3451],{"type":998,"value":3452},"][section_name] ",{"type":993,"tag":1021,"props":3454,"children":3455},{"style":1042},[3456],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3458,"children":3459},{"style":1036},[3460],{"type":998,"value":3461}," section_data\n",{"type":993,"tag":1021,"props":3463,"children":3464},{"class":1023,"line":54},[3465,3469,3474,3478,3483],{"type":993,"tag":1021,"props":3466,"children":3467},{"style":1036},[3468],{"type":998,"value":3426},{"type":993,"tag":1021,"props":3470,"children":3471},{"style":1053},[3472],{"type":998,"value":3473},"'last_updated'",{"type":993,"tag":1021,"props":3475,"children":3476},{"style":1036},[3477],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3479,"children":3480},{"style":1053},[3481],{"type":998,"value":3482},"'now'",{"type":993,"tag":1021,"props":3484,"children":3485},{"style":1036},[3486],{"type":998,"value":1934},{"type":993,"tag":1021,"props":3488,"children":3489},{"class":1023,"line":63},[3490,3494],{"type":993,"tag":1021,"props":3491,"children":3492},{"style":1042},[3493],{"type":998,"value":2696},{"type":993,"tag":1021,"props":3495,"children":3496},{"style":1036},[3497],{"type":998,"value":3498}," profile\n",{"type":993,"tag":1021,"props":3500,"children":3501},{"class":1023,"line":72},[3502],{"type":993,"tag":1021,"props":3503,"children":3504},{"emptyLinePlaceholder":13},[3505],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3507,"children":3508},{"class":1023,"line":81},[3509],{"type":993,"tag":1021,"props":3510,"children":3511},{"style":1027},[3512],{"type":998,"value":3513},"# Start with basic profile\n",{"type":993,"tag":1021,"props":3515,"children":3516},{"class":1023,"line":91},[3517,3522,3526,3530,3535,3539,3544,3548,3552,3556,3561],{"type":993,"tag":1021,"props":3518,"children":3519},{"style":1036},[3520],{"type":998,"value":3521},"user ",{"type":993,"tag":1021,"props":3523,"children":3524},{"style":1042},[3525],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3527,"children":3528},{"style":1036},[3529],{"type":998,"value":1050},{"type":993,"tag":1021,"props":3531,"children":3532},{"style":1053},[3533],{"type":998,"value":3534},"'user_id'",{"type":993,"tag":1021,"props":3536,"children":3537},{"style":1036},[3538],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3540,"children":3541},{"style":1064},[3542],{"type":998,"value":3543},"123",{"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":2214},{"type":993,"tag":1021,"props":3553,"children":3554},{"style":1036},[3555],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3557,"children":3558},{"style":1053},[3559],{"type":998,"value":3560},"'John Doe'",{"type":993,"tag":1021,"props":3562,"children":3563},{"style":1036},[3564],{"type":998,"value":1091},{"type":993,"tag":1021,"props":3566,"children":3567},{"class":1023,"line":100},[3568],{"type":993,"tag":1021,"props":3569,"children":3570},{"emptyLinePlaceholder":13},[3571],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3573,"children":3574},{"class":1023,"line":109},[3575],{"type":993,"tag":1021,"props":3576,"children":3577},{"style":1027},[3578],{"type":998,"value":3579},"# Add profile sections progressively\n",{"type":993,"tag":1021,"props":3581,"children":3582},{"class":1023,"line":118},[3583,3588,3593,3598,3602,3606,3611,3615,3619,3623,3628],{"type":993,"tag":1021,"props":3584,"children":3585},{"style":1036},[3586],{"type":998,"value":3587},"add_profile_section(user, ",{"type":993,"tag":1021,"props":3589,"children":3590},{"style":1053},[3591],{"type":998,"value":3592},"'contact'",{"type":993,"tag":1021,"props":3594,"children":3595},{"style":1036},[3596],{"type":998,"value":3597},", {",{"type":993,"tag":1021,"props":3599,"children":3600},{"style":1053},[3601],{"type":998,"value":2232},{"type":993,"tag":1021,"props":3603,"children":3604},{"style":1036},[3605],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3607,"children":3608},{"style":1053},[3609],{"type":998,"value":3610},"'john@example.com'",{"type":993,"tag":1021,"props":3612,"children":3613},{"style":1036},[3614],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3616,"children":3617},{"style":1053},[3618],{"type":998,"value":2283},{"type":993,"tag":1021,"props":3620,"children":3621},{"style":1036},[3622],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3624,"children":3625},{"style":1053},[3626],{"type":998,"value":3627},"'555-0123'",{"type":993,"tag":1021,"props":3629,"children":3630},{"style":1036},[3631],{"type":998,"value":1236},{"type":993,"tag":1021,"props":3633,"children":3634},{"class":1023,"line":127},[3635,3639,3643,3647,3651,3655,3659,3663,3668,3672,3677],{"type":993,"tag":1021,"props":3636,"children":3637},{"style":1036},[3638],{"type":998,"value":3587},{"type":993,"tag":1021,"props":3640,"children":3641},{"style":1053},[3642],{"type":998,"value":3179},{"type":993,"tag":1021,"props":3644,"children":3645},{"style":1036},[3646],{"type":998,"value":3597},{"type":993,"tag":1021,"props":3648,"children":3649},{"style":1053},[3650],{"type":998,"value":1770},{"type":993,"tag":1021,"props":3652,"children":3653},{"style":1036},[3654],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3656,"children":3657},{"style":1053},[3658],{"type":998,"value":1779},{"type":993,"tag":1021,"props":3660,"children":3661},{"style":1036},[3662],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3664,"children":3665},{"style":1053},[3666],{"type":998,"value":3667},"'language'",{"type":993,"tag":1021,"props":3669,"children":3670},{"style":1036},[3671],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3673,"children":3674},{"style":1053},[3675],{"type":998,"value":3676},"'en'",{"type":993,"tag":1021,"props":3678,"children":3679},{"style":1036},[3680],{"type":998,"value":1236},{"type":993,"tag":1021,"props":3682,"children":3683},{"class":1023,"line":136},[3684,3688,3693,3697,3701,3705,3710,3714,3719,3723,3728],{"type":993,"tag":1021,"props":3685,"children":3686},{"style":1036},[3687],{"type":998,"value":3587},{"type":993,"tag":1021,"props":3689,"children":3690},{"style":1053},[3691],{"type":998,"value":3692},"'activity'",{"type":993,"tag":1021,"props":3694,"children":3695},{"style":1036},[3696],{"type":998,"value":3597},{"type":993,"tag":1021,"props":3698,"children":3699},{"style":1053},[3700],{"type":998,"value":3083},{"type":993,"tag":1021,"props":3702,"children":3703},{"style":1036},[3704],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3706,"children":3707},{"style":1053},[3708],{"type":998,"value":3709},"'today'",{"type":993,"tag":1021,"props":3711,"children":3712},{"style":1036},[3713],{"type":998,"value":1072},{"type":993,"tag":1021,"props":3715,"children":3716},{"style":1053},[3717],{"type":998,"value":3718},"'session_count'",{"type":993,"tag":1021,"props":3720,"children":3721},{"style":1036},[3722],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3724,"children":3725},{"style":1064},[3726],{"type":998,"value":3727},"45",{"type":993,"tag":1021,"props":3729,"children":3730},{"style":1036},[3731],{"type":998,"value":1236},{"type":993,"tag":1021,"props":3733,"children":3734},{"class":1023,"line":146},[3735],{"type":993,"tag":1021,"props":3736,"children":3737},{"emptyLinePlaceholder":13},[3738],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3740,"children":3741},{"class":1023,"line":155},[3742,3746,3750,3755],{"type":993,"tag":1021,"props":3743,"children":3744},{"style":1064},[3745],{"type":998,"value":1099},{"type":993,"tag":1021,"props":3747,"children":3748},{"style":1036},[3749],{"type":998,"value":1104},{"type":993,"tag":1021,"props":3751,"children":3752},{"style":1053},[3753],{"type":998,"value":3754},"\"Complete profile:\"",{"type":993,"tag":1021,"props":3756,"children":3757},{"style":1036},[3758],{"type":998,"value":3759},", user)\n",{"type":993,"tag":1530,"props":3761,"children":3763},{"id":3762},"configuration-management",[3764],{"type":998,"value":3765},"Configuration Management",{"type":993,"tag":1001,"props":3767,"children":3768},{},[3769],{"type":998,"value":3770},"Dynamic configuration building enables flexible application setup where different modules can contribute their settings independently.",{"type":993,"tag":1007,"props":3772,"children":3773},{},[3774],{"type":993,"tag":1011,"props":3775,"children":3777},{"className":1013,"code":3776,"language":6,"meta":8,"style":8},"def build_application_config(*config_sources):\n    \"\"\"Build complete application configuration from multiple sources\"\"\"\n    app_config = {\n        'app_name': 'MyApp',\n        'version': '1.0.0',\n        'debug': False\n    }\n    \n    # Add configurations from various sources\n    for config in config_sources:\n        for key, value in config.items():\n            app_config.setdefault(key, value)\n    \n    return app_config\n\ndatabase_config = {'host': 'localhost', 'port': 5432, 'debug': True}\nui_config = {'theme': 'dark', 'animations': True}\nsecurity_config = {'timeout': 300, 'encryption': True}\n\nfinal_config = build_application_config(database_config, ui_config, security_config)\nprint(\"Final app config:\", final_config)\n",[3778],{"type":993,"tag":1017,"props":3779,"children":3780},{"__ignoreMap":8},[3781,3807,3815,3831,3852,3873,3889,3896,3903,3911,3933,3953,3961,3968,3980,3987,4056,4105,4156,4163,4180],{"type":993,"tag":1021,"props":3782,"children":3783},{"class":1023,"line":12},[3784,3788,3793,3797,3802],{"type":993,"tag":1021,"props":3785,"children":3786},{"style":1042},[3787],{"type":998,"value":2454},{"type":993,"tag":1021,"props":3789,"children":3790},{"style":2457},[3791],{"type":998,"value":3792}," build_application_config",{"type":993,"tag":1021,"props":3794,"children":3795},{"style":1036},[3796],{"type":998,"value":1104},{"type":993,"tag":1021,"props":3798,"children":3799},{"style":1042},[3800],{"type":998,"value":3801},"*",{"type":993,"tag":1021,"props":3803,"children":3804},{"style":1036},[3805],{"type":998,"value":3806},"config_sources):\n",{"type":993,"tag":1021,"props":3808,"children":3809},{"class":1023,"line":27},[3810],{"type":993,"tag":1021,"props":3811,"children":3812},{"style":1053},[3813],{"type":998,"value":3814},"    \"\"\"Build complete application configuration from multiple sources\"\"\"\n",{"type":993,"tag":1021,"props":3816,"children":3817},{"class":1023,"line":36},[3818,3823,3827],{"type":993,"tag":1021,"props":3819,"children":3820},{"style":1036},[3821],{"type":998,"value":3822},"    app_config ",{"type":993,"tag":1021,"props":3824,"children":3825},{"style":1042},[3826],{"type":998,"value":1045},{"type":993,"tag":1021,"props":3828,"children":3829},{"style":1036},[3830],{"type":998,"value":2504},{"type":993,"tag":1021,"props":3832,"children":3833},{"class":1023,"line":45},[3834,3839,3843,3848],{"type":993,"tag":1021,"props":3835,"children":3836},{"style":1053},[3837],{"type":998,"value":3838},"        'app_name'",{"type":993,"tag":1021,"props":3840,"children":3841},{"style":1036},[3842],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3844,"children":3845},{"style":1053},[3846],{"type":998,"value":3847},"'MyApp'",{"type":993,"tag":1021,"props":3849,"children":3850},{"style":1036},[3851],{"type":998,"value":1868},{"type":993,"tag":1021,"props":3853,"children":3854},{"class":1023,"line":54},[3855,3860,3864,3869],{"type":993,"tag":1021,"props":3856,"children":3857},{"style":1053},[3858],{"type":998,"value":3859},"        'version'",{"type":993,"tag":1021,"props":3861,"children":3862},{"style":1036},[3863],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3865,"children":3866},{"style":1053},[3867],{"type":998,"value":3868},"'1.0.0'",{"type":993,"tag":1021,"props":3870,"children":3871},{"style":1036},[3872],{"type":998,"value":1868},{"type":993,"tag":1021,"props":3874,"children":3875},{"class":1023,"line":63},[3876,3881,3885],{"type":993,"tag":1021,"props":3877,"children":3878},{"style":1053},[3879],{"type":998,"value":3880},"        'debug'",{"type":993,"tag":1021,"props":3882,"children":3883},{"style":1036},[3884],{"type":998,"value":1061},{"type":993,"tag":1021,"props":3886,"children":3887},{"style":1064},[3888],{"type":998,"value":2790},{"type":993,"tag":1021,"props":3890,"children":3891},{"class":1023,"line":72},[3892],{"type":993,"tag":1021,"props":3893,"children":3894},{"style":1036},[3895],{"type":998,"value":2591},{"type":993,"tag":1021,"props":3897,"children":3898},{"class":1023,"line":81},[3899],{"type":993,"tag":1021,"props":3900,"children":3901},{"style":1036},[3902],{"type":998,"value":2599},{"type":993,"tag":1021,"props":3904,"children":3905},{"class":1023,"line":91},[3906],{"type":993,"tag":1021,"props":3907,"children":3908},{"style":1027},[3909],{"type":998,"value":3910},"    # Add configurations from various sources\n",{"type":993,"tag":1021,"props":3912,"children":3913},{"class":1023,"line":100},[3914,3919,3924,3928],{"type":993,"tag":1021,"props":3915,"children":3916},{"style":1042},[3917],{"type":998,"value":3918},"    for",{"type":993,"tag":1021,"props":3920,"children":3921},{"style":1036},[3922],{"type":998,"value":3923}," config ",{"type":993,"tag":1021,"props":3925,"children":3926},{"style":1042},[3927],{"type":998,"value":2347},{"type":993,"tag":1021,"props":3929,"children":3930},{"style":1036},[3931],{"type":998,"value":3932}," config_sources:\n",{"type":993,"tag":1021,"props":3934,"children":3935},{"class":1023,"line":109},[3936,3940,3944,3948],{"type":993,"tag":1021,"props":3937,"children":3938},{"style":1042},[3939],{"type":998,"value":2627},{"type":993,"tag":1021,"props":3941,"children":3942},{"style":1036},[3943],{"type":998,"value":2342},{"type":993,"tag":1021,"props":3945,"children":3946},{"style":1042},[3947],{"type":998,"value":2347},{"type":993,"tag":1021,"props":3949,"children":3950},{"style":1036},[3951],{"type":998,"value":3952}," config.items():\n",{"type":993,"tag":1021,"props":3954,"children":3955},{"class":1023,"line":118},[3956],{"type":993,"tag":1021,"props":3957,"children":3958},{"style":1036},[3959],{"type":998,"value":3960},"            app_config.setdefault(key, value)\n",{"type":993,"tag":1021,"props":3962,"children":3963},{"class":1023,"line":127},[3964],{"type":993,"tag":1021,"props":3965,"children":3966},{"style":1036},[3967],{"type":998,"value":2599},{"type":993,"tag":1021,"props":3969,"children":3970},{"class":1023,"line":136},[3971,3975],{"type":993,"tag":1021,"props":3972,"children":3973},{"style":1042},[3974],{"type":998,"value":2696},{"type":993,"tag":1021,"props":3976,"children":3977},{"style":1036},[3978],{"type":998,"value":3979}," app_config\n",{"type":993,"tag":1021,"props":3981,"children":3982},{"class":1023,"line":146},[3983],{"type":993,"tag":1021,"props":3984,"children":3985},{"emptyLinePlaceholder":13},[3986],{"type":998,"value":1122},{"type":993,"tag":1021,"props":3988,"children":3989},{"class":1023,"line":155},[3990,3995,3999,4003,4008,4012,4017,4021,4026,4030,4035,4039,4044,4048,4052],{"type":993,"tag":1021,"props":3991,"children":3992},{"style":1036},[3993],{"type":998,"value":3994},"database_config ",{"type":993,"tag":1021,"props":3996,"children":3997},{"style":1042},[3998],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4000,"children":4001},{"style":1036},[4002],{"type":998,"value":1050},{"type":993,"tag":1021,"props":4004,"children":4005},{"style":1053},[4006],{"type":998,"value":4007},"'host'",{"type":993,"tag":1021,"props":4009,"children":4010},{"style":1036},[4011],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4013,"children":4014},{"style":1053},[4015],{"type":998,"value":4016},"'localhost'",{"type":993,"tag":1021,"props":4018,"children":4019},{"style":1036},[4020],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4022,"children":4023},{"style":1053},[4024],{"type":998,"value":4025},"'port'",{"type":993,"tag":1021,"props":4027,"children":4028},{"style":1036},[4029],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4031,"children":4032},{"style":1064},[4033],{"type":998,"value":4034},"5432",{"type":993,"tag":1021,"props":4036,"children":4037},{"style":1036},[4038],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4040,"children":4041},{"style":1053},[4042],{"type":998,"value":4043},"'debug'",{"type":993,"tag":1021,"props":4045,"children":4046},{"style":1036},[4047],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4049,"children":4050},{"style":1064},[4051],{"type":998,"value":1863},{"type":993,"tag":1021,"props":4053,"children":4054},{"style":1036},[4055],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4057,"children":4058},{"class":1023,"line":164},[4059,4064,4068,4072,4076,4080,4084,4088,4093,4097,4101],{"type":993,"tag":1021,"props":4060,"children":4061},{"style":1036},[4062],{"type":998,"value":4063},"ui_config ",{"type":993,"tag":1021,"props":4065,"children":4066},{"style":1042},[4067],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4069,"children":4070},{"style":1036},[4071],{"type":998,"value":1050},{"type":993,"tag":1021,"props":4073,"children":4074},{"style":1053},[4075],{"type":998,"value":1770},{"type":993,"tag":1021,"props":4077,"children":4078},{"style":1036},[4079],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4081,"children":4082},{"style":1053},[4083],{"type":998,"value":1779},{"type":993,"tag":1021,"props":4085,"children":4086},{"style":1036},[4087],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4089,"children":4090},{"style":1053},[4091],{"type":998,"value":4092},"'animations'",{"type":993,"tag":1021,"props":4094,"children":4095},{"style":1036},[4096],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4098,"children":4099},{"style":1064},[4100],{"type":998,"value":1863},{"type":993,"tag":1021,"props":4102,"children":4103},{"style":1036},[4104],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4106,"children":4107},{"class":1023,"line":173},[4108,4113,4117,4121,4126,4130,4135,4139,4144,4148,4152],{"type":993,"tag":1021,"props":4109,"children":4110},{"style":1036},[4111],{"type":998,"value":4112},"security_config ",{"type":993,"tag":1021,"props":4114,"children":4115},{"style":1042},[4116],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4118,"children":4119},{"style":1036},[4120],{"type":998,"value":1050},{"type":993,"tag":1021,"props":4122,"children":4123},{"style":1053},[4124],{"type":998,"value":4125},"'timeout'",{"type":993,"tag":1021,"props":4127,"children":4128},{"style":1036},[4129],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4131,"children":4132},{"style":1064},[4133],{"type":998,"value":4134},"300",{"type":993,"tag":1021,"props":4136,"children":4137},{"style":1036},[4138],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4140,"children":4141},{"style":1053},[4142],{"type":998,"value":4143},"'encryption'",{"type":993,"tag":1021,"props":4145,"children":4146},{"style":1036},[4147],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4149,"children":4150},{"style":1064},[4151],{"type":998,"value":1863},{"type":993,"tag":1021,"props":4153,"children":4154},{"style":1036},[4155],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4157,"children":4158},{"class":1023,"line":182},[4159],{"type":993,"tag":1021,"props":4160,"children":4161},{"emptyLinePlaceholder":13},[4162],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4164,"children":4165},{"class":1023,"line":191},[4166,4171,4175],{"type":993,"tag":1021,"props":4167,"children":4168},{"style":1036},[4169],{"type":998,"value":4170},"final_config ",{"type":993,"tag":1021,"props":4172,"children":4173},{"style":1042},[4174],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4176,"children":4177},{"style":1036},[4178],{"type":998,"value":4179}," build_application_config(database_config, ui_config, security_config)\n",{"type":993,"tag":1021,"props":4181,"children":4182},{"class":1023,"line":201},[4183,4187,4191,4196],{"type":993,"tag":1021,"props":4184,"children":4185},{"style":1064},[4186],{"type":998,"value":1099},{"type":993,"tag":1021,"props":4188,"children":4189},{"style":1036},[4190],{"type":998,"value":1104},{"type":993,"tag":1021,"props":4192,"children":4193},{"style":1053},[4194],{"type":998,"value":4195},"\"Final app config:\"",{"type":993,"tag":1021,"props":4197,"children":4198},{"style":1036},[4199],{"type":998,"value":4200},", final_config)\n",{"type":993,"tag":4202,"props":4203,"children":4205},"content-exercise",{":widget-view":4204,"category":6,"id":556},"true",[],{"type":993,"tag":1001,"props":4207,"children":4208},{},[4209,4211,4217],{"type":998,"value":4210},"Learn more about ",{"type":993,"tag":4212,"props":4213,"children":4214},"a",{"href":562},[4215],{"type":998,"value":4216},"deleting dictionary items",{"type":998,"value":4218}," to master complete dictionary manipulation and maintenance.",{"type":993,"tag":4220,"props":4221,"children":4224},"exercise",{"hint":4222,"prompt":4223},"Check if the item exists using 'in' operator, then either add or update the quantity","Create a function that adds new items to a shopping cart dictionary. If an item already exists, increase its quantity. If it's new, add it with the given quantity.",[4225],{"type":993,"tag":1011,"props":4226,"children":4228},{"className":1013,"code":4227,"language":6,"meta":8,"style":8},"def add_to_cart(cart, item, quantity):\n    # TODO: Add item to cart or update quantity if it exists\n    pass\n\n# Test the function\nshopping_cart = {'apples': 3, 'bananas': 2}\n\nadd_to_cart(shopping_cart, 'oranges', 4)  # New item\nadd_to_cart(shopping_cart, 'apples', 2)   # Existing item\n\nprint(shopping_cart)\n",[4229],{"type":993,"tag":1017,"props":4230,"children":4231},{"__ignoreMap":8},[4232,4249,4267,4275,4282,4290,4338,4345,4375,4404,4411],{"type":993,"tag":1021,"props":4233,"children":4234},{"class":1023,"line":12},[4235,4239,4244],{"type":993,"tag":1021,"props":4236,"children":4237},{"style":1042},[4238],{"type":998,"value":2454},{"type":993,"tag":1021,"props":4240,"children":4241},{"style":2457},[4242],{"type":998,"value":4243}," add_to_cart",{"type":993,"tag":1021,"props":4245,"children":4246},{"style":1036},[4247],{"type":998,"value":4248},"(cart, item, quantity):\n",{"type":993,"tag":1021,"props":4250,"children":4251},{"class":1023,"line":27},[4252,4257,4262],{"type":993,"tag":1021,"props":4253,"children":4254},{"style":1027},[4255],{"type":998,"value":4256},"    # ",{"type":993,"tag":1021,"props":4258,"children":4259},{"style":1042},[4260],{"type":998,"value":4261},"TODO",{"type":993,"tag":1021,"props":4263,"children":4264},{"style":1027},[4265],{"type":998,"value":4266},": Add item to cart or update quantity if it exists\n",{"type":993,"tag":1021,"props":4268,"children":4269},{"class":1023,"line":36},[4270],{"type":993,"tag":1021,"props":4271,"children":4272},{"style":1042},[4273],{"type":998,"value":4274},"    pass\n",{"type":993,"tag":1021,"props":4276,"children":4277},{"class":1023,"line":45},[4278],{"type":993,"tag":1021,"props":4279,"children":4280},{"emptyLinePlaceholder":13},[4281],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4283,"children":4284},{"class":1023,"line":54},[4285],{"type":993,"tag":1021,"props":4286,"children":4287},{"style":1027},[4288],{"type":998,"value":4289},"# Test the function\n",{"type":993,"tag":1021,"props":4291,"children":4292},{"class":1023,"line":63},[4293,4298,4302,4306,4310,4314,4318,4322,4326,4330,4334],{"type":993,"tag":1021,"props":4294,"children":4295},{"style":1036},[4296],{"type":998,"value":4297},"shopping_cart ",{"type":993,"tag":1021,"props":4299,"children":4300},{"style":1042},[4301],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4303,"children":4304},{"style":1036},[4305],{"type":998,"value":1050},{"type":993,"tag":1021,"props":4307,"children":4308},{"style":1053},[4309],{"type":998,"value":1056},{"type":993,"tag":1021,"props":4311,"children":4312},{"style":1036},[4313],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4315,"children":4316},{"style":1064},[4317],{"type":998,"value":1067},{"type":993,"tag":1021,"props":4319,"children":4320},{"style":1036},[4321],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4323,"children":4324},{"style":1053},[4325],{"type":998,"value":1077},{"type":993,"tag":1021,"props":4327,"children":4328},{"style":1036},[4329],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4331,"children":4332},{"style":1064},[4333],{"type":998,"value":1086},{"type":993,"tag":1021,"props":4335,"children":4336},{"style":1036},[4337],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4339,"children":4340},{"class":1023,"line":72},[4341],{"type":993,"tag":1021,"props":4342,"children":4343},{"emptyLinePlaceholder":13},[4344],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4346,"children":4347},{"class":1023,"line":81},[4348,4353,4357,4361,4366,4370],{"type":993,"tag":1021,"props":4349,"children":4350},{"style":1036},[4351],{"type":998,"value":4352},"add_to_cart(shopping_cart, ",{"type":993,"tag":1021,"props":4354,"children":4355},{"style":1053},[4356],{"type":998,"value":1143},{"type":993,"tag":1021,"props":4358,"children":4359},{"style":1036},[4360],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4362,"children":4363},{"style":1064},[4364],{"type":998,"value":4365},"4",{"type":993,"tag":1021,"props":4367,"children":4368},{"style":1036},[4369],{"type":998,"value":3162},{"type":993,"tag":1021,"props":4371,"children":4372},{"style":1027},[4373],{"type":998,"value":4374},"# New item\n",{"type":993,"tag":1021,"props":4376,"children":4377},{"class":1023,"line":91},[4378,4382,4386,4390,4394,4399],{"type":993,"tag":1021,"props":4379,"children":4380},{"style":1036},[4381],{"type":998,"value":4352},{"type":993,"tag":1021,"props":4383,"children":4384},{"style":1053},[4385],{"type":998,"value":1056},{"type":993,"tag":1021,"props":4387,"children":4388},{"style":1036},[4389],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4391,"children":4392},{"style":1064},[4393],{"type":998,"value":1086},{"type":993,"tag":1021,"props":4395,"children":4396},{"style":1036},[4397],{"type":998,"value":4398},")   ",{"type":993,"tag":1021,"props":4400,"children":4401},{"style":1027},[4402],{"type":998,"value":4403},"# Existing item\n",{"type":993,"tag":1021,"props":4405,"children":4406},{"class":1023,"line":100},[4407],{"type":993,"tag":1021,"props":4408,"children":4409},{"emptyLinePlaceholder":13},[4410],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4412,"children":4413},{"class":1023,"line":109},[4414,4418],{"type":993,"tag":1021,"props":4415,"children":4416},{"style":1064},[4417],{"type":998,"value":1099},{"type":993,"tag":1021,"props":4419,"children":4420},{"style":1036},[4421],{"type":998,"value":4422},"(shopping_cart)\n",{"type":993,"tag":1530,"props":4424,"children":4426},{"id":4425},"solution-and-explanation",[4427],{"type":998,"value":4428},"Solution and Explanation 💡",{"type":993,"tag":4430,"props":4431,"children":4432},"details",{},[4433,4441,4697,4705],{"type":993,"tag":4434,"props":4435,"children":4438},"summary",{"className":4436},[4437],"cursor-pointer",[4439],{"type":998,"value":4440},"Click to see the complete solution",{"type":993,"tag":1007,"props":4442,"children":4443},{},[4444],{"type":993,"tag":1011,"props":4445,"children":4447},{"className":1013,"code":4446,"language":6,"meta":8,"style":8},"def add_to_cart(cart, item, quantity):\n    # Check if item already exists in cart\n    if item in cart:\n        # Add to existing quantity\n        cart[item] += quantity\n    else:\n        # Add new item\n        cart[item] = quantity\n\n# Test the function\nshopping_cart = {'apples': 3, 'bananas': 2}\n\nadd_to_cart(shopping_cart, 'oranges', 4)  # New item\nadd_to_cart(shopping_cart, 'apples', 2)   # Existing item\n\nprint(shopping_cart)\n",[4448],{"type":993,"tag":1017,"props":4449,"children":4450},{"__ignoreMap":8},[4451,4466,4474,4495,4503,4521,4534,4542,4557,4564,4571,4618,4625,4652,4679,4686],{"type":993,"tag":1021,"props":4452,"children":4453},{"class":1023,"line":12},[4454,4458,4462],{"type":993,"tag":1021,"props":4455,"children":4456},{"style":1042},[4457],{"type":998,"value":2454},{"type":993,"tag":1021,"props":4459,"children":4460},{"style":2457},[4461],{"type":998,"value":4243},{"type":993,"tag":1021,"props":4463,"children":4464},{"style":1036},[4465],{"type":998,"value":4248},{"type":993,"tag":1021,"props":4467,"children":4468},{"class":1023,"line":27},[4469],{"type":993,"tag":1021,"props":4470,"children":4471},{"style":1027},[4472],{"type":998,"value":4473},"    # Check if item already exists in cart\n",{"type":993,"tag":1021,"props":4475,"children":4476},{"class":1023,"line":36},[4477,4481,4486,4490],{"type":993,"tag":1021,"props":4478,"children":4479},{"style":1042},[4480],{"type":998,"value":2360},{"type":993,"tag":1021,"props":4482,"children":4483},{"style":1036},[4484],{"type":998,"value":4485}," item ",{"type":993,"tag":1021,"props":4487,"children":4488},{"style":1042},[4489],{"type":998,"value":2347},{"type":993,"tag":1021,"props":4491,"children":4492},{"style":1036},[4493],{"type":998,"value":4494}," cart:\n",{"type":993,"tag":1021,"props":4496,"children":4497},{"class":1023,"line":45},[4498],{"type":993,"tag":1021,"props":4499,"children":4500},{"style":1027},[4501],{"type":998,"value":4502},"        # Add to existing quantity\n",{"type":993,"tag":1021,"props":4504,"children":4505},{"class":1023,"line":54},[4506,4511,4516],{"type":993,"tag":1021,"props":4507,"children":4508},{"style":1036},[4509],{"type":998,"value":4510},"        cart[item] ",{"type":993,"tag":1021,"props":4512,"children":4513},{"style":1042},[4514],{"type":998,"value":4515},"+=",{"type":993,"tag":1021,"props":4517,"children":4518},{"style":1036},[4519],{"type":998,"value":4520}," quantity\n",{"type":993,"tag":1021,"props":4522,"children":4523},{"class":1023,"line":63},[4524,4529],{"type":993,"tag":1021,"props":4525,"children":4526},{"style":1042},[4527],{"type":998,"value":4528},"    else",{"type":993,"tag":1021,"props":4530,"children":4531},{"style":1036},[4532],{"type":998,"value":4533},":\n",{"type":993,"tag":1021,"props":4535,"children":4536},{"class":1023,"line":72},[4537],{"type":993,"tag":1021,"props":4538,"children":4539},{"style":1027},[4540],{"type":998,"value":4541},"        # Add new item\n",{"type":993,"tag":1021,"props":4543,"children":4544},{"class":1023,"line":81},[4545,4549,4553],{"type":993,"tag":1021,"props":4546,"children":4547},{"style":1036},[4548],{"type":998,"value":4510},{"type":993,"tag":1021,"props":4550,"children":4551},{"style":1042},[4552],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4554,"children":4555},{"style":1036},[4556],{"type":998,"value":4520},{"type":993,"tag":1021,"props":4558,"children":4559},{"class":1023,"line":91},[4560],{"type":993,"tag":1021,"props":4561,"children":4562},{"emptyLinePlaceholder":13},[4563],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4565,"children":4566},{"class":1023,"line":100},[4567],{"type":993,"tag":1021,"props":4568,"children":4569},{"style":1027},[4570],{"type":998,"value":4289},{"type":993,"tag":1021,"props":4572,"children":4573},{"class":1023,"line":109},[4574,4578,4582,4586,4590,4594,4598,4602,4606,4610,4614],{"type":993,"tag":1021,"props":4575,"children":4576},{"style":1036},[4577],{"type":998,"value":4297},{"type":993,"tag":1021,"props":4579,"children":4580},{"style":1042},[4581],{"type":998,"value":1045},{"type":993,"tag":1021,"props":4583,"children":4584},{"style":1036},[4585],{"type":998,"value":1050},{"type":993,"tag":1021,"props":4587,"children":4588},{"style":1053},[4589],{"type":998,"value":1056},{"type":993,"tag":1021,"props":4591,"children":4592},{"style":1036},[4593],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4595,"children":4596},{"style":1064},[4597],{"type":998,"value":1067},{"type":993,"tag":1021,"props":4599,"children":4600},{"style":1036},[4601],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4603,"children":4604},{"style":1053},[4605],{"type":998,"value":1077},{"type":993,"tag":1021,"props":4607,"children":4608},{"style":1036},[4609],{"type":998,"value":1061},{"type":993,"tag":1021,"props":4611,"children":4612},{"style":1064},[4613],{"type":998,"value":1086},{"type":993,"tag":1021,"props":4615,"children":4616},{"style":1036},[4617],{"type":998,"value":1091},{"type":993,"tag":1021,"props":4619,"children":4620},{"class":1023,"line":118},[4621],{"type":993,"tag":1021,"props":4622,"children":4623},{"emptyLinePlaceholder":13},[4624],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4626,"children":4627},{"class":1023,"line":127},[4628,4632,4636,4640,4644,4648],{"type":993,"tag":1021,"props":4629,"children":4630},{"style":1036},[4631],{"type":998,"value":4352},{"type":993,"tag":1021,"props":4633,"children":4634},{"style":1053},[4635],{"type":998,"value":1143},{"type":993,"tag":1021,"props":4637,"children":4638},{"style":1036},[4639],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4641,"children":4642},{"style":1064},[4643],{"type":998,"value":4365},{"type":993,"tag":1021,"props":4645,"children":4646},{"style":1036},[4647],{"type":998,"value":3162},{"type":993,"tag":1021,"props":4649,"children":4650},{"style":1027},[4651],{"type":998,"value":4374},{"type":993,"tag":1021,"props":4653,"children":4654},{"class":1023,"line":136},[4655,4659,4663,4667,4671,4675],{"type":993,"tag":1021,"props":4656,"children":4657},{"style":1036},[4658],{"type":998,"value":4352},{"type":993,"tag":1021,"props":4660,"children":4661},{"style":1053},[4662],{"type":998,"value":1056},{"type":993,"tag":1021,"props":4664,"children":4665},{"style":1036},[4666],{"type":998,"value":1072},{"type":993,"tag":1021,"props":4668,"children":4669},{"style":1064},[4670],{"type":998,"value":1086},{"type":993,"tag":1021,"props":4672,"children":4673},{"style":1036},[4674],{"type":998,"value":4398},{"type":993,"tag":1021,"props":4676,"children":4677},{"style":1027},[4678],{"type":998,"value":4403},{"type":993,"tag":1021,"props":4680,"children":4681},{"class":1023,"line":146},[4682],{"type":993,"tag":1021,"props":4683,"children":4684},{"emptyLinePlaceholder":13},[4685],{"type":998,"value":1122},{"type":993,"tag":1021,"props":4687,"children":4688},{"class":1023,"line":155},[4689,4693],{"type":993,"tag":1021,"props":4690,"children":4691},{"style":1064},[4692],{"type":998,"value":1099},{"type":993,"tag":1021,"props":4694,"children":4695},{"style":1036},[4696],{"type":998,"value":4422},{"type":993,"tag":1001,"props":4698,"children":4699},{},[4700],{"type":993,"tag":1481,"props":4701,"children":4702},{},[4703],{"type":998,"value":4704},"Key Learning Points:",{"type":993,"tag":4706,"props":4707,"children":4708},"ul",{},[4709,4729,4740,4757],{"type":993,"tag":4710,"props":4711,"children":4712},"li",{},[4713,4715,4720,4722,4727],{"type":998,"value":4714},"📌 ",{"type":993,"tag":1481,"props":4716,"children":4717},{},[4718],{"type":998,"value":4719},"Membership testing",{"type":998,"value":4721},": Use ",{"type":993,"tag":1017,"props":4723,"children":4725},{"className":4724},[],[4726],{"type":998,"value":2347},{"type":998,"value":4728}," operator to check if a key exists in the dictionary",{"type":993,"tag":4710,"props":4730,"children":4731},{},[4732,4733,4738],{"type":998,"value":4714},{"type":993,"tag":1481,"props":4734,"children":4735},{},[4736],{"type":998,"value":4737},"Conditional addition",{"type":998,"value":4739},": Add new items or update existing ones based on conditions",{"type":993,"tag":4710,"props":4741,"children":4742},{},[4743,4744,4749,4750,4755],{"type":998,"value":4714},{"type":993,"tag":1481,"props":4745,"children":4746},{},[4747],{"type":998,"value":4748},"Dictionary assignment",{"type":998,"value":4721},{"type":993,"tag":1017,"props":4751,"children":4753},{"className":4752},[],[4754],{"type":998,"value":2881},{"type":998,"value":4756}," to add or modify items",{"type":993,"tag":4710,"props":4758,"children":4759},{},[4760,4761,4766],{"type":998,"value":4714},{"type":993,"tag":1481,"props":4762,"children":4763},{},[4764],{"type":998,"value":4765},"Quantity updates",{"type":998,"value":4767},": Perform mathematical operations on dictionary values",{"type":993,"tag":1258,"props":4769,"children":4771},{"id":4770},"test-your-knowledge",[4772],{"type":998,"value":4773},"Test Your Knowledge",{"type":993,"tag":1001,"props":4775,"children":4776},{},[4777],{"type":998,"value":4778},"Test what you've learned about adding dictionary items:",{"type":993,"tag":4780,"props":4781,"children":4785},"redirect-button",{"icon":4782,"label":4783,"url":4784},"pi pi-send","Take Quiz","/tutorial-quiz/python/adding-dictionary-items",[],{"type":993,"tag":1258,"props":4787,"children":4789},{"id":4788},"whats-next",[4790],{"type":998,"value":4791},"What's Next?",{"type":993,"tag":1001,"props":4793,"children":4794},{},[4795],{"type":998,"value":4796},"Now that you can add items to dictionaries effectively, you're ready to learn how to remove them safely. Understanding deletion operations is essential for maintaining clean, efficient data structures.",{"type":993,"tag":1001,"props":4798,"children":4799},{},[4800,4802,4806],{"type":998,"value":4801},"Ready to continue? Check out our lesson on ",{"type":993,"tag":4212,"props":4803,"children":4804},{"href":562},[4805],{"type":998,"value":563},{"type":998,"value":4807},".",{"type":993,"tag":4809,"props":4810,"children":4811},"style",{},[4812],{"type":998,"value":4813},"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":4815},[4816,4817,4822,4826,4827,4828,4833,4834],{"id":1260,"depth":27,"text":1263},{"id":1520,"depth":27,"text":1523,"children":4818},[4819,4820,4821],{"id":1532,"depth":36,"text":1535},{"id":1731,"depth":36,"text":1734},{"id":1964,"depth":36,"text":1967},{"id":2164,"depth":27,"text":2167,"children":4823},[4824,4825],{"id":2175,"depth":36,"text":2178},{"id":2428,"depth":36,"text":2431},{"id":2828,"depth":27,"text":2831},{"id":3027,"depth":27,"text":3030},{"id":3369,"depth":27,"text":3372,"children":4829},[4830,4831,4832],{"id":3375,"depth":36,"text":3378},{"id":3762,"depth":36,"text":3765},{"id":4425,"depth":36,"text":4428},{"id":4770,"depth":27,"text":4773},{"id":4788,"depth":27,"text":4791},1782373743063]