[{"data":1,"prerenderedAt":6857},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/adding-to-sets":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},"/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",[470],{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"body":989,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},{"type":990,"children":991,"toc":6832},"root",[992,1000,1023,1028,1285,1292,1304,1402,1409,1414,1732,1738,1743,2192,2198,2203,2619,2625,2636,2754,2760,2765,3185,3191,3196,3583,3589,3594,4031,4036,4042,4047,4125,4131,4136,4525,4531,4536,4854,4860,4865,4974,4980,4985,5459,5465,5470,5845,5851,5856,6069,6074,6094,6362,6368,6786,6792,6797,6804,6810,6815,6826],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":474},[997],{"type":998,"value":999},"text","➕ Adding to Sets",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004,1006,1013,1015,1021],{"type":998,"value":1005},"Adding elements to sets is straightforward in Python. You can add single items with ",{"type":993,"tag":1007,"props":1008,"children":1010},"code",{"className":1009},[],[1011],{"type":998,"value":1012},"add()",{"type":998,"value":1014},", multiple items with ",{"type":993,"tag":1007,"props":1016,"children":1018},{"className":1017},[],[1019],{"type":998,"value":1020},"update()",{"type":998,"value":1022},", or combine sets with union operations. Sets automatically prevent duplicates, so adding an existing item won't create duplicates.",{"type":993,"tag":1001,"props":1024,"children":1025},{},[1026],{"type":998,"value":1027},"Let's explore different ways to grow your sets:",{"type":993,"tag":1029,"props":1030,"children":1031},"code-try",{},[1032],{"type":993,"tag":1033,"props":1034,"children":1037},"pre",{"className":1035,"code":1036,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic adding to sets\nfruits = {\"apple\", \"banana\"}\nprint(f\"Original fruits: {fruits}\")\n\n# Add a single fruit\nfruits.add(\"orange\")\nprint(f\"After adding orange: {fruits}\")\n\n# Try to add a duplicate (won't change the set)\nfruits.add(\"apple\")\nprint(f\"After adding apple again: {fruits}\")\n",[1038],{"type":993,"tag":1007,"props":1039,"children":1040},{"__ignoreMap":8},[1041,1052,1093,1142,1150,1158,1175,1215,1222,1230,1245],{"type":993,"tag":1042,"props":1043,"children":1045},"span",{"class":1044,"line":12},"line",[1046],{"type":993,"tag":1042,"props":1047,"children":1049},{"style":1048},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1050],{"type":998,"value":1051},"# Basic adding to sets\n",{"type":993,"tag":1042,"props":1053,"children":1054},{"class":1044,"line":27},[1055,1061,1067,1072,1078,1083,1088],{"type":993,"tag":1042,"props":1056,"children":1058},{"style":1057},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1059],{"type":998,"value":1060},"fruits ",{"type":993,"tag":1042,"props":1062,"children":1064},{"style":1063},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1065],{"type":998,"value":1066},"=",{"type":993,"tag":1042,"props":1068,"children":1069},{"style":1057},[1070],{"type":998,"value":1071}," {",{"type":993,"tag":1042,"props":1073,"children":1075},{"style":1074},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1076],{"type":998,"value":1077},"\"apple\"",{"type":993,"tag":1042,"props":1079,"children":1080},{"style":1057},[1081],{"type":998,"value":1082},", ",{"type":993,"tag":1042,"props":1084,"children":1085},{"style":1074},[1086],{"type":998,"value":1087},"\"banana\"",{"type":993,"tag":1042,"props":1089,"children":1090},{"style":1057},[1091],{"type":998,"value":1092},"}\n",{"type":993,"tag":1042,"props":1094,"children":1095},{"class":1044,"line":36},[1096,1102,1107,1112,1117,1122,1127,1132,1137],{"type":993,"tag":1042,"props":1097,"children":1099},{"style":1098},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1100],{"type":998,"value":1101},"print",{"type":993,"tag":1042,"props":1103,"children":1104},{"style":1057},[1105],{"type":998,"value":1106},"(",{"type":993,"tag":1042,"props":1108,"children":1109},{"style":1063},[1110],{"type":998,"value":1111},"f",{"type":993,"tag":1042,"props":1113,"children":1114},{"style":1074},[1115],{"type":998,"value":1116},"\"Original fruits: ",{"type":993,"tag":1042,"props":1118,"children":1119},{"style":1098},[1120],{"type":998,"value":1121},"{",{"type":993,"tag":1042,"props":1123,"children":1124},{"style":1057},[1125],{"type":998,"value":1126},"fruits",{"type":993,"tag":1042,"props":1128,"children":1129},{"style":1098},[1130],{"type":998,"value":1131},"}",{"type":993,"tag":1042,"props":1133,"children":1134},{"style":1074},[1135],{"type":998,"value":1136},"\"",{"type":993,"tag":1042,"props":1138,"children":1139},{"style":1057},[1140],{"type":998,"value":1141},")\n",{"type":993,"tag":1042,"props":1143,"children":1144},{"class":1044,"line":45},[1145],{"type":993,"tag":1042,"props":1146,"children":1147},{"emptyLinePlaceholder":13},[1148],{"type":998,"value":1149},"\n",{"type":993,"tag":1042,"props":1151,"children":1152},{"class":1044,"line":54},[1153],{"type":993,"tag":1042,"props":1154,"children":1155},{"style":1048},[1156],{"type":998,"value":1157},"# Add a single fruit\n",{"type":993,"tag":1042,"props":1159,"children":1160},{"class":1044,"line":63},[1161,1166,1171],{"type":993,"tag":1042,"props":1162,"children":1163},{"style":1057},[1164],{"type":998,"value":1165},"fruits.add(",{"type":993,"tag":1042,"props":1167,"children":1168},{"style":1074},[1169],{"type":998,"value":1170},"\"orange\"",{"type":993,"tag":1042,"props":1172,"children":1173},{"style":1057},[1174],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1176,"children":1177},{"class":1044,"line":72},[1178,1182,1186,1190,1195,1199,1203,1207,1211],{"type":993,"tag":1042,"props":1179,"children":1180},{"style":1098},[1181],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1183,"children":1184},{"style":1057},[1185],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1187,"children":1188},{"style":1063},[1189],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1191,"children":1192},{"style":1074},[1193],{"type":998,"value":1194},"\"After adding orange: ",{"type":993,"tag":1042,"props":1196,"children":1197},{"style":1098},[1198],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1200,"children":1201},{"style":1057},[1202],{"type":998,"value":1126},{"type":993,"tag":1042,"props":1204,"children":1205},{"style":1098},[1206],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1208,"children":1209},{"style":1074},[1210],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1212,"children":1213},{"style":1057},[1214],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1216,"children":1217},{"class":1044,"line":81},[1218],{"type":993,"tag":1042,"props":1219,"children":1220},{"emptyLinePlaceholder":13},[1221],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1223,"children":1224},{"class":1044,"line":91},[1225],{"type":993,"tag":1042,"props":1226,"children":1227},{"style":1048},[1228],{"type":998,"value":1229},"# Try to add a duplicate (won't change the set)\n",{"type":993,"tag":1042,"props":1231,"children":1232},{"class":1044,"line":100},[1233,1237,1241],{"type":993,"tag":1042,"props":1234,"children":1235},{"style":1057},[1236],{"type":998,"value":1165},{"type":993,"tag":1042,"props":1238,"children":1239},{"style":1074},[1240],{"type":998,"value":1077},{"type":993,"tag":1042,"props":1242,"children":1243},{"style":1057},[1244],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1246,"children":1247},{"class":1044,"line":109},[1248,1252,1256,1260,1265,1269,1273,1277,1281],{"type":993,"tag":1042,"props":1249,"children":1250},{"style":1098},[1251],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1253,"children":1254},{"style":1057},[1255],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1257,"children":1258},{"style":1063},[1259],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1261,"children":1262},{"style":1074},[1263],{"type":998,"value":1264},"\"After adding apple again: ",{"type":993,"tag":1042,"props":1266,"children":1267},{"style":1098},[1268],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1270,"children":1271},{"style":1057},[1272],{"type":998,"value":1126},{"type":993,"tag":1042,"props":1274,"children":1275},{"style":1098},[1276],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1278,"children":1279},{"style":1074},[1280],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1282,"children":1283},{"style":1057},[1284],{"type":998,"value":1141},{"type":993,"tag":1286,"props":1287,"children":1289},"h2",{"id":1288},"adding-single-elements",[1290],{"type":998,"value":1291},"🎯 Adding Single Elements",{"type":993,"tag":1001,"props":1293,"children":1294},{},[1295,1297,1302],{"type":998,"value":1296},"The ",{"type":993,"tag":1007,"props":1298,"children":1300},{"className":1299},[],[1301],{"type":998,"value":1012},{"type":998,"value":1303}," method is the simplest way to add one element to a set.",{"type":993,"tag":1305,"props":1306,"children":1310},"info-box",{"emoji":1307,"title":1308,"type":1309},"➕","Adding Single Elements","info",[1311,1320,1345,1353,1376,1384],{"type":993,"tag":1001,"props":1312,"children":1313},{},[1314],{"type":993,"tag":1315,"props":1316,"children":1317},"strong",{},[1318],{"type":998,"value":1319},"add() Method:",{"type":993,"tag":1321,"props":1322,"children":1323},"ul",{},[1324,1330,1335,1340],{"type":993,"tag":1325,"props":1326,"children":1327},"li",{},[1328],{"type":998,"value":1329},"Adds one element to the set",{"type":993,"tag":1325,"props":1331,"children":1332},{},[1333],{"type":998,"value":1334},"Element must be immutable (hashable)",{"type":993,"tag":1325,"props":1336,"children":1337},{},[1338],{"type":998,"value":1339},"Duplicates are automatically ignored",{"type":993,"tag":1325,"props":1341,"children":1342},{},[1343],{"type":998,"value":1344},"Modifies the set in place",{"type":993,"tag":1001,"props":1346,"children":1347},{},[1348],{"type":993,"tag":1315,"props":1349,"children":1350},{},[1351],{"type":998,"value":1352},"Valid Elements:",{"type":993,"tag":1321,"props":1354,"children":1355},{},[1356,1361,1366,1371],{"type":993,"tag":1325,"props":1357,"children":1358},{},[1359],{"type":998,"value":1360},"Numbers: integers, floats",{"type":993,"tag":1325,"props":1362,"children":1363},{},[1364],{"type":998,"value":1365},"Strings: text values",{"type":993,"tag":1325,"props":1367,"children":1368},{},[1369],{"type":998,"value":1370},"Tuples: immutable sequences",{"type":993,"tag":1325,"props":1372,"children":1373},{},[1374],{"type":998,"value":1375},"Frozen sets: immutable sets",{"type":993,"tag":1001,"props":1377,"children":1378},{},[1379],{"type":993,"tag":1315,"props":1380,"children":1381},{},[1382],{"type":998,"value":1383},"Invalid Elements:",{"type":993,"tag":1321,"props":1385,"children":1386},{},[1387,1392,1397],{"type":993,"tag":1325,"props":1388,"children":1389},{},[1390],{"type":998,"value":1391},"Lists: mutable sequences",{"type":993,"tag":1325,"props":1393,"children":1394},{},[1395],{"type":998,"value":1396},"Dictionaries: mutable mappings",{"type":993,"tag":1325,"props":1398,"children":1399},{},[1400],{"type":998,"value":1401},"Regular sets: mutable sets",{"type":993,"tag":1403,"props":1404,"children":1406},"h3",{"id":1405},"basic-single-item-addition",[1407],{"type":998,"value":1408},"Basic Single Item Addition",{"type":993,"tag":1001,"props":1410,"children":1411},{},[1412],{"type":998,"value":1413},"Adding individual elements to sets one at a time.",{"type":993,"tag":1029,"props":1415,"children":1416},{},[1417],{"type":993,"tag":1033,"props":1418,"children":1420},{"className":1035,"code":1419,"language":6,"meta":8,"style":8},"# Adding single items\ncolors = set()  # Start with empty set\nprint(f\"Empty set: {colors}\")\n\n# Add colors one by one\ncolors.add(\"red\")\ncolors.add(\"green\")\ncolors.add(\"blue\")\n\nprint(f\"After adding colors: {colors}\")\n\n# Add a number to demonstrate mixed types\nmixed_set = {\"hello\"}\nmixed_set.add(42)\nmixed_set.add(3.14)\n\nprint(f\"Mixed set: {mixed_set}\")\n",[1421],{"type":993,"tag":1007,"props":1422,"children":1423},{"__ignoreMap":8},[1424,1432,1459,1500,1507,1515,1532,1548,1564,1571,1611,1618,1626,1651,1668,1684,1691],{"type":993,"tag":1042,"props":1425,"children":1426},{"class":1044,"line":12},[1427],{"type":993,"tag":1042,"props":1428,"children":1429},{"style":1048},[1430],{"type":998,"value":1431},"# Adding single items\n",{"type":993,"tag":1042,"props":1433,"children":1434},{"class":1044,"line":27},[1435,1440,1444,1449,1454],{"type":993,"tag":1042,"props":1436,"children":1437},{"style":1057},[1438],{"type":998,"value":1439},"colors ",{"type":993,"tag":1042,"props":1441,"children":1442},{"style":1063},[1443],{"type":998,"value":1066},{"type":993,"tag":1042,"props":1445,"children":1446},{"style":1098},[1447],{"type":998,"value":1448}," set",{"type":993,"tag":1042,"props":1450,"children":1451},{"style":1057},[1452],{"type":998,"value":1453},"()  ",{"type":993,"tag":1042,"props":1455,"children":1456},{"style":1048},[1457],{"type":998,"value":1458},"# Start with empty set\n",{"type":993,"tag":1042,"props":1460,"children":1461},{"class":1044,"line":36},[1462,1466,1470,1474,1479,1483,1488,1492,1496],{"type":993,"tag":1042,"props":1463,"children":1464},{"style":1098},[1465],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1467,"children":1468},{"style":1057},[1469],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1471,"children":1472},{"style":1063},[1473],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1475,"children":1476},{"style":1074},[1477],{"type":998,"value":1478},"\"Empty set: ",{"type":993,"tag":1042,"props":1480,"children":1481},{"style":1098},[1482],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1484,"children":1485},{"style":1057},[1486],{"type":998,"value":1487},"colors",{"type":993,"tag":1042,"props":1489,"children":1490},{"style":1098},[1491],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1493,"children":1494},{"style":1074},[1495],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1497,"children":1498},{"style":1057},[1499],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1501,"children":1502},{"class":1044,"line":45},[1503],{"type":993,"tag":1042,"props":1504,"children":1505},{"emptyLinePlaceholder":13},[1506],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1508,"children":1509},{"class":1044,"line":54},[1510],{"type":993,"tag":1042,"props":1511,"children":1512},{"style":1048},[1513],{"type":998,"value":1514},"# Add colors one by one\n",{"type":993,"tag":1042,"props":1516,"children":1517},{"class":1044,"line":63},[1518,1523,1528],{"type":993,"tag":1042,"props":1519,"children":1520},{"style":1057},[1521],{"type":998,"value":1522},"colors.add(",{"type":993,"tag":1042,"props":1524,"children":1525},{"style":1074},[1526],{"type":998,"value":1527},"\"red\"",{"type":993,"tag":1042,"props":1529,"children":1530},{"style":1057},[1531],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1533,"children":1534},{"class":1044,"line":72},[1535,1539,1544],{"type":993,"tag":1042,"props":1536,"children":1537},{"style":1057},[1538],{"type":998,"value":1522},{"type":993,"tag":1042,"props":1540,"children":1541},{"style":1074},[1542],{"type":998,"value":1543},"\"green\"",{"type":993,"tag":1042,"props":1545,"children":1546},{"style":1057},[1547],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1549,"children":1550},{"class":1044,"line":81},[1551,1555,1560],{"type":993,"tag":1042,"props":1552,"children":1553},{"style":1057},[1554],{"type":998,"value":1522},{"type":993,"tag":1042,"props":1556,"children":1557},{"style":1074},[1558],{"type":998,"value":1559},"\"blue\"",{"type":993,"tag":1042,"props":1561,"children":1562},{"style":1057},[1563],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1565,"children":1566},{"class":1044,"line":91},[1567],{"type":993,"tag":1042,"props":1568,"children":1569},{"emptyLinePlaceholder":13},[1570],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1572,"children":1573},{"class":1044,"line":100},[1574,1578,1582,1586,1591,1595,1599,1603,1607],{"type":993,"tag":1042,"props":1575,"children":1576},{"style":1098},[1577],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1579,"children":1580},{"style":1057},[1581],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1583,"children":1584},{"style":1063},[1585],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1587,"children":1588},{"style":1074},[1589],{"type":998,"value":1590},"\"After adding colors: ",{"type":993,"tag":1042,"props":1592,"children":1593},{"style":1098},[1594],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1596,"children":1597},{"style":1057},[1598],{"type":998,"value":1487},{"type":993,"tag":1042,"props":1600,"children":1601},{"style":1098},[1602],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1604,"children":1605},{"style":1074},[1606],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1608,"children":1609},{"style":1057},[1610],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1612,"children":1613},{"class":1044,"line":109},[1614],{"type":993,"tag":1042,"props":1615,"children":1616},{"emptyLinePlaceholder":13},[1617],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1619,"children":1620},{"class":1044,"line":118},[1621],{"type":993,"tag":1042,"props":1622,"children":1623},{"style":1048},[1624],{"type":998,"value":1625},"# Add a number to demonstrate mixed types\n",{"type":993,"tag":1042,"props":1627,"children":1628},{"class":1044,"line":127},[1629,1634,1638,1642,1647],{"type":993,"tag":1042,"props":1630,"children":1631},{"style":1057},[1632],{"type":998,"value":1633},"mixed_set ",{"type":993,"tag":1042,"props":1635,"children":1636},{"style":1063},[1637],{"type":998,"value":1066},{"type":993,"tag":1042,"props":1639,"children":1640},{"style":1057},[1641],{"type":998,"value":1071},{"type":993,"tag":1042,"props":1643,"children":1644},{"style":1074},[1645],{"type":998,"value":1646},"\"hello\"",{"type":993,"tag":1042,"props":1648,"children":1649},{"style":1057},[1650],{"type":998,"value":1092},{"type":993,"tag":1042,"props":1652,"children":1653},{"class":1044,"line":136},[1654,1659,1664],{"type":993,"tag":1042,"props":1655,"children":1656},{"style":1057},[1657],{"type":998,"value":1658},"mixed_set.add(",{"type":993,"tag":1042,"props":1660,"children":1661},{"style":1098},[1662],{"type":998,"value":1663},"42",{"type":993,"tag":1042,"props":1665,"children":1666},{"style":1057},[1667],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1669,"children":1670},{"class":1044,"line":146},[1671,1675,1680],{"type":993,"tag":1042,"props":1672,"children":1673},{"style":1057},[1674],{"type":998,"value":1658},{"type":993,"tag":1042,"props":1676,"children":1677},{"style":1098},[1678],{"type":998,"value":1679},"3.14",{"type":993,"tag":1042,"props":1681,"children":1682},{"style":1057},[1683],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1685,"children":1686},{"class":1044,"line":155},[1687],{"type":993,"tag":1042,"props":1688,"children":1689},{"emptyLinePlaceholder":13},[1690],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1692,"children":1693},{"class":1044,"line":164},[1694,1698,1702,1706,1711,1715,1720,1724,1728],{"type":993,"tag":1042,"props":1695,"children":1696},{"style":1098},[1697],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1699,"children":1700},{"style":1057},[1701],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1703,"children":1704},{"style":1063},[1705],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1707,"children":1708},{"style":1074},[1709],{"type":998,"value":1710},"\"Mixed set: ",{"type":993,"tag":1042,"props":1712,"children":1713},{"style":1098},[1714],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1716,"children":1717},{"style":1057},[1718],{"type":998,"value":1719},"mixed_set",{"type":993,"tag":1042,"props":1721,"children":1722},{"style":1098},[1723],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1725,"children":1726},{"style":1074},[1727],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1729,"children":1730},{"style":1057},[1731],{"type":998,"value":1141},{"type":993,"tag":1403,"props":1733,"children":1735},{"id":1734},"handling-duplicate-additions",[1736],{"type":998,"value":1737},"Handling Duplicate Additions",{"type":993,"tag":1001,"props":1739,"children":1740},{},[1741],{"type":998,"value":1742},"Understanding how sets handle duplicate values.",{"type":993,"tag":1029,"props":1744,"children":1745},{},[1746],{"type":993,"tag":1033,"props":1747,"children":1749},{"className":1035,"code":1748,"language":6,"meta":8,"style":8},"# Duplicate handling\nnumbers = {1, 2, 3}\nprint(f\"Original: {numbers}\")\n\n# Add existing number (no change)\nnumbers.add(2)\nprint(f\"After adding 2 again: {numbers}\")\n\n# Add new number\nnumbers.add(4)\nprint(f\"After adding 4: {numbers}\")\n\n# Practical example: tracking unique visitors\nunique_visitors = set()\nvisitor_log = [101, 102, 101, 103, 102, 104]\n\nfor visitor_id in visitor_log:\n    unique_visitors.add(visitor_id)\n    print(f\"Visitor {visitor_id} added. Unique count: {len(unique_visitors)}\")\n",[1750],{"type":993,"tag":1007,"props":1751,"children":1752},{"__ignoreMap":8},[1753,1761,1804,1845,1852,1860,1876,1916,1923,1931,1947,1987,1994,2002,2023,2093,2100,2123,2131],{"type":993,"tag":1042,"props":1754,"children":1755},{"class":1044,"line":12},[1756],{"type":993,"tag":1042,"props":1757,"children":1758},{"style":1048},[1759],{"type":998,"value":1760},"# Duplicate handling\n",{"type":993,"tag":1042,"props":1762,"children":1763},{"class":1044,"line":27},[1764,1769,1773,1777,1782,1786,1791,1795,1800],{"type":993,"tag":1042,"props":1765,"children":1766},{"style":1057},[1767],{"type":998,"value":1768},"numbers ",{"type":993,"tag":1042,"props":1770,"children":1771},{"style":1063},[1772],{"type":998,"value":1066},{"type":993,"tag":1042,"props":1774,"children":1775},{"style":1057},[1776],{"type":998,"value":1071},{"type":993,"tag":1042,"props":1778,"children":1779},{"style":1098},[1780],{"type":998,"value":1781},"1",{"type":993,"tag":1042,"props":1783,"children":1784},{"style":1057},[1785],{"type":998,"value":1082},{"type":993,"tag":1042,"props":1787,"children":1788},{"style":1098},[1789],{"type":998,"value":1790},"2",{"type":993,"tag":1042,"props":1792,"children":1793},{"style":1057},[1794],{"type":998,"value":1082},{"type":993,"tag":1042,"props":1796,"children":1797},{"style":1098},[1798],{"type":998,"value":1799},"3",{"type":993,"tag":1042,"props":1801,"children":1802},{"style":1057},[1803],{"type":998,"value":1092},{"type":993,"tag":1042,"props":1805,"children":1806},{"class":1044,"line":36},[1807,1811,1815,1819,1824,1828,1833,1837,1841],{"type":993,"tag":1042,"props":1808,"children":1809},{"style":1098},[1810],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1812,"children":1813},{"style":1057},[1814],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1816,"children":1817},{"style":1063},[1818],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1820,"children":1821},{"style":1074},[1822],{"type":998,"value":1823},"\"Original: ",{"type":993,"tag":1042,"props":1825,"children":1826},{"style":1098},[1827],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1829,"children":1830},{"style":1057},[1831],{"type":998,"value":1832},"numbers",{"type":993,"tag":1042,"props":1834,"children":1835},{"style":1098},[1836],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1838,"children":1839},{"style":1074},[1840],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1842,"children":1843},{"style":1057},[1844],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1846,"children":1847},{"class":1044,"line":45},[1848],{"type":993,"tag":1042,"props":1849,"children":1850},{"emptyLinePlaceholder":13},[1851],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1853,"children":1854},{"class":1044,"line":54},[1855],{"type":993,"tag":1042,"props":1856,"children":1857},{"style":1048},[1858],{"type":998,"value":1859},"# Add existing number (no change)\n",{"type":993,"tag":1042,"props":1861,"children":1862},{"class":1044,"line":63},[1863,1868,1872],{"type":993,"tag":1042,"props":1864,"children":1865},{"style":1057},[1866],{"type":998,"value":1867},"numbers.add(",{"type":993,"tag":1042,"props":1869,"children":1870},{"style":1098},[1871],{"type":998,"value":1790},{"type":993,"tag":1042,"props":1873,"children":1874},{"style":1057},[1875],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1877,"children":1878},{"class":1044,"line":72},[1879,1883,1887,1891,1896,1900,1904,1908,1912],{"type":993,"tag":1042,"props":1880,"children":1881},{"style":1098},[1882],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1884,"children":1885},{"style":1057},[1886],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1888,"children":1889},{"style":1063},[1890],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1892,"children":1893},{"style":1074},[1894],{"type":998,"value":1895},"\"After adding 2 again: ",{"type":993,"tag":1042,"props":1897,"children":1898},{"style":1098},[1899],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1901,"children":1902},{"style":1057},[1903],{"type":998,"value":1832},{"type":993,"tag":1042,"props":1905,"children":1906},{"style":1098},[1907],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1909,"children":1910},{"style":1074},[1911],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1913,"children":1914},{"style":1057},[1915],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1917,"children":1918},{"class":1044,"line":81},[1919],{"type":993,"tag":1042,"props":1920,"children":1921},{"emptyLinePlaceholder":13},[1922],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1924,"children":1925},{"class":1044,"line":91},[1926],{"type":993,"tag":1042,"props":1927,"children":1928},{"style":1048},[1929],{"type":998,"value":1930},"# Add new number\n",{"type":993,"tag":1042,"props":1932,"children":1933},{"class":1044,"line":100},[1934,1938,1943],{"type":993,"tag":1042,"props":1935,"children":1936},{"style":1057},[1937],{"type":998,"value":1867},{"type":993,"tag":1042,"props":1939,"children":1940},{"style":1098},[1941],{"type":998,"value":1942},"4",{"type":993,"tag":1042,"props":1944,"children":1945},{"style":1057},[1946],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1948,"children":1949},{"class":1044,"line":109},[1950,1954,1958,1962,1967,1971,1975,1979,1983],{"type":993,"tag":1042,"props":1951,"children":1952},{"style":1098},[1953],{"type":998,"value":1101},{"type":993,"tag":1042,"props":1955,"children":1956},{"style":1057},[1957],{"type":998,"value":1106},{"type":993,"tag":1042,"props":1959,"children":1960},{"style":1063},[1961],{"type":998,"value":1111},{"type":993,"tag":1042,"props":1963,"children":1964},{"style":1074},[1965],{"type":998,"value":1966},"\"After adding 4: ",{"type":993,"tag":1042,"props":1968,"children":1969},{"style":1098},[1970],{"type":998,"value":1121},{"type":993,"tag":1042,"props":1972,"children":1973},{"style":1057},[1974],{"type":998,"value":1832},{"type":993,"tag":1042,"props":1976,"children":1977},{"style":1098},[1978],{"type":998,"value":1131},{"type":993,"tag":1042,"props":1980,"children":1981},{"style":1074},[1982],{"type":998,"value":1136},{"type":993,"tag":1042,"props":1984,"children":1985},{"style":1057},[1986],{"type":998,"value":1141},{"type":993,"tag":1042,"props":1988,"children":1989},{"class":1044,"line":118},[1990],{"type":993,"tag":1042,"props":1991,"children":1992},{"emptyLinePlaceholder":13},[1993],{"type":998,"value":1149},{"type":993,"tag":1042,"props":1995,"children":1996},{"class":1044,"line":127},[1997],{"type":993,"tag":1042,"props":1998,"children":1999},{"style":1048},[2000],{"type":998,"value":2001},"# Practical example: tracking unique visitors\n",{"type":993,"tag":1042,"props":2003,"children":2004},{"class":1044,"line":136},[2005,2010,2014,2018],{"type":993,"tag":1042,"props":2006,"children":2007},{"style":1057},[2008],{"type":998,"value":2009},"unique_visitors ",{"type":993,"tag":1042,"props":2011,"children":2012},{"style":1063},[2013],{"type":998,"value":1066},{"type":993,"tag":1042,"props":2015,"children":2016},{"style":1098},[2017],{"type":998,"value":1448},{"type":993,"tag":1042,"props":2019,"children":2020},{"style":1057},[2021],{"type":998,"value":2022},"()\n",{"type":993,"tag":1042,"props":2024,"children":2025},{"class":1044,"line":146},[2026,2031,2035,2040,2045,2049,2054,2058,2062,2066,2071,2075,2079,2083,2088],{"type":993,"tag":1042,"props":2027,"children":2028},{"style":1057},[2029],{"type":998,"value":2030},"visitor_log ",{"type":993,"tag":1042,"props":2032,"children":2033},{"style":1063},[2034],{"type":998,"value":1066},{"type":993,"tag":1042,"props":2036,"children":2037},{"style":1057},[2038],{"type":998,"value":2039}," [",{"type":993,"tag":1042,"props":2041,"children":2042},{"style":1098},[2043],{"type":998,"value":2044},"101",{"type":993,"tag":1042,"props":2046,"children":2047},{"style":1057},[2048],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2050,"children":2051},{"style":1098},[2052],{"type":998,"value":2053},"102",{"type":993,"tag":1042,"props":2055,"children":2056},{"style":1057},[2057],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2059,"children":2060},{"style":1098},[2061],{"type":998,"value":2044},{"type":993,"tag":1042,"props":2063,"children":2064},{"style":1057},[2065],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2067,"children":2068},{"style":1098},[2069],{"type":998,"value":2070},"103",{"type":993,"tag":1042,"props":2072,"children":2073},{"style":1057},[2074],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2076,"children":2077},{"style":1098},[2078],{"type":998,"value":2053},{"type":993,"tag":1042,"props":2080,"children":2081},{"style":1057},[2082],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2084,"children":2085},{"style":1098},[2086],{"type":998,"value":2087},"104",{"type":993,"tag":1042,"props":2089,"children":2090},{"style":1057},[2091],{"type":998,"value":2092},"]\n",{"type":993,"tag":1042,"props":2094,"children":2095},{"class":1044,"line":155},[2096],{"type":993,"tag":1042,"props":2097,"children":2098},{"emptyLinePlaceholder":13},[2099],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2101,"children":2102},{"class":1044,"line":164},[2103,2108,2113,2118],{"type":993,"tag":1042,"props":2104,"children":2105},{"style":1063},[2106],{"type":998,"value":2107},"for",{"type":993,"tag":1042,"props":2109,"children":2110},{"style":1057},[2111],{"type":998,"value":2112}," visitor_id ",{"type":993,"tag":1042,"props":2114,"children":2115},{"style":1063},[2116],{"type":998,"value":2117},"in",{"type":993,"tag":1042,"props":2119,"children":2120},{"style":1057},[2121],{"type":998,"value":2122}," visitor_log:\n",{"type":993,"tag":1042,"props":2124,"children":2125},{"class":1044,"line":173},[2126],{"type":993,"tag":1042,"props":2127,"children":2128},{"style":1057},[2129],{"type":998,"value":2130},"    unique_visitors.add(visitor_id)\n",{"type":993,"tag":1042,"props":2132,"children":2133},{"class":1044,"line":182},[2134,2139,2143,2147,2152,2156,2161,2165,2170,2175,2180,2184,2188],{"type":993,"tag":1042,"props":2135,"children":2136},{"style":1098},[2137],{"type":998,"value":2138},"    print",{"type":993,"tag":1042,"props":2140,"children":2141},{"style":1057},[2142],{"type":998,"value":1106},{"type":993,"tag":1042,"props":2144,"children":2145},{"style":1063},[2146],{"type":998,"value":1111},{"type":993,"tag":1042,"props":2148,"children":2149},{"style":1074},[2150],{"type":998,"value":2151},"\"Visitor ",{"type":993,"tag":1042,"props":2153,"children":2154},{"style":1098},[2155],{"type":998,"value":1121},{"type":993,"tag":1042,"props":2157,"children":2158},{"style":1057},[2159],{"type":998,"value":2160},"visitor_id",{"type":993,"tag":1042,"props":2162,"children":2163},{"style":1098},[2164],{"type":998,"value":1131},{"type":993,"tag":1042,"props":2166,"children":2167},{"style":1074},[2168],{"type":998,"value":2169}," added. Unique count: ",{"type":993,"tag":1042,"props":2171,"children":2172},{"style":1098},[2173],{"type":998,"value":2174},"{len",{"type":993,"tag":1042,"props":2176,"children":2177},{"style":1057},[2178],{"type":998,"value":2179},"(unique_visitors)",{"type":993,"tag":1042,"props":2181,"children":2182},{"style":1098},[2183],{"type":998,"value":1131},{"type":993,"tag":1042,"props":2185,"children":2186},{"style":1074},[2187],{"type":998,"value":1136},{"type":993,"tag":1042,"props":2189,"children":2190},{"style":1057},[2191],{"type":998,"value":1141},{"type":993,"tag":1403,"props":2193,"children":2195},{"id":2194},"adding-complex-objects",[2196],{"type":998,"value":2197},"Adding Complex Objects",{"type":993,"tag":1001,"props":2199,"children":2200},{},[2201],{"type":998,"value":2202},"Adding tuples and other immutable objects to sets.",{"type":993,"tag":1029,"props":2204,"children":2205},{},[2206],{"type":993,"tag":1033,"props":2207,"children":2209},{"className":1035,"code":2208,"language":6,"meta":8,"style":8},"# Adding tuples and complex objects\ncoordinates = set()\n\n# Add coordinate points as tuples\ncoordinates.add((0, 0))\ncoordinates.add((1, 1))\ncoordinates.add((2, 2))\n\nprint(f\"Coordinates: {coordinates}\")\n\n# Add user information as tuples\nusers = set()\nusers.add((\"Alice\", 25))\nusers.add((\"Bob\", 30))\nusers.add((\"Carol\", 28))\n\nprint(f\"Users: {users}\")\n\n# Try to add the same coordinate again\ncoordinates.add((0, 0))  # No change\nprint(f\"After duplicate coordinate: {coordinates}\")\n",[2210],{"type":993,"tag":1007,"props":2211,"children":2212},{"__ignoreMap":8},[2213,2221,2241,2248,2256,2282,2305,2328,2335,2376,2383,2391,2411,2437,2462,2487,2494,2535,2542,2550,2579],{"type":993,"tag":1042,"props":2214,"children":2215},{"class":1044,"line":12},[2216],{"type":993,"tag":1042,"props":2217,"children":2218},{"style":1048},[2219],{"type":998,"value":2220},"# Adding tuples and complex objects\n",{"type":993,"tag":1042,"props":2222,"children":2223},{"class":1044,"line":27},[2224,2229,2233,2237],{"type":993,"tag":1042,"props":2225,"children":2226},{"style":1057},[2227],{"type":998,"value":2228},"coordinates ",{"type":993,"tag":1042,"props":2230,"children":2231},{"style":1063},[2232],{"type":998,"value":1066},{"type":993,"tag":1042,"props":2234,"children":2235},{"style":1098},[2236],{"type":998,"value":1448},{"type":993,"tag":1042,"props":2238,"children":2239},{"style":1057},[2240],{"type":998,"value":2022},{"type":993,"tag":1042,"props":2242,"children":2243},{"class":1044,"line":36},[2244],{"type":993,"tag":1042,"props":2245,"children":2246},{"emptyLinePlaceholder":13},[2247],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2249,"children":2250},{"class":1044,"line":45},[2251],{"type":993,"tag":1042,"props":2252,"children":2253},{"style":1048},[2254],{"type":998,"value":2255},"# Add coordinate points as tuples\n",{"type":993,"tag":1042,"props":2257,"children":2258},{"class":1044,"line":54},[2259,2264,2269,2273,2277],{"type":993,"tag":1042,"props":2260,"children":2261},{"style":1057},[2262],{"type":998,"value":2263},"coordinates.add((",{"type":993,"tag":1042,"props":2265,"children":2266},{"style":1098},[2267],{"type":998,"value":2268},"0",{"type":993,"tag":1042,"props":2270,"children":2271},{"style":1057},[2272],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2274,"children":2275},{"style":1098},[2276],{"type":998,"value":2268},{"type":993,"tag":1042,"props":2278,"children":2279},{"style":1057},[2280],{"type":998,"value":2281},"))\n",{"type":993,"tag":1042,"props":2283,"children":2284},{"class":1044,"line":63},[2285,2289,2293,2297,2301],{"type":993,"tag":1042,"props":2286,"children":2287},{"style":1057},[2288],{"type":998,"value":2263},{"type":993,"tag":1042,"props":2290,"children":2291},{"style":1098},[2292],{"type":998,"value":1781},{"type":993,"tag":1042,"props":2294,"children":2295},{"style":1057},[2296],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2298,"children":2299},{"style":1098},[2300],{"type":998,"value":1781},{"type":993,"tag":1042,"props":2302,"children":2303},{"style":1057},[2304],{"type":998,"value":2281},{"type":993,"tag":1042,"props":2306,"children":2307},{"class":1044,"line":72},[2308,2312,2316,2320,2324],{"type":993,"tag":1042,"props":2309,"children":2310},{"style":1057},[2311],{"type":998,"value":2263},{"type":993,"tag":1042,"props":2313,"children":2314},{"style":1098},[2315],{"type":998,"value":1790},{"type":993,"tag":1042,"props":2317,"children":2318},{"style":1057},[2319],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2321,"children":2322},{"style":1098},[2323],{"type":998,"value":1790},{"type":993,"tag":1042,"props":2325,"children":2326},{"style":1057},[2327],{"type":998,"value":2281},{"type":993,"tag":1042,"props":2329,"children":2330},{"class":1044,"line":81},[2331],{"type":993,"tag":1042,"props":2332,"children":2333},{"emptyLinePlaceholder":13},[2334],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2336,"children":2337},{"class":1044,"line":91},[2338,2342,2346,2350,2355,2359,2364,2368,2372],{"type":993,"tag":1042,"props":2339,"children":2340},{"style":1098},[2341],{"type":998,"value":1101},{"type":993,"tag":1042,"props":2343,"children":2344},{"style":1057},[2345],{"type":998,"value":1106},{"type":993,"tag":1042,"props":2347,"children":2348},{"style":1063},[2349],{"type":998,"value":1111},{"type":993,"tag":1042,"props":2351,"children":2352},{"style":1074},[2353],{"type":998,"value":2354},"\"Coordinates: ",{"type":993,"tag":1042,"props":2356,"children":2357},{"style":1098},[2358],{"type":998,"value":1121},{"type":993,"tag":1042,"props":2360,"children":2361},{"style":1057},[2362],{"type":998,"value":2363},"coordinates",{"type":993,"tag":1042,"props":2365,"children":2366},{"style":1098},[2367],{"type":998,"value":1131},{"type":993,"tag":1042,"props":2369,"children":2370},{"style":1074},[2371],{"type":998,"value":1136},{"type":993,"tag":1042,"props":2373,"children":2374},{"style":1057},[2375],{"type":998,"value":1141},{"type":993,"tag":1042,"props":2377,"children":2378},{"class":1044,"line":100},[2379],{"type":993,"tag":1042,"props":2380,"children":2381},{"emptyLinePlaceholder":13},[2382],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2384,"children":2385},{"class":1044,"line":109},[2386],{"type":993,"tag":1042,"props":2387,"children":2388},{"style":1048},[2389],{"type":998,"value":2390},"# Add user information as tuples\n",{"type":993,"tag":1042,"props":2392,"children":2393},{"class":1044,"line":118},[2394,2399,2403,2407],{"type":993,"tag":1042,"props":2395,"children":2396},{"style":1057},[2397],{"type":998,"value":2398},"users ",{"type":993,"tag":1042,"props":2400,"children":2401},{"style":1063},[2402],{"type":998,"value":1066},{"type":993,"tag":1042,"props":2404,"children":2405},{"style":1098},[2406],{"type":998,"value":1448},{"type":993,"tag":1042,"props":2408,"children":2409},{"style":1057},[2410],{"type":998,"value":2022},{"type":993,"tag":1042,"props":2412,"children":2413},{"class":1044,"line":127},[2414,2419,2424,2428,2433],{"type":993,"tag":1042,"props":2415,"children":2416},{"style":1057},[2417],{"type":998,"value":2418},"users.add((",{"type":993,"tag":1042,"props":2420,"children":2421},{"style":1074},[2422],{"type":998,"value":2423},"\"Alice\"",{"type":993,"tag":1042,"props":2425,"children":2426},{"style":1057},[2427],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2429,"children":2430},{"style":1098},[2431],{"type":998,"value":2432},"25",{"type":993,"tag":1042,"props":2434,"children":2435},{"style":1057},[2436],{"type":998,"value":2281},{"type":993,"tag":1042,"props":2438,"children":2439},{"class":1044,"line":136},[2440,2444,2449,2453,2458],{"type":993,"tag":1042,"props":2441,"children":2442},{"style":1057},[2443],{"type":998,"value":2418},{"type":993,"tag":1042,"props":2445,"children":2446},{"style":1074},[2447],{"type":998,"value":2448},"\"Bob\"",{"type":993,"tag":1042,"props":2450,"children":2451},{"style":1057},[2452],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2454,"children":2455},{"style":1098},[2456],{"type":998,"value":2457},"30",{"type":993,"tag":1042,"props":2459,"children":2460},{"style":1057},[2461],{"type":998,"value":2281},{"type":993,"tag":1042,"props":2463,"children":2464},{"class":1044,"line":146},[2465,2469,2474,2478,2483],{"type":993,"tag":1042,"props":2466,"children":2467},{"style":1057},[2468],{"type":998,"value":2418},{"type":993,"tag":1042,"props":2470,"children":2471},{"style":1074},[2472],{"type":998,"value":2473},"\"Carol\"",{"type":993,"tag":1042,"props":2475,"children":2476},{"style":1057},[2477],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2479,"children":2480},{"style":1098},[2481],{"type":998,"value":2482},"28",{"type":993,"tag":1042,"props":2484,"children":2485},{"style":1057},[2486],{"type":998,"value":2281},{"type":993,"tag":1042,"props":2488,"children":2489},{"class":1044,"line":155},[2490],{"type":993,"tag":1042,"props":2491,"children":2492},{"emptyLinePlaceholder":13},[2493],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2495,"children":2496},{"class":1044,"line":164},[2497,2501,2505,2509,2514,2518,2523,2527,2531],{"type":993,"tag":1042,"props":2498,"children":2499},{"style":1098},[2500],{"type":998,"value":1101},{"type":993,"tag":1042,"props":2502,"children":2503},{"style":1057},[2504],{"type":998,"value":1106},{"type":993,"tag":1042,"props":2506,"children":2507},{"style":1063},[2508],{"type":998,"value":1111},{"type":993,"tag":1042,"props":2510,"children":2511},{"style":1074},[2512],{"type":998,"value":2513},"\"Users: ",{"type":993,"tag":1042,"props":2515,"children":2516},{"style":1098},[2517],{"type":998,"value":1121},{"type":993,"tag":1042,"props":2519,"children":2520},{"style":1057},[2521],{"type":998,"value":2522},"users",{"type":993,"tag":1042,"props":2524,"children":2525},{"style":1098},[2526],{"type":998,"value":1131},{"type":993,"tag":1042,"props":2528,"children":2529},{"style":1074},[2530],{"type":998,"value":1136},{"type":993,"tag":1042,"props":2532,"children":2533},{"style":1057},[2534],{"type":998,"value":1141},{"type":993,"tag":1042,"props":2536,"children":2537},{"class":1044,"line":173},[2538],{"type":993,"tag":1042,"props":2539,"children":2540},{"emptyLinePlaceholder":13},[2541],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2543,"children":2544},{"class":1044,"line":182},[2545],{"type":993,"tag":1042,"props":2546,"children":2547},{"style":1048},[2548],{"type":998,"value":2549},"# Try to add the same coordinate again\n",{"type":993,"tag":1042,"props":2551,"children":2552},{"class":1044,"line":191},[2553,2557,2561,2565,2569,2574],{"type":993,"tag":1042,"props":2554,"children":2555},{"style":1057},[2556],{"type":998,"value":2263},{"type":993,"tag":1042,"props":2558,"children":2559},{"style":1098},[2560],{"type":998,"value":2268},{"type":993,"tag":1042,"props":2562,"children":2563},{"style":1057},[2564],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2566,"children":2567},{"style":1098},[2568],{"type":998,"value":2268},{"type":993,"tag":1042,"props":2570,"children":2571},{"style":1057},[2572],{"type":998,"value":2573},"))  ",{"type":993,"tag":1042,"props":2575,"children":2576},{"style":1048},[2577],{"type":998,"value":2578},"# No change\n",{"type":993,"tag":1042,"props":2580,"children":2581},{"class":1044,"line":201},[2582,2586,2590,2594,2599,2603,2607,2611,2615],{"type":993,"tag":1042,"props":2583,"children":2584},{"style":1098},[2585],{"type":998,"value":1101},{"type":993,"tag":1042,"props":2587,"children":2588},{"style":1057},[2589],{"type":998,"value":1106},{"type":993,"tag":1042,"props":2591,"children":2592},{"style":1063},[2593],{"type":998,"value":1111},{"type":993,"tag":1042,"props":2595,"children":2596},{"style":1074},[2597],{"type":998,"value":2598},"\"After duplicate coordinate: ",{"type":993,"tag":1042,"props":2600,"children":2601},{"style":1098},[2602],{"type":998,"value":1121},{"type":993,"tag":1042,"props":2604,"children":2605},{"style":1057},[2606],{"type":998,"value":2363},{"type":993,"tag":1042,"props":2608,"children":2609},{"style":1098},[2610],{"type":998,"value":1131},{"type":993,"tag":1042,"props":2612,"children":2613},{"style":1074},[2614],{"type":998,"value":1136},{"type":993,"tag":1042,"props":2616,"children":2617},{"style":1057},[2618],{"type":998,"value":1141},{"type":993,"tag":1286,"props":2620,"children":2622},{"id":2621},"adding-multiple-elements",[2623],{"type":998,"value":2624},"⚡ Adding Multiple Elements",{"type":993,"tag":1001,"props":2626,"children":2627},{},[2628,2629,2634],{"type":998,"value":1296},{"type":993,"tag":1007,"props":2630,"children":2632},{"className":2631},[],[2633],{"type":998,"value":1020},{"type":998,"value":2635}," method allows you to add multiple elements at once from any iterable.",{"type":993,"tag":1305,"props":2637,"children":2641},{"emoji":2638,"title":2639,"type":2640},"📝","Adding Multiple Elements","success",[2642,2650,2673,2681,2728,2736],{"type":993,"tag":1001,"props":2643,"children":2644},{},[2645],{"type":993,"tag":1315,"props":2646,"children":2647},{},[2648],{"type":998,"value":2649},"update() Method:",{"type":993,"tag":1321,"props":2651,"children":2652},{},[2653,2658,2663,2668],{"type":993,"tag":1325,"props":2654,"children":2655},{},[2656],{"type":998,"value":2657},"Adds all elements from an iterable",{"type":993,"tag":1325,"props":2659,"children":2660},{},[2661],{"type":998,"value":2662},"Accepts lists, tuples, strings, other sets",{"type":993,"tag":1325,"props":2664,"children":2665},{},[2666],{"type":998,"value":2667},"Automatically removes duplicates",{"type":993,"tag":1325,"props":2669,"children":2670},{},[2671],{"type":998,"value":2672},"More efficient than multiple add() calls",{"type":993,"tag":1001,"props":2674,"children":2675},{},[2676],{"type":993,"tag":1315,"props":2677,"children":2678},{},[2679],{"type":998,"value":2680},"Common Sources:",{"type":993,"tag":1321,"props":2682,"children":2683},{},[2684,2695,2706,2717],{"type":993,"tag":1325,"props":2685,"children":2686},{},[2687,2689],{"type":998,"value":2688},"Lists: ",{"type":993,"tag":1007,"props":2690,"children":2692},{"className":2691},[],[2693],{"type":998,"value":2694},"set.update([1, 2, 3])",{"type":993,"tag":1325,"props":2696,"children":2697},{},[2698,2700],{"type":998,"value":2699},"Tuples: ",{"type":993,"tag":1007,"props":2701,"children":2703},{"className":2702},[],[2704],{"type":998,"value":2705},"set.update((4, 5, 6))",{"type":993,"tag":1325,"props":2707,"children":2708},{},[2709,2711],{"type":998,"value":2710},"Strings: ",{"type":993,"tag":1007,"props":2712,"children":2714},{"className":2713},[],[2715],{"type":998,"value":2716},"set.update(\"hello\")",{"type":993,"tag":1325,"props":2718,"children":2719},{},[2720,2722],{"type":998,"value":2721},"Other sets: ",{"type":993,"tag":1007,"props":2723,"children":2725},{"className":2724},[],[2726],{"type":998,"value":2727},"set.update(other_set)",{"type":993,"tag":1001,"props":2729,"children":2730},{},[2731],{"type":993,"tag":1315,"props":2732,"children":2733},{},[2734],{"type":998,"value":2735},"Performance Benefits:",{"type":993,"tag":1321,"props":2737,"children":2738},{},[2739,2744,2749],{"type":993,"tag":1325,"props":2740,"children":2741},{},[2742],{"type":998,"value":2743},"Single operation for multiple additions",{"type":993,"tag":1325,"props":2745,"children":2746},{},[2747],{"type":998,"value":2748},"Optimized for batch operations",{"type":993,"tag":1325,"props":2750,"children":2751},{},[2752],{"type":998,"value":2753},"Reduces function call overhead",{"type":993,"tag":1403,"props":2755,"children":2757},{"id":2756},"adding-from-lists-and-tuples",[2758],{"type":998,"value":2759},"Adding from Lists and Tuples",{"type":993,"tag":1001,"props":2761,"children":2762},{},[2763],{"type":998,"value":2764},"Adding multiple elements from sequence data.",{"type":993,"tag":1029,"props":2766,"children":2767},{},[2768],{"type":993,"tag":1033,"props":2769,"children":2771},{"className":1035,"code":2770,"language":6,"meta":8,"style":8},"# Adding from lists and tuples\nbase_set = {1, 2, 3}\nprint(f\"Base set: {base_set}\")\n\n# Add from a list\nnew_numbers = [4, 5, 6, 7]\nbase_set.update(new_numbers)\nprint(f\"After adding list: {base_set}\")\n\n# Add from a tuple\nmore_numbers = (8, 9, 10)\nbase_set.update(more_numbers)\nprint(f\"After adding tuple: {base_set}\")\n\n# Add from multiple sources at once\nbase_set.update([11, 12], (13, 14))\nprint(f\"After adding multiple sources: {base_set}\")\n",[2772],{"type":993,"tag":1007,"props":2773,"children":2774},{"__ignoreMap":8},[2775,2783,2823,2864,2871,2879,2930,2938,2978,2985,2993,3037,3045,3085,3092,3100,3145],{"type":993,"tag":1042,"props":2776,"children":2777},{"class":1044,"line":12},[2778],{"type":993,"tag":1042,"props":2779,"children":2780},{"style":1048},[2781],{"type":998,"value":2782},"# Adding from lists and tuples\n",{"type":993,"tag":1042,"props":2784,"children":2785},{"class":1044,"line":27},[2786,2791,2795,2799,2803,2807,2811,2815,2819],{"type":993,"tag":1042,"props":2787,"children":2788},{"style":1057},[2789],{"type":998,"value":2790},"base_set ",{"type":993,"tag":1042,"props":2792,"children":2793},{"style":1063},[2794],{"type":998,"value":1066},{"type":993,"tag":1042,"props":2796,"children":2797},{"style":1057},[2798],{"type":998,"value":1071},{"type":993,"tag":1042,"props":2800,"children":2801},{"style":1098},[2802],{"type":998,"value":1781},{"type":993,"tag":1042,"props":2804,"children":2805},{"style":1057},[2806],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2808,"children":2809},{"style":1098},[2810],{"type":998,"value":1790},{"type":993,"tag":1042,"props":2812,"children":2813},{"style":1057},[2814],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2816,"children":2817},{"style":1098},[2818],{"type":998,"value":1799},{"type":993,"tag":1042,"props":2820,"children":2821},{"style":1057},[2822],{"type":998,"value":1092},{"type":993,"tag":1042,"props":2824,"children":2825},{"class":1044,"line":36},[2826,2830,2834,2838,2843,2847,2852,2856,2860],{"type":993,"tag":1042,"props":2827,"children":2828},{"style":1098},[2829],{"type":998,"value":1101},{"type":993,"tag":1042,"props":2831,"children":2832},{"style":1057},[2833],{"type":998,"value":1106},{"type":993,"tag":1042,"props":2835,"children":2836},{"style":1063},[2837],{"type":998,"value":1111},{"type":993,"tag":1042,"props":2839,"children":2840},{"style":1074},[2841],{"type":998,"value":2842},"\"Base set: ",{"type":993,"tag":1042,"props":2844,"children":2845},{"style":1098},[2846],{"type":998,"value":1121},{"type":993,"tag":1042,"props":2848,"children":2849},{"style":1057},[2850],{"type":998,"value":2851},"base_set",{"type":993,"tag":1042,"props":2853,"children":2854},{"style":1098},[2855],{"type":998,"value":1131},{"type":993,"tag":1042,"props":2857,"children":2858},{"style":1074},[2859],{"type":998,"value":1136},{"type":993,"tag":1042,"props":2861,"children":2862},{"style":1057},[2863],{"type":998,"value":1141},{"type":993,"tag":1042,"props":2865,"children":2866},{"class":1044,"line":45},[2867],{"type":993,"tag":1042,"props":2868,"children":2869},{"emptyLinePlaceholder":13},[2870],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2872,"children":2873},{"class":1044,"line":54},[2874],{"type":993,"tag":1042,"props":2875,"children":2876},{"style":1048},[2877],{"type":998,"value":2878},"# Add from a list\n",{"type":993,"tag":1042,"props":2880,"children":2881},{"class":1044,"line":63},[2882,2887,2891,2895,2899,2903,2908,2912,2917,2921,2926],{"type":993,"tag":1042,"props":2883,"children":2884},{"style":1057},[2885],{"type":998,"value":2886},"new_numbers ",{"type":993,"tag":1042,"props":2888,"children":2889},{"style":1063},[2890],{"type":998,"value":1066},{"type":993,"tag":1042,"props":2892,"children":2893},{"style":1057},[2894],{"type":998,"value":2039},{"type":993,"tag":1042,"props":2896,"children":2897},{"style":1098},[2898],{"type":998,"value":1942},{"type":993,"tag":1042,"props":2900,"children":2901},{"style":1057},[2902],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2904,"children":2905},{"style":1098},[2906],{"type":998,"value":2907},"5",{"type":993,"tag":1042,"props":2909,"children":2910},{"style":1057},[2911],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2913,"children":2914},{"style":1098},[2915],{"type":998,"value":2916},"6",{"type":993,"tag":1042,"props":2918,"children":2919},{"style":1057},[2920],{"type":998,"value":1082},{"type":993,"tag":1042,"props":2922,"children":2923},{"style":1098},[2924],{"type":998,"value":2925},"7",{"type":993,"tag":1042,"props":2927,"children":2928},{"style":1057},[2929],{"type":998,"value":2092},{"type":993,"tag":1042,"props":2931,"children":2932},{"class":1044,"line":72},[2933],{"type":993,"tag":1042,"props":2934,"children":2935},{"style":1057},[2936],{"type":998,"value":2937},"base_set.update(new_numbers)\n",{"type":993,"tag":1042,"props":2939,"children":2940},{"class":1044,"line":81},[2941,2945,2949,2953,2958,2962,2966,2970,2974],{"type":993,"tag":1042,"props":2942,"children":2943},{"style":1098},[2944],{"type":998,"value":1101},{"type":993,"tag":1042,"props":2946,"children":2947},{"style":1057},[2948],{"type":998,"value":1106},{"type":993,"tag":1042,"props":2950,"children":2951},{"style":1063},[2952],{"type":998,"value":1111},{"type":993,"tag":1042,"props":2954,"children":2955},{"style":1074},[2956],{"type":998,"value":2957},"\"After adding list: ",{"type":993,"tag":1042,"props":2959,"children":2960},{"style":1098},[2961],{"type":998,"value":1121},{"type":993,"tag":1042,"props":2963,"children":2964},{"style":1057},[2965],{"type":998,"value":2851},{"type":993,"tag":1042,"props":2967,"children":2968},{"style":1098},[2969],{"type":998,"value":1131},{"type":993,"tag":1042,"props":2971,"children":2972},{"style":1074},[2973],{"type":998,"value":1136},{"type":993,"tag":1042,"props":2975,"children":2976},{"style":1057},[2977],{"type":998,"value":1141},{"type":993,"tag":1042,"props":2979,"children":2980},{"class":1044,"line":91},[2981],{"type":993,"tag":1042,"props":2982,"children":2983},{"emptyLinePlaceholder":13},[2984],{"type":998,"value":1149},{"type":993,"tag":1042,"props":2986,"children":2987},{"class":1044,"line":100},[2988],{"type":993,"tag":1042,"props":2989,"children":2990},{"style":1048},[2991],{"type":998,"value":2992},"# Add from a tuple\n",{"type":993,"tag":1042,"props":2994,"children":2995},{"class":1044,"line":109},[2996,3001,3005,3010,3015,3019,3024,3028,3033],{"type":993,"tag":1042,"props":2997,"children":2998},{"style":1057},[2999],{"type":998,"value":3000},"more_numbers ",{"type":993,"tag":1042,"props":3002,"children":3003},{"style":1063},[3004],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3006,"children":3007},{"style":1057},[3008],{"type":998,"value":3009}," (",{"type":993,"tag":1042,"props":3011,"children":3012},{"style":1098},[3013],{"type":998,"value":3014},"8",{"type":993,"tag":1042,"props":3016,"children":3017},{"style":1057},[3018],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3020,"children":3021},{"style":1098},[3022],{"type":998,"value":3023},"9",{"type":993,"tag":1042,"props":3025,"children":3026},{"style":1057},[3027],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3029,"children":3030},{"style":1098},[3031],{"type":998,"value":3032},"10",{"type":993,"tag":1042,"props":3034,"children":3035},{"style":1057},[3036],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3038,"children":3039},{"class":1044,"line":118},[3040],{"type":993,"tag":1042,"props":3041,"children":3042},{"style":1057},[3043],{"type":998,"value":3044},"base_set.update(more_numbers)\n",{"type":993,"tag":1042,"props":3046,"children":3047},{"class":1044,"line":127},[3048,3052,3056,3060,3065,3069,3073,3077,3081],{"type":993,"tag":1042,"props":3049,"children":3050},{"style":1098},[3051],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3053,"children":3054},{"style":1057},[3055],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3057,"children":3058},{"style":1063},[3059],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3061,"children":3062},{"style":1074},[3063],{"type":998,"value":3064},"\"After adding tuple: ",{"type":993,"tag":1042,"props":3066,"children":3067},{"style":1098},[3068],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3070,"children":3071},{"style":1057},[3072],{"type":998,"value":2851},{"type":993,"tag":1042,"props":3074,"children":3075},{"style":1098},[3076],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3078,"children":3079},{"style":1074},[3080],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3082,"children":3083},{"style":1057},[3084],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3086,"children":3087},{"class":1044,"line":136},[3088],{"type":993,"tag":1042,"props":3089,"children":3090},{"emptyLinePlaceholder":13},[3091],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3093,"children":3094},{"class":1044,"line":146},[3095],{"type":993,"tag":1042,"props":3096,"children":3097},{"style":1048},[3098],{"type":998,"value":3099},"# Add from multiple sources at once\n",{"type":993,"tag":1042,"props":3101,"children":3102},{"class":1044,"line":155},[3103,3108,3113,3117,3122,3127,3132,3136,3141],{"type":993,"tag":1042,"props":3104,"children":3105},{"style":1057},[3106],{"type":998,"value":3107},"base_set.update([",{"type":993,"tag":1042,"props":3109,"children":3110},{"style":1098},[3111],{"type":998,"value":3112},"11",{"type":993,"tag":1042,"props":3114,"children":3115},{"style":1057},[3116],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3118,"children":3119},{"style":1098},[3120],{"type":998,"value":3121},"12",{"type":993,"tag":1042,"props":3123,"children":3124},{"style":1057},[3125],{"type":998,"value":3126},"], (",{"type":993,"tag":1042,"props":3128,"children":3129},{"style":1098},[3130],{"type":998,"value":3131},"13",{"type":993,"tag":1042,"props":3133,"children":3134},{"style":1057},[3135],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3137,"children":3138},{"style":1098},[3139],{"type":998,"value":3140},"14",{"type":993,"tag":1042,"props":3142,"children":3143},{"style":1057},[3144],{"type":998,"value":2281},{"type":993,"tag":1042,"props":3146,"children":3147},{"class":1044,"line":164},[3148,3152,3156,3160,3165,3169,3173,3177,3181],{"type":993,"tag":1042,"props":3149,"children":3150},{"style":1098},[3151],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3153,"children":3154},{"style":1057},[3155],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3157,"children":3158},{"style":1063},[3159],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3161,"children":3162},{"style":1074},[3163],{"type":998,"value":3164},"\"After adding multiple sources: ",{"type":993,"tag":1042,"props":3166,"children":3167},{"style":1098},[3168],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3170,"children":3171},{"style":1057},[3172],{"type":998,"value":2851},{"type":993,"tag":1042,"props":3174,"children":3175},{"style":1098},[3176],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3178,"children":3179},{"style":1074},[3180],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3182,"children":3183},{"style":1057},[3184],{"type":998,"value":1141},{"type":993,"tag":1403,"props":3186,"children":3188},{"id":3187},"adding-from-strings",[3189],{"type":998,"value":3190},"Adding from Strings",{"type":993,"tag":1001,"props":3192,"children":3193},{},[3194],{"type":998,"value":3195},"Adding individual characters from strings.",{"type":993,"tag":1029,"props":3197,"children":3198},{},[3199],{"type":993,"tag":1033,"props":3200,"children":3202},{"className":1035,"code":3201,"language":6,"meta":8,"style":8},"# Adding characters from strings\nletters = set()\nprint(f\"Empty letter set: {letters}\")\n\n# Add all letters from a word\nletters.update(\"hello\")\nprint(f\"After 'hello': {letters}\")\n\n# Add letters from another word\nletters.update(\"world\")\nprint(f\"After 'world': {letters}\")\n\n# Practical example: find unique letters in text\ntext = \"python programming\"\nunique_chars = set()\nunique_chars.update(text)\n\nprint(f\"Unique characters in '{text}': {unique_chars}\")\nprint(f\"Number of unique characters: {len(unique_chars)}\")\n",[3203],{"type":993,"tag":1007,"props":3204,"children":3205},{"__ignoreMap":8},[3206,3214,3234,3275,3282,3290,3306,3346,3353,3361,3377,3417,3424,3432,3449,3469,3477,3484,3542],{"type":993,"tag":1042,"props":3207,"children":3208},{"class":1044,"line":12},[3209],{"type":993,"tag":1042,"props":3210,"children":3211},{"style":1048},[3212],{"type":998,"value":3213},"# Adding characters from strings\n",{"type":993,"tag":1042,"props":3215,"children":3216},{"class":1044,"line":27},[3217,3222,3226,3230],{"type":993,"tag":1042,"props":3218,"children":3219},{"style":1057},[3220],{"type":998,"value":3221},"letters ",{"type":993,"tag":1042,"props":3223,"children":3224},{"style":1063},[3225],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3227,"children":3228},{"style":1098},[3229],{"type":998,"value":1448},{"type":993,"tag":1042,"props":3231,"children":3232},{"style":1057},[3233],{"type":998,"value":2022},{"type":993,"tag":1042,"props":3235,"children":3236},{"class":1044,"line":36},[3237,3241,3245,3249,3254,3258,3263,3267,3271],{"type":993,"tag":1042,"props":3238,"children":3239},{"style":1098},[3240],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3242,"children":3243},{"style":1057},[3244],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3246,"children":3247},{"style":1063},[3248],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3250,"children":3251},{"style":1074},[3252],{"type":998,"value":3253},"\"Empty letter set: ",{"type":993,"tag":1042,"props":3255,"children":3256},{"style":1098},[3257],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3259,"children":3260},{"style":1057},[3261],{"type":998,"value":3262},"letters",{"type":993,"tag":1042,"props":3264,"children":3265},{"style":1098},[3266],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3268,"children":3269},{"style":1074},[3270],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3272,"children":3273},{"style":1057},[3274],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3276,"children":3277},{"class":1044,"line":45},[3278],{"type":993,"tag":1042,"props":3279,"children":3280},{"emptyLinePlaceholder":13},[3281],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3283,"children":3284},{"class":1044,"line":54},[3285],{"type":993,"tag":1042,"props":3286,"children":3287},{"style":1048},[3288],{"type":998,"value":3289},"# Add all letters from a word\n",{"type":993,"tag":1042,"props":3291,"children":3292},{"class":1044,"line":63},[3293,3298,3302],{"type":993,"tag":1042,"props":3294,"children":3295},{"style":1057},[3296],{"type":998,"value":3297},"letters.update(",{"type":993,"tag":1042,"props":3299,"children":3300},{"style":1074},[3301],{"type":998,"value":1646},{"type":993,"tag":1042,"props":3303,"children":3304},{"style":1057},[3305],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3307,"children":3308},{"class":1044,"line":72},[3309,3313,3317,3321,3326,3330,3334,3338,3342],{"type":993,"tag":1042,"props":3310,"children":3311},{"style":1098},[3312],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3314,"children":3315},{"style":1057},[3316],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3318,"children":3319},{"style":1063},[3320],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3322,"children":3323},{"style":1074},[3324],{"type":998,"value":3325},"\"After 'hello': ",{"type":993,"tag":1042,"props":3327,"children":3328},{"style":1098},[3329],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3331,"children":3332},{"style":1057},[3333],{"type":998,"value":3262},{"type":993,"tag":1042,"props":3335,"children":3336},{"style":1098},[3337],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3339,"children":3340},{"style":1074},[3341],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3343,"children":3344},{"style":1057},[3345],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3347,"children":3348},{"class":1044,"line":81},[3349],{"type":993,"tag":1042,"props":3350,"children":3351},{"emptyLinePlaceholder":13},[3352],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3354,"children":3355},{"class":1044,"line":91},[3356],{"type":993,"tag":1042,"props":3357,"children":3358},{"style":1048},[3359],{"type":998,"value":3360},"# Add letters from another word\n",{"type":993,"tag":1042,"props":3362,"children":3363},{"class":1044,"line":100},[3364,3368,3373],{"type":993,"tag":1042,"props":3365,"children":3366},{"style":1057},[3367],{"type":998,"value":3297},{"type":993,"tag":1042,"props":3369,"children":3370},{"style":1074},[3371],{"type":998,"value":3372},"\"world\"",{"type":993,"tag":1042,"props":3374,"children":3375},{"style":1057},[3376],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3378,"children":3379},{"class":1044,"line":109},[3380,3384,3388,3392,3397,3401,3405,3409,3413],{"type":993,"tag":1042,"props":3381,"children":3382},{"style":1098},[3383],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3385,"children":3386},{"style":1057},[3387],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3389,"children":3390},{"style":1063},[3391],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3393,"children":3394},{"style":1074},[3395],{"type":998,"value":3396},"\"After 'world': ",{"type":993,"tag":1042,"props":3398,"children":3399},{"style":1098},[3400],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3402,"children":3403},{"style":1057},[3404],{"type":998,"value":3262},{"type":993,"tag":1042,"props":3406,"children":3407},{"style":1098},[3408],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3410,"children":3411},{"style":1074},[3412],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3414,"children":3415},{"style":1057},[3416],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3418,"children":3419},{"class":1044,"line":118},[3420],{"type":993,"tag":1042,"props":3421,"children":3422},{"emptyLinePlaceholder":13},[3423],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3425,"children":3426},{"class":1044,"line":127},[3427],{"type":993,"tag":1042,"props":3428,"children":3429},{"style":1048},[3430],{"type":998,"value":3431},"# Practical example: find unique letters in text\n",{"type":993,"tag":1042,"props":3433,"children":3434},{"class":1044,"line":136},[3435,3440,3444],{"type":993,"tag":1042,"props":3436,"children":3437},{"style":1057},[3438],{"type":998,"value":3439},"text ",{"type":993,"tag":1042,"props":3441,"children":3442},{"style":1063},[3443],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3445,"children":3446},{"style":1074},[3447],{"type":998,"value":3448}," \"python programming\"\n",{"type":993,"tag":1042,"props":3450,"children":3451},{"class":1044,"line":146},[3452,3457,3461,3465],{"type":993,"tag":1042,"props":3453,"children":3454},{"style":1057},[3455],{"type":998,"value":3456},"unique_chars ",{"type":993,"tag":1042,"props":3458,"children":3459},{"style":1063},[3460],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3462,"children":3463},{"style":1098},[3464],{"type":998,"value":1448},{"type":993,"tag":1042,"props":3466,"children":3467},{"style":1057},[3468],{"type":998,"value":2022},{"type":993,"tag":1042,"props":3470,"children":3471},{"class":1044,"line":155},[3472],{"type":993,"tag":1042,"props":3473,"children":3474},{"style":1057},[3475],{"type":998,"value":3476},"unique_chars.update(text)\n",{"type":993,"tag":1042,"props":3478,"children":3479},{"class":1044,"line":164},[3480],{"type":993,"tag":1042,"props":3481,"children":3482},{"emptyLinePlaceholder":13},[3483],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3485,"children":3486},{"class":1044,"line":173},[3487,3491,3495,3499,3504,3508,3512,3516,3521,3525,3530,3534,3538],{"type":993,"tag":1042,"props":3488,"children":3489},{"style":1098},[3490],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3492,"children":3493},{"style":1057},[3494],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3496,"children":3497},{"style":1063},[3498],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3500,"children":3501},{"style":1074},[3502],{"type":998,"value":3503},"\"Unique characters in '",{"type":993,"tag":1042,"props":3505,"children":3506},{"style":1098},[3507],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3509,"children":3510},{"style":1057},[3511],{"type":998,"value":998},{"type":993,"tag":1042,"props":3513,"children":3514},{"style":1098},[3515],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3517,"children":3518},{"style":1074},[3519],{"type":998,"value":3520},"': ",{"type":993,"tag":1042,"props":3522,"children":3523},{"style":1098},[3524],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3526,"children":3527},{"style":1057},[3528],{"type":998,"value":3529},"unique_chars",{"type":993,"tag":1042,"props":3531,"children":3532},{"style":1098},[3533],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3535,"children":3536},{"style":1074},[3537],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3539,"children":3540},{"style":1057},[3541],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3543,"children":3544},{"class":1044,"line":182},[3545,3549,3553,3557,3562,3566,3571,3575,3579],{"type":993,"tag":1042,"props":3546,"children":3547},{"style":1098},[3548],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3550,"children":3551},{"style":1057},[3552],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3554,"children":3555},{"style":1063},[3556],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3558,"children":3559},{"style":1074},[3560],{"type":998,"value":3561},"\"Number of unique characters: ",{"type":993,"tag":1042,"props":3563,"children":3564},{"style":1098},[3565],{"type":998,"value":2174},{"type":993,"tag":1042,"props":3567,"children":3568},{"style":1057},[3569],{"type":998,"value":3570},"(unique_chars)",{"type":993,"tag":1042,"props":3572,"children":3573},{"style":1098},[3574],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3576,"children":3577},{"style":1074},[3578],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3580,"children":3581},{"style":1057},[3582],{"type":998,"value":1141},{"type":993,"tag":1403,"props":3584,"children":3586},{"id":3585},"adding-from-other-sets",[3587],{"type":998,"value":3588},"Adding from Other Sets",{"type":993,"tag":1001,"props":3590,"children":3591},{},[3592],{"type":998,"value":3593},"Combining sets by adding all elements from another set.",{"type":993,"tag":1029,"props":3595,"children":3596},{},[3597],{"type":993,"tag":1033,"props":3598,"children":3600},{"className":1035,"code":3599,"language":6,"meta":8,"style":8},"# Adding from other sets\nprimary_colors = {\"red\", \"green\", \"blue\"}\nsecondary_colors = {\"orange\", \"purple\", \"yellow\"}\n\n# Create a copy and add secondary colors\nall_colors = primary_colors.copy()\nall_colors.update(secondary_colors)\n\nprint(f\"Primary: {primary_colors}\")\nprint(f\"Secondary: {secondary_colors}\")\nprint(f\"All colors: {all_colors}\")\n\n# Add overlapping sets\nset1 = {1, 2, 3, 4}\nset2 = {3, 4, 5, 6}\nset1.update(set2)\n\nprint(f\"Combined set: {set1}\")\n",[3601],{"type":993,"tag":1007,"props":3602,"children":3603},{"__ignoreMap":8},[3604,3612,3652,3694,3701,3709,3726,3734,3741,3782,3823,3864,3871,3879,3927,3975,3983,3990],{"type":993,"tag":1042,"props":3605,"children":3606},{"class":1044,"line":12},[3607],{"type":993,"tag":1042,"props":3608,"children":3609},{"style":1048},[3610],{"type":998,"value":3611},"# Adding from other sets\n",{"type":993,"tag":1042,"props":3613,"children":3614},{"class":1044,"line":27},[3615,3620,3624,3628,3632,3636,3640,3644,3648],{"type":993,"tag":1042,"props":3616,"children":3617},{"style":1057},[3618],{"type":998,"value":3619},"primary_colors ",{"type":993,"tag":1042,"props":3621,"children":3622},{"style":1063},[3623],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3625,"children":3626},{"style":1057},[3627],{"type":998,"value":1071},{"type":993,"tag":1042,"props":3629,"children":3630},{"style":1074},[3631],{"type":998,"value":1527},{"type":993,"tag":1042,"props":3633,"children":3634},{"style":1057},[3635],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3637,"children":3638},{"style":1074},[3639],{"type":998,"value":1543},{"type":993,"tag":1042,"props":3641,"children":3642},{"style":1057},[3643],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3645,"children":3646},{"style":1074},[3647],{"type":998,"value":1559},{"type":993,"tag":1042,"props":3649,"children":3650},{"style":1057},[3651],{"type":998,"value":1092},{"type":993,"tag":1042,"props":3653,"children":3654},{"class":1044,"line":36},[3655,3660,3664,3668,3672,3676,3681,3685,3690],{"type":993,"tag":1042,"props":3656,"children":3657},{"style":1057},[3658],{"type":998,"value":3659},"secondary_colors ",{"type":993,"tag":1042,"props":3661,"children":3662},{"style":1063},[3663],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3665,"children":3666},{"style":1057},[3667],{"type":998,"value":1071},{"type":993,"tag":1042,"props":3669,"children":3670},{"style":1074},[3671],{"type":998,"value":1170},{"type":993,"tag":1042,"props":3673,"children":3674},{"style":1057},[3675],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3677,"children":3678},{"style":1074},[3679],{"type":998,"value":3680},"\"purple\"",{"type":993,"tag":1042,"props":3682,"children":3683},{"style":1057},[3684],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3686,"children":3687},{"style":1074},[3688],{"type":998,"value":3689},"\"yellow\"",{"type":993,"tag":1042,"props":3691,"children":3692},{"style":1057},[3693],{"type":998,"value":1092},{"type":993,"tag":1042,"props":3695,"children":3696},{"class":1044,"line":45},[3697],{"type":993,"tag":1042,"props":3698,"children":3699},{"emptyLinePlaceholder":13},[3700],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3702,"children":3703},{"class":1044,"line":54},[3704],{"type":993,"tag":1042,"props":3705,"children":3706},{"style":1048},[3707],{"type":998,"value":3708},"# Create a copy and add secondary colors\n",{"type":993,"tag":1042,"props":3710,"children":3711},{"class":1044,"line":63},[3712,3717,3721],{"type":993,"tag":1042,"props":3713,"children":3714},{"style":1057},[3715],{"type":998,"value":3716},"all_colors ",{"type":993,"tag":1042,"props":3718,"children":3719},{"style":1063},[3720],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3722,"children":3723},{"style":1057},[3724],{"type":998,"value":3725}," primary_colors.copy()\n",{"type":993,"tag":1042,"props":3727,"children":3728},{"class":1044,"line":72},[3729],{"type":993,"tag":1042,"props":3730,"children":3731},{"style":1057},[3732],{"type":998,"value":3733},"all_colors.update(secondary_colors)\n",{"type":993,"tag":1042,"props":3735,"children":3736},{"class":1044,"line":81},[3737],{"type":993,"tag":1042,"props":3738,"children":3739},{"emptyLinePlaceholder":13},[3740],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3742,"children":3743},{"class":1044,"line":91},[3744,3748,3752,3756,3761,3765,3770,3774,3778],{"type":993,"tag":1042,"props":3745,"children":3746},{"style":1098},[3747],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3749,"children":3750},{"style":1057},[3751],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3753,"children":3754},{"style":1063},[3755],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3757,"children":3758},{"style":1074},[3759],{"type":998,"value":3760},"\"Primary: ",{"type":993,"tag":1042,"props":3762,"children":3763},{"style":1098},[3764],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3766,"children":3767},{"style":1057},[3768],{"type":998,"value":3769},"primary_colors",{"type":993,"tag":1042,"props":3771,"children":3772},{"style":1098},[3773],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3775,"children":3776},{"style":1074},[3777],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3779,"children":3780},{"style":1057},[3781],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3783,"children":3784},{"class":1044,"line":100},[3785,3789,3793,3797,3802,3806,3811,3815,3819],{"type":993,"tag":1042,"props":3786,"children":3787},{"style":1098},[3788],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3790,"children":3791},{"style":1057},[3792],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3794,"children":3795},{"style":1063},[3796],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3798,"children":3799},{"style":1074},[3800],{"type":998,"value":3801},"\"Secondary: ",{"type":993,"tag":1042,"props":3803,"children":3804},{"style":1098},[3805],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3807,"children":3808},{"style":1057},[3809],{"type":998,"value":3810},"secondary_colors",{"type":993,"tag":1042,"props":3812,"children":3813},{"style":1098},[3814],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3816,"children":3817},{"style":1074},[3818],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3820,"children":3821},{"style":1057},[3822],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3824,"children":3825},{"class":1044,"line":109},[3826,3830,3834,3838,3843,3847,3852,3856,3860],{"type":993,"tag":1042,"props":3827,"children":3828},{"style":1098},[3829],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3831,"children":3832},{"style":1057},[3833],{"type":998,"value":1106},{"type":993,"tag":1042,"props":3835,"children":3836},{"style":1063},[3837],{"type":998,"value":1111},{"type":993,"tag":1042,"props":3839,"children":3840},{"style":1074},[3841],{"type":998,"value":3842},"\"All colors: ",{"type":993,"tag":1042,"props":3844,"children":3845},{"style":1098},[3846],{"type":998,"value":1121},{"type":993,"tag":1042,"props":3848,"children":3849},{"style":1057},[3850],{"type":998,"value":3851},"all_colors",{"type":993,"tag":1042,"props":3853,"children":3854},{"style":1098},[3855],{"type":998,"value":1131},{"type":993,"tag":1042,"props":3857,"children":3858},{"style":1074},[3859],{"type":998,"value":1136},{"type":993,"tag":1042,"props":3861,"children":3862},{"style":1057},[3863],{"type":998,"value":1141},{"type":993,"tag":1042,"props":3865,"children":3866},{"class":1044,"line":118},[3867],{"type":993,"tag":1042,"props":3868,"children":3869},{"emptyLinePlaceholder":13},[3870],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3872,"children":3873},{"class":1044,"line":127},[3874],{"type":993,"tag":1042,"props":3875,"children":3876},{"style":1048},[3877],{"type":998,"value":3878},"# Add overlapping sets\n",{"type":993,"tag":1042,"props":3880,"children":3881},{"class":1044,"line":136},[3882,3887,3891,3895,3899,3903,3907,3911,3915,3919,3923],{"type":993,"tag":1042,"props":3883,"children":3884},{"style":1057},[3885],{"type":998,"value":3886},"set1 ",{"type":993,"tag":1042,"props":3888,"children":3889},{"style":1063},[3890],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3892,"children":3893},{"style":1057},[3894],{"type":998,"value":1071},{"type":993,"tag":1042,"props":3896,"children":3897},{"style":1098},[3898],{"type":998,"value":1781},{"type":993,"tag":1042,"props":3900,"children":3901},{"style":1057},[3902],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3904,"children":3905},{"style":1098},[3906],{"type":998,"value":1790},{"type":993,"tag":1042,"props":3908,"children":3909},{"style":1057},[3910],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3912,"children":3913},{"style":1098},[3914],{"type":998,"value":1799},{"type":993,"tag":1042,"props":3916,"children":3917},{"style":1057},[3918],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3920,"children":3921},{"style":1098},[3922],{"type":998,"value":1942},{"type":993,"tag":1042,"props":3924,"children":3925},{"style":1057},[3926],{"type":998,"value":1092},{"type":993,"tag":1042,"props":3928,"children":3929},{"class":1044,"line":146},[3930,3935,3939,3943,3947,3951,3955,3959,3963,3967,3971],{"type":993,"tag":1042,"props":3931,"children":3932},{"style":1057},[3933],{"type":998,"value":3934},"set2 ",{"type":993,"tag":1042,"props":3936,"children":3937},{"style":1063},[3938],{"type":998,"value":1066},{"type":993,"tag":1042,"props":3940,"children":3941},{"style":1057},[3942],{"type":998,"value":1071},{"type":993,"tag":1042,"props":3944,"children":3945},{"style":1098},[3946],{"type":998,"value":1799},{"type":993,"tag":1042,"props":3948,"children":3949},{"style":1057},[3950],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3952,"children":3953},{"style":1098},[3954],{"type":998,"value":1942},{"type":993,"tag":1042,"props":3956,"children":3957},{"style":1057},[3958],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3960,"children":3961},{"style":1098},[3962],{"type":998,"value":2907},{"type":993,"tag":1042,"props":3964,"children":3965},{"style":1057},[3966],{"type":998,"value":1082},{"type":993,"tag":1042,"props":3968,"children":3969},{"style":1098},[3970],{"type":998,"value":2916},{"type":993,"tag":1042,"props":3972,"children":3973},{"style":1057},[3974],{"type":998,"value":1092},{"type":993,"tag":1042,"props":3976,"children":3977},{"class":1044,"line":155},[3978],{"type":993,"tag":1042,"props":3979,"children":3980},{"style":1057},[3981],{"type":998,"value":3982},"set1.update(set2)\n",{"type":993,"tag":1042,"props":3984,"children":3985},{"class":1044,"line":164},[3986],{"type":993,"tag":1042,"props":3987,"children":3988},{"emptyLinePlaceholder":13},[3989],{"type":998,"value":1149},{"type":993,"tag":1042,"props":3991,"children":3992},{"class":1044,"line":173},[3993,3997,4001,4005,4010,4014,4019,4023,4027],{"type":993,"tag":1042,"props":3994,"children":3995},{"style":1098},[3996],{"type":998,"value":1101},{"type":993,"tag":1042,"props":3998,"children":3999},{"style":1057},[4000],{"type":998,"value":1106},{"type":993,"tag":1042,"props":4002,"children":4003},{"style":1063},[4004],{"type":998,"value":1111},{"type":993,"tag":1042,"props":4006,"children":4007},{"style":1074},[4008],{"type":998,"value":4009},"\"Combined set: ",{"type":993,"tag":1042,"props":4011,"children":4012},{"style":1098},[4013],{"type":998,"value":1121},{"type":993,"tag":1042,"props":4015,"children":4016},{"style":1057},[4017],{"type":998,"value":4018},"set1",{"type":993,"tag":1042,"props":4020,"children":4021},{"style":1098},[4022],{"type":998,"value":1131},{"type":993,"tag":1042,"props":4024,"children":4025},{"style":1074},[4026],{"type":998,"value":1136},{"type":993,"tag":1042,"props":4028,"children":4029},{"style":1057},[4030],{"type":998,"value":1141},{"type":993,"tag":4032,"props":4033,"children":4035},"content-exercise",{":widget-view":4034,"category":6,"id":474},"true",[],{"type":993,"tag":1286,"props":4037,"children":4039},{"id":4038},"union-operations-for-adding",[4040],{"type":998,"value":4041},"🚀 Union Operations for Adding",{"type":993,"tag":1001,"props":4043,"children":4044},{},[4045],{"type":998,"value":4046},"Union operations create new sets by combining existing sets without modifying the originals.",{"type":993,"tag":1305,"props":4048,"children":4051},{"emoji":4049,"title":4050,"type":1309},"🔗","Union Operations",[4052,4060,4078,4086,4104,4112],{"type":993,"tag":1001,"props":4053,"children":4054},{},[4055],{"type":993,"tag":1315,"props":4056,"children":4057},{},[4058],{"type":998,"value":4059},"Union Operator (|):",{"type":993,"tag":1321,"props":4061,"children":4062},{},[4063,4068,4073],{"type":993,"tag":1325,"props":4064,"children":4065},{},[4066],{"type":998,"value":4067},"Creates new set with all elements",{"type":993,"tag":1325,"props":4069,"children":4070},{},[4071],{"type":998,"value":4072},"Doesn't modify original sets",{"type":993,"tag":1325,"props":4074,"children":4075},{},[4076],{"type":998,"value":4077},"Supports chaining multiple sets",{"type":993,"tag":1001,"props":4079,"children":4080},{},[4081],{"type":993,"tag":1315,"props":4082,"children":4083},{},[4084],{"type":998,"value":4085},"union() Method:",{"type":993,"tag":1321,"props":4087,"children":4088},{},[4089,4094,4099],{"type":993,"tag":1325,"props":4090,"children":4091},{},[4092],{"type":998,"value":4093},"More explicit syntax",{"type":993,"tag":1325,"props":4095,"children":4096},{},[4097],{"type":998,"value":4098},"Accepts multiple arguments",{"type":993,"tag":1325,"props":4100,"children":4101},{},[4102],{"type":998,"value":4103},"Works with any iterable",{"type":993,"tag":1001,"props":4105,"children":4106},{},[4107],{"type":993,"tag":1315,"props":4108,"children":4109},{},[4110],{"type":998,"value":4111},"Key Difference:",{"type":993,"tag":1321,"props":4113,"children":4114},{},[4115,4120],{"type":993,"tag":1325,"props":4116,"children":4117},{},[4118],{"type":998,"value":4119},"update() modifies existing set",{"type":993,"tag":1325,"props":4121,"children":4122},{},[4123],{"type":998,"value":4124},"union() creates new set",{"type":993,"tag":1403,"props":4126,"children":4128},{"id":4127},"using-union-operator",[4129],{"type":998,"value":4130},"Using Union Operator",{"type":993,"tag":1001,"props":4132,"children":4133},{},[4134],{"type":998,"value":4135},"The pipe operator provides concise syntax for combining sets.",{"type":993,"tag":1029,"props":4137,"children":4138},{},[4139],{"type":993,"tag":1033,"props":4140,"children":4142},{"className":1035,"code":4141,"language":6,"meta":8,"style":8},"# Union with | operator\nteam_a = {\"Alice\", \"Bob\", \"Carol\"}\nteam_b = {\"Bob\", \"David\", \"Eve\"}\n\n# Create combined team\nall_members = team_a | team_b\nprint(f\"Team A: {team_a}\")\nprint(f\"Team B: {team_b}\")\nprint(f\"All members: {all_members}\")\n\n# Chain multiple unions\nteam_c = {\"Frank\", \"Grace\"}\neveryone = team_a | team_b | team_c\nprint(f\"Everyone: {everyone}\")\n",[4143],{"type":993,"tag":1007,"props":4144,"children":4145},{"__ignoreMap":8},[4146,4154,4194,4236,4243,4251,4278,4319,4360,4401,4408,4416,4450,4484],{"type":993,"tag":1042,"props":4147,"children":4148},{"class":1044,"line":12},[4149],{"type":993,"tag":1042,"props":4150,"children":4151},{"style":1048},[4152],{"type":998,"value":4153},"# Union with | operator\n",{"type":993,"tag":1042,"props":4155,"children":4156},{"class":1044,"line":27},[4157,4162,4166,4170,4174,4178,4182,4186,4190],{"type":993,"tag":1042,"props":4158,"children":4159},{"style":1057},[4160],{"type":998,"value":4161},"team_a ",{"type":993,"tag":1042,"props":4163,"children":4164},{"style":1063},[4165],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4167,"children":4168},{"style":1057},[4169],{"type":998,"value":1071},{"type":993,"tag":1042,"props":4171,"children":4172},{"style":1074},[4173],{"type":998,"value":2423},{"type":993,"tag":1042,"props":4175,"children":4176},{"style":1057},[4177],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4179,"children":4180},{"style":1074},[4181],{"type":998,"value":2448},{"type":993,"tag":1042,"props":4183,"children":4184},{"style":1057},[4185],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4187,"children":4188},{"style":1074},[4189],{"type":998,"value":2473},{"type":993,"tag":1042,"props":4191,"children":4192},{"style":1057},[4193],{"type":998,"value":1092},{"type":993,"tag":1042,"props":4195,"children":4196},{"class":1044,"line":36},[4197,4202,4206,4210,4214,4218,4223,4227,4232],{"type":993,"tag":1042,"props":4198,"children":4199},{"style":1057},[4200],{"type":998,"value":4201},"team_b ",{"type":993,"tag":1042,"props":4203,"children":4204},{"style":1063},[4205],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4207,"children":4208},{"style":1057},[4209],{"type":998,"value":1071},{"type":993,"tag":1042,"props":4211,"children":4212},{"style":1074},[4213],{"type":998,"value":2448},{"type":993,"tag":1042,"props":4215,"children":4216},{"style":1057},[4217],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4219,"children":4220},{"style":1074},[4221],{"type":998,"value":4222},"\"David\"",{"type":993,"tag":1042,"props":4224,"children":4225},{"style":1057},[4226],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4228,"children":4229},{"style":1074},[4230],{"type":998,"value":4231},"\"Eve\"",{"type":993,"tag":1042,"props":4233,"children":4234},{"style":1057},[4235],{"type":998,"value":1092},{"type":993,"tag":1042,"props":4237,"children":4238},{"class":1044,"line":45},[4239],{"type":993,"tag":1042,"props":4240,"children":4241},{"emptyLinePlaceholder":13},[4242],{"type":998,"value":1149},{"type":993,"tag":1042,"props":4244,"children":4245},{"class":1044,"line":54},[4246],{"type":993,"tag":1042,"props":4247,"children":4248},{"style":1048},[4249],{"type":998,"value":4250},"# Create combined team\n",{"type":993,"tag":1042,"props":4252,"children":4253},{"class":1044,"line":63},[4254,4259,4263,4268,4273],{"type":993,"tag":1042,"props":4255,"children":4256},{"style":1057},[4257],{"type":998,"value":4258},"all_members ",{"type":993,"tag":1042,"props":4260,"children":4261},{"style":1063},[4262],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4264,"children":4265},{"style":1057},[4266],{"type":998,"value":4267}," team_a ",{"type":993,"tag":1042,"props":4269,"children":4270},{"style":1063},[4271],{"type":998,"value":4272},"|",{"type":993,"tag":1042,"props":4274,"children":4275},{"style":1057},[4276],{"type":998,"value":4277}," team_b\n",{"type":993,"tag":1042,"props":4279,"children":4280},{"class":1044,"line":72},[4281,4285,4289,4293,4298,4302,4307,4311,4315],{"type":993,"tag":1042,"props":4282,"children":4283},{"style":1098},[4284],{"type":998,"value":1101},{"type":993,"tag":1042,"props":4286,"children":4287},{"style":1057},[4288],{"type":998,"value":1106},{"type":993,"tag":1042,"props":4290,"children":4291},{"style":1063},[4292],{"type":998,"value":1111},{"type":993,"tag":1042,"props":4294,"children":4295},{"style":1074},[4296],{"type":998,"value":4297},"\"Team A: ",{"type":993,"tag":1042,"props":4299,"children":4300},{"style":1098},[4301],{"type":998,"value":1121},{"type":993,"tag":1042,"props":4303,"children":4304},{"style":1057},[4305],{"type":998,"value":4306},"team_a",{"type":993,"tag":1042,"props":4308,"children":4309},{"style":1098},[4310],{"type":998,"value":1131},{"type":993,"tag":1042,"props":4312,"children":4313},{"style":1074},[4314],{"type":998,"value":1136},{"type":993,"tag":1042,"props":4316,"children":4317},{"style":1057},[4318],{"type":998,"value":1141},{"type":993,"tag":1042,"props":4320,"children":4321},{"class":1044,"line":81},[4322,4326,4330,4334,4339,4343,4348,4352,4356],{"type":993,"tag":1042,"props":4323,"children":4324},{"style":1098},[4325],{"type":998,"value":1101},{"type":993,"tag":1042,"props":4327,"children":4328},{"style":1057},[4329],{"type":998,"value":1106},{"type":993,"tag":1042,"props":4331,"children":4332},{"style":1063},[4333],{"type":998,"value":1111},{"type":993,"tag":1042,"props":4335,"children":4336},{"style":1074},[4337],{"type":998,"value":4338},"\"Team B: ",{"type":993,"tag":1042,"props":4340,"children":4341},{"style":1098},[4342],{"type":998,"value":1121},{"type":993,"tag":1042,"props":4344,"children":4345},{"style":1057},[4346],{"type":998,"value":4347},"team_b",{"type":993,"tag":1042,"props":4349,"children":4350},{"style":1098},[4351],{"type":998,"value":1131},{"type":993,"tag":1042,"props":4353,"children":4354},{"style":1074},[4355],{"type":998,"value":1136},{"type":993,"tag":1042,"props":4357,"children":4358},{"style":1057},[4359],{"type":998,"value":1141},{"type":993,"tag":1042,"props":4361,"children":4362},{"class":1044,"line":91},[4363,4367,4371,4375,4380,4384,4389,4393,4397],{"type":993,"tag":1042,"props":4364,"children":4365},{"style":1098},[4366],{"type":998,"value":1101},{"type":993,"tag":1042,"props":4368,"children":4369},{"style":1057},[4370],{"type":998,"value":1106},{"type":993,"tag":1042,"props":4372,"children":4373},{"style":1063},[4374],{"type":998,"value":1111},{"type":993,"tag":1042,"props":4376,"children":4377},{"style":1074},[4378],{"type":998,"value":4379},"\"All members: ",{"type":993,"tag":1042,"props":4381,"children":4382},{"style":1098},[4383],{"type":998,"value":1121},{"type":993,"tag":1042,"props":4385,"children":4386},{"style":1057},[4387],{"type":998,"value":4388},"all_members",{"type":993,"tag":1042,"props":4390,"children":4391},{"style":1098},[4392],{"type":998,"value":1131},{"type":993,"tag":1042,"props":4394,"children":4395},{"style":1074},[4396],{"type":998,"value":1136},{"type":993,"tag":1042,"props":4398,"children":4399},{"style":1057},[4400],{"type":998,"value":1141},{"type":993,"tag":1042,"props":4402,"children":4403},{"class":1044,"line":100},[4404],{"type":993,"tag":1042,"props":4405,"children":4406},{"emptyLinePlaceholder":13},[4407],{"type":998,"value":1149},{"type":993,"tag":1042,"props":4409,"children":4410},{"class":1044,"line":109},[4411],{"type":993,"tag":1042,"props":4412,"children":4413},{"style":1048},[4414],{"type":998,"value":4415},"# Chain multiple unions\n",{"type":993,"tag":1042,"props":4417,"children":4418},{"class":1044,"line":118},[4419,4424,4428,4432,4437,4441,4446],{"type":993,"tag":1042,"props":4420,"children":4421},{"style":1057},[4422],{"type":998,"value":4423},"team_c ",{"type":993,"tag":1042,"props":4425,"children":4426},{"style":1063},[4427],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4429,"children":4430},{"style":1057},[4431],{"type":998,"value":1071},{"type":993,"tag":1042,"props":4433,"children":4434},{"style":1074},[4435],{"type":998,"value":4436},"\"Frank\"",{"type":993,"tag":1042,"props":4438,"children":4439},{"style":1057},[4440],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4442,"children":4443},{"style":1074},[4444],{"type":998,"value":4445},"\"Grace\"",{"type":993,"tag":1042,"props":4447,"children":4448},{"style":1057},[4449],{"type":998,"value":1092},{"type":993,"tag":1042,"props":4451,"children":4452},{"class":1044,"line":127},[4453,4458,4462,4466,4470,4475,4479],{"type":993,"tag":1042,"props":4454,"children":4455},{"style":1057},[4456],{"type":998,"value":4457},"everyone ",{"type":993,"tag":1042,"props":4459,"children":4460},{"style":1063},[4461],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4463,"children":4464},{"style":1057},[4465],{"type":998,"value":4267},{"type":993,"tag":1042,"props":4467,"children":4468},{"style":1063},[4469],{"type":998,"value":4272},{"type":993,"tag":1042,"props":4471,"children":4472},{"style":1057},[4473],{"type":998,"value":4474}," team_b ",{"type":993,"tag":1042,"props":4476,"children":4477},{"style":1063},[4478],{"type":998,"value":4272},{"type":993,"tag":1042,"props":4480,"children":4481},{"style":1057},[4482],{"type":998,"value":4483}," team_c\n",{"type":993,"tag":1042,"props":4485,"children":4486},{"class":1044,"line":136},[4487,4491,4495,4499,4504,4508,4513,4517,4521],{"type":993,"tag":1042,"props":4488,"children":4489},{"style":1098},[4490],{"type":998,"value":1101},{"type":993,"tag":1042,"props":4492,"children":4493},{"style":1057},[4494],{"type":998,"value":1106},{"type":993,"tag":1042,"props":4496,"children":4497},{"style":1063},[4498],{"type":998,"value":1111},{"type":993,"tag":1042,"props":4500,"children":4501},{"style":1074},[4502],{"type":998,"value":4503},"\"Everyone: ",{"type":993,"tag":1042,"props":4505,"children":4506},{"style":1098},[4507],{"type":998,"value":1121},{"type":993,"tag":1042,"props":4509,"children":4510},{"style":1057},[4511],{"type":998,"value":4512},"everyone",{"type":993,"tag":1042,"props":4514,"children":4515},{"style":1098},[4516],{"type":998,"value":1131},{"type":993,"tag":1042,"props":4518,"children":4519},{"style":1074},[4520],{"type":998,"value":1136},{"type":993,"tag":1042,"props":4522,"children":4523},{"style":1057},[4524],{"type":998,"value":1141},{"type":993,"tag":1403,"props":4526,"children":4528},{"id":4527},"using-union-method",[4529],{"type":998,"value":4530},"Using union() Method",{"type":993,"tag":1001,"props":4532,"children":4533},{},[4534],{"type":998,"value":4535},"The union method offers more flexibility and readability.",{"type":993,"tag":1029,"props":4537,"children":4538},{},[4539],{"type":993,"tag":1033,"props":4540,"children":4542},{"className":1035,"code":4541,"language":6,"meta":8,"style":8},"# Union with method\nskills_python = {\"variables\", \"functions\", \"loops\"}\nskills_web = {\"html\", \"css\", \"javascript\"}\nskills_database = {\"sql\", \"nosql\"}\n\n# Combine all skills\nall_skills = skills_python.union(skills_web, skills_database)\nprint(f\"All skills: {all_skills}\")\n\n# Union with other iterables\nextra_skills = [\"git\", \"testing\"]\ncomplete_skills = all_skills.union(extra_skills)\nprint(f\"Complete skills: {complete_skills}\")\n",[4543],{"type":993,"tag":1007,"props":4544,"children":4545},{"__ignoreMap":8},[4546,4554,4597,4640,4674,4681,4689,4706,4747,4754,4762,4796,4813],{"type":993,"tag":1042,"props":4547,"children":4548},{"class":1044,"line":12},[4549],{"type":993,"tag":1042,"props":4550,"children":4551},{"style":1048},[4552],{"type":998,"value":4553},"# Union with method\n",{"type":993,"tag":1042,"props":4555,"children":4556},{"class":1044,"line":27},[4557,4562,4566,4570,4575,4579,4584,4588,4593],{"type":993,"tag":1042,"props":4558,"children":4559},{"style":1057},[4560],{"type":998,"value":4561},"skills_python ",{"type":993,"tag":1042,"props":4563,"children":4564},{"style":1063},[4565],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4567,"children":4568},{"style":1057},[4569],{"type":998,"value":1071},{"type":993,"tag":1042,"props":4571,"children":4572},{"style":1074},[4573],{"type":998,"value":4574},"\"variables\"",{"type":993,"tag":1042,"props":4576,"children":4577},{"style":1057},[4578],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4580,"children":4581},{"style":1074},[4582],{"type":998,"value":4583},"\"functions\"",{"type":993,"tag":1042,"props":4585,"children":4586},{"style":1057},[4587],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4589,"children":4590},{"style":1074},[4591],{"type":998,"value":4592},"\"loops\"",{"type":993,"tag":1042,"props":4594,"children":4595},{"style":1057},[4596],{"type":998,"value":1092},{"type":993,"tag":1042,"props":4598,"children":4599},{"class":1044,"line":36},[4600,4605,4609,4613,4618,4622,4627,4631,4636],{"type":993,"tag":1042,"props":4601,"children":4602},{"style":1057},[4603],{"type":998,"value":4604},"skills_web ",{"type":993,"tag":1042,"props":4606,"children":4607},{"style":1063},[4608],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4610,"children":4611},{"style":1057},[4612],{"type":998,"value":1071},{"type":993,"tag":1042,"props":4614,"children":4615},{"style":1074},[4616],{"type":998,"value":4617},"\"html\"",{"type":993,"tag":1042,"props":4619,"children":4620},{"style":1057},[4621],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4623,"children":4624},{"style":1074},[4625],{"type":998,"value":4626},"\"css\"",{"type":993,"tag":1042,"props":4628,"children":4629},{"style":1057},[4630],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4632,"children":4633},{"style":1074},[4634],{"type":998,"value":4635},"\"javascript\"",{"type":993,"tag":1042,"props":4637,"children":4638},{"style":1057},[4639],{"type":998,"value":1092},{"type":993,"tag":1042,"props":4641,"children":4642},{"class":1044,"line":45},[4643,4648,4652,4656,4661,4665,4670],{"type":993,"tag":1042,"props":4644,"children":4645},{"style":1057},[4646],{"type":998,"value":4647},"skills_database ",{"type":993,"tag":1042,"props":4649,"children":4650},{"style":1063},[4651],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4653,"children":4654},{"style":1057},[4655],{"type":998,"value":1071},{"type":993,"tag":1042,"props":4657,"children":4658},{"style":1074},[4659],{"type":998,"value":4660},"\"sql\"",{"type":993,"tag":1042,"props":4662,"children":4663},{"style":1057},[4664],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4666,"children":4667},{"style":1074},[4668],{"type":998,"value":4669},"\"nosql\"",{"type":993,"tag":1042,"props":4671,"children":4672},{"style":1057},[4673],{"type":998,"value":1092},{"type":993,"tag":1042,"props":4675,"children":4676},{"class":1044,"line":54},[4677],{"type":993,"tag":1042,"props":4678,"children":4679},{"emptyLinePlaceholder":13},[4680],{"type":998,"value":1149},{"type":993,"tag":1042,"props":4682,"children":4683},{"class":1044,"line":63},[4684],{"type":993,"tag":1042,"props":4685,"children":4686},{"style":1048},[4687],{"type":998,"value":4688},"# Combine all skills\n",{"type":993,"tag":1042,"props":4690,"children":4691},{"class":1044,"line":72},[4692,4697,4701],{"type":993,"tag":1042,"props":4693,"children":4694},{"style":1057},[4695],{"type":998,"value":4696},"all_skills ",{"type":993,"tag":1042,"props":4698,"children":4699},{"style":1063},[4700],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4702,"children":4703},{"style":1057},[4704],{"type":998,"value":4705}," skills_python.union(skills_web, skills_database)\n",{"type":993,"tag":1042,"props":4707,"children":4708},{"class":1044,"line":81},[4709,4713,4717,4721,4726,4730,4735,4739,4743],{"type":993,"tag":1042,"props":4710,"children":4711},{"style":1098},[4712],{"type":998,"value":1101},{"type":993,"tag":1042,"props":4714,"children":4715},{"style":1057},[4716],{"type":998,"value":1106},{"type":993,"tag":1042,"props":4718,"children":4719},{"style":1063},[4720],{"type":998,"value":1111},{"type":993,"tag":1042,"props":4722,"children":4723},{"style":1074},[4724],{"type":998,"value":4725},"\"All skills: ",{"type":993,"tag":1042,"props":4727,"children":4728},{"style":1098},[4729],{"type":998,"value":1121},{"type":993,"tag":1042,"props":4731,"children":4732},{"style":1057},[4733],{"type":998,"value":4734},"all_skills",{"type":993,"tag":1042,"props":4736,"children":4737},{"style":1098},[4738],{"type":998,"value":1131},{"type":993,"tag":1042,"props":4740,"children":4741},{"style":1074},[4742],{"type":998,"value":1136},{"type":993,"tag":1042,"props":4744,"children":4745},{"style":1057},[4746],{"type":998,"value":1141},{"type":993,"tag":1042,"props":4748,"children":4749},{"class":1044,"line":91},[4750],{"type":993,"tag":1042,"props":4751,"children":4752},{"emptyLinePlaceholder":13},[4753],{"type":998,"value":1149},{"type":993,"tag":1042,"props":4755,"children":4756},{"class":1044,"line":100},[4757],{"type":993,"tag":1042,"props":4758,"children":4759},{"style":1048},[4760],{"type":998,"value":4761},"# Union with other iterables\n",{"type":993,"tag":1042,"props":4763,"children":4764},{"class":1044,"line":109},[4765,4770,4774,4778,4783,4787,4792],{"type":993,"tag":1042,"props":4766,"children":4767},{"style":1057},[4768],{"type":998,"value":4769},"extra_skills ",{"type":993,"tag":1042,"props":4771,"children":4772},{"style":1063},[4773],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4775,"children":4776},{"style":1057},[4777],{"type":998,"value":2039},{"type":993,"tag":1042,"props":4779,"children":4780},{"style":1074},[4781],{"type":998,"value":4782},"\"git\"",{"type":993,"tag":1042,"props":4784,"children":4785},{"style":1057},[4786],{"type":998,"value":1082},{"type":993,"tag":1042,"props":4788,"children":4789},{"style":1074},[4790],{"type":998,"value":4791},"\"testing\"",{"type":993,"tag":1042,"props":4793,"children":4794},{"style":1057},[4795],{"type":998,"value":2092},{"type":993,"tag":1042,"props":4797,"children":4798},{"class":1044,"line":118},[4799,4804,4808],{"type":993,"tag":1042,"props":4800,"children":4801},{"style":1057},[4802],{"type":998,"value":4803},"complete_skills ",{"type":993,"tag":1042,"props":4805,"children":4806},{"style":1063},[4807],{"type":998,"value":1066},{"type":993,"tag":1042,"props":4809,"children":4810},{"style":1057},[4811],{"type":998,"value":4812}," all_skills.union(extra_skills)\n",{"type":993,"tag":1042,"props":4814,"children":4815},{"class":1044,"line":127},[4816,4820,4824,4828,4833,4837,4842,4846,4850],{"type":993,"tag":1042,"props":4817,"children":4818},{"style":1098},[4819],{"type":998,"value":1101},{"type":993,"tag":1042,"props":4821,"children":4822},{"style":1057},[4823],{"type":998,"value":1106},{"type":993,"tag":1042,"props":4825,"children":4826},{"style":1063},[4827],{"type":998,"value":1111},{"type":993,"tag":1042,"props":4829,"children":4830},{"style":1074},[4831],{"type":998,"value":4832},"\"Complete skills: ",{"type":993,"tag":1042,"props":4834,"children":4835},{"style":1098},[4836],{"type":998,"value":1121},{"type":993,"tag":1042,"props":4838,"children":4839},{"style":1057},[4840],{"type":998,"value":4841},"complete_skills",{"type":993,"tag":1042,"props":4843,"children":4844},{"style":1098},[4845],{"type":998,"value":1131},{"type":993,"tag":1042,"props":4847,"children":4848},{"style":1074},[4849],{"type":998,"value":1136},{"type":993,"tag":1042,"props":4851,"children":4852},{"style":1057},[4853],{"type":998,"value":1141},{"type":993,"tag":1286,"props":4855,"children":4857},{"id":4856},"practical-set-building",[4858],{"type":998,"value":4859},"🌟 Practical Set Building",{"type":993,"tag":1001,"props":4861,"children":4862},{},[4863],{"type":998,"value":4864},"Real-world applications of adding elements to sets for data management and analysis.",{"type":993,"tag":1305,"props":4866,"children":4870},{"emoji":4867,"title":4868,"type":4869},"💡","Best Practices","warning",[4871,4879,4910,4918,4948,4956],{"type":993,"tag":1001,"props":4872,"children":4873},{},[4874],{"type":993,"tag":1315,"props":4875,"children":4876},{},[4877],{"type":998,"value":4878},"Choose Right Method:",{"type":993,"tag":1321,"props":4880,"children":4881},{},[4882,4894,4905],{"type":993,"tag":1325,"props":4883,"children":4884},{},[4885,4887,4892],{"type":998,"value":4886},"Use ",{"type":993,"tag":1007,"props":4888,"children":4890},{"className":4889},[],[4891],{"type":998,"value":1012},{"type":998,"value":4893}," for single elements",{"type":993,"tag":1325,"props":4895,"children":4896},{},[4897,4898,4903],{"type":998,"value":4886},{"type":993,"tag":1007,"props":4899,"children":4901},{"className":4900},[],[4902],{"type":998,"value":1020},{"type":998,"value":4904}," for multiple elements",{"type":993,"tag":1325,"props":4906,"children":4907},{},[4908],{"type":998,"value":4909},"Use union operators for combining sets",{"type":993,"tag":1001,"props":4911,"children":4912},{},[4913],{"type":993,"tag":1315,"props":4914,"children":4915},{},[4916],{"type":998,"value":4917},"Performance Tips:",{"type":993,"tag":1321,"props":4919,"children":4920},{},[4921,4938,4943],{"type":993,"tag":1325,"props":4922,"children":4923},{},[4924,4929,4931,4936],{"type":993,"tag":1007,"props":4925,"children":4927},{"className":4926},[],[4928],{"type":998,"value":1020},{"type":998,"value":4930}," is faster than multiple ",{"type":993,"tag":1007,"props":4932,"children":4934},{"className":4933},[],[4935],{"type":998,"value":1012},{"type":998,"value":4937}," calls",{"type":993,"tag":1325,"props":4939,"children":4940},{},[4941],{"type":998,"value":4942},"Union creates new sets (uses more memory)",{"type":993,"tag":1325,"props":4944,"children":4945},{},[4946],{"type":998,"value":4947},"Consider memory usage for large datasets",{"type":993,"tag":1001,"props":4949,"children":4950},{},[4951],{"type":993,"tag":1315,"props":4952,"children":4953},{},[4954],{"type":998,"value":4955},"Code Clarity:",{"type":993,"tag":1321,"props":4957,"children":4958},{},[4959,4964,4969],{"type":993,"tag":1325,"props":4960,"children":4961},{},[4962],{"type":998,"value":4963},"Use descriptive variable names",{"type":993,"tag":1325,"props":4965,"children":4966},{},[4967],{"type":998,"value":4968},"Comment complex operations",{"type":993,"tag":1325,"props":4970,"children":4971},{},[4972],{"type":998,"value":4973},"Handle edge cases appropriately",{"type":993,"tag":1403,"props":4975,"children":4977},{"id":4976},"building-dynamic-collections",[4978],{"type":998,"value":4979},"Building Dynamic Collections",{"type":993,"tag":1001,"props":4981,"children":4982},{},[4983],{"type":998,"value":4984},"Creating sets that grow based on input data.",{"type":993,"tag":1029,"props":4986,"children":4987},{},[4988],{"type":993,"tag":1033,"props":4989,"children":4991},{"className":1035,"code":4990,"language":6,"meta":8,"style":8},"# Build user permissions dynamically\nuser_permissions = set()\n\n# Add base permissions\nuser_permissions.add(\"read\")\nuser_permissions.add(\"write\")\n\n# Add admin permissions if needed\nis_admin = True\nif is_admin:\n    admin_perms = [\"delete\", \"modify\", \"admin\"]\n    user_permissions.update(admin_perms)\n\nprint(f\"User permissions: {user_permissions}\")\n\n# Build tag collection from posts\npost_tags = [\n    [\"python\", \"programming\", \"tutorial\"],\n    [\"web\", \"html\", \"css\"],\n    [\"python\", \"data\", \"analysis\"]\n]\n\nall_tags = set()\nfor tags in post_tags:\n    all_tags.update(tags)\n\nprint(f\"All unique tags: {all_tags}\")\n",[4992],{"type":993,"tag":1007,"props":4993,"children":4994},{"__ignoreMap":8},[4995,5003,5023,5030,5038,5055,5071,5078,5086,5103,5116,5159,5167,5174,5215,5222,5230,5247,5283,5315,5348,5355,5362,5382,5403,5411,5418],{"type":993,"tag":1042,"props":4996,"children":4997},{"class":1044,"line":12},[4998],{"type":993,"tag":1042,"props":4999,"children":5000},{"style":1048},[5001],{"type":998,"value":5002},"# Build user permissions dynamically\n",{"type":993,"tag":1042,"props":5004,"children":5005},{"class":1044,"line":27},[5006,5011,5015,5019],{"type":993,"tag":1042,"props":5007,"children":5008},{"style":1057},[5009],{"type":998,"value":5010},"user_permissions ",{"type":993,"tag":1042,"props":5012,"children":5013},{"style":1063},[5014],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5016,"children":5017},{"style":1098},[5018],{"type":998,"value":1448},{"type":993,"tag":1042,"props":5020,"children":5021},{"style":1057},[5022],{"type":998,"value":2022},{"type":993,"tag":1042,"props":5024,"children":5025},{"class":1044,"line":36},[5026],{"type":993,"tag":1042,"props":5027,"children":5028},{"emptyLinePlaceholder":13},[5029],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5031,"children":5032},{"class":1044,"line":45},[5033],{"type":993,"tag":1042,"props":5034,"children":5035},{"style":1048},[5036],{"type":998,"value":5037},"# Add base permissions\n",{"type":993,"tag":1042,"props":5039,"children":5040},{"class":1044,"line":54},[5041,5046,5051],{"type":993,"tag":1042,"props":5042,"children":5043},{"style":1057},[5044],{"type":998,"value":5045},"user_permissions.add(",{"type":993,"tag":1042,"props":5047,"children":5048},{"style":1074},[5049],{"type":998,"value":5050},"\"read\"",{"type":993,"tag":1042,"props":5052,"children":5053},{"style":1057},[5054],{"type":998,"value":1141},{"type":993,"tag":1042,"props":5056,"children":5057},{"class":1044,"line":63},[5058,5062,5067],{"type":993,"tag":1042,"props":5059,"children":5060},{"style":1057},[5061],{"type":998,"value":5045},{"type":993,"tag":1042,"props":5063,"children":5064},{"style":1074},[5065],{"type":998,"value":5066},"\"write\"",{"type":993,"tag":1042,"props":5068,"children":5069},{"style":1057},[5070],{"type":998,"value":1141},{"type":993,"tag":1042,"props":5072,"children":5073},{"class":1044,"line":72},[5074],{"type":993,"tag":1042,"props":5075,"children":5076},{"emptyLinePlaceholder":13},[5077],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5079,"children":5080},{"class":1044,"line":81},[5081],{"type":993,"tag":1042,"props":5082,"children":5083},{"style":1048},[5084],{"type":998,"value":5085},"# Add admin permissions if needed\n",{"type":993,"tag":1042,"props":5087,"children":5088},{"class":1044,"line":91},[5089,5094,5098],{"type":993,"tag":1042,"props":5090,"children":5091},{"style":1057},[5092],{"type":998,"value":5093},"is_admin ",{"type":993,"tag":1042,"props":5095,"children":5096},{"style":1063},[5097],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5099,"children":5100},{"style":1098},[5101],{"type":998,"value":5102}," True\n",{"type":993,"tag":1042,"props":5104,"children":5105},{"class":1044,"line":100},[5106,5111],{"type":993,"tag":1042,"props":5107,"children":5108},{"style":1063},[5109],{"type":998,"value":5110},"if",{"type":993,"tag":1042,"props":5112,"children":5113},{"style":1057},[5114],{"type":998,"value":5115}," is_admin:\n",{"type":993,"tag":1042,"props":5117,"children":5118},{"class":1044,"line":109},[5119,5124,5128,5132,5137,5141,5146,5150,5155],{"type":993,"tag":1042,"props":5120,"children":5121},{"style":1057},[5122],{"type":998,"value":5123},"    admin_perms ",{"type":993,"tag":1042,"props":5125,"children":5126},{"style":1063},[5127],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5129,"children":5130},{"style":1057},[5131],{"type":998,"value":2039},{"type":993,"tag":1042,"props":5133,"children":5134},{"style":1074},[5135],{"type":998,"value":5136},"\"delete\"",{"type":993,"tag":1042,"props":5138,"children":5139},{"style":1057},[5140],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5142,"children":5143},{"style":1074},[5144],{"type":998,"value":5145},"\"modify\"",{"type":993,"tag":1042,"props":5147,"children":5148},{"style":1057},[5149],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5151,"children":5152},{"style":1074},[5153],{"type":998,"value":5154},"\"admin\"",{"type":993,"tag":1042,"props":5156,"children":5157},{"style":1057},[5158],{"type":998,"value":2092},{"type":993,"tag":1042,"props":5160,"children":5161},{"class":1044,"line":118},[5162],{"type":993,"tag":1042,"props":5163,"children":5164},{"style":1057},[5165],{"type":998,"value":5166},"    user_permissions.update(admin_perms)\n",{"type":993,"tag":1042,"props":5168,"children":5169},{"class":1044,"line":127},[5170],{"type":993,"tag":1042,"props":5171,"children":5172},{"emptyLinePlaceholder":13},[5173],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5175,"children":5176},{"class":1044,"line":136},[5177,5181,5185,5189,5194,5198,5203,5207,5211],{"type":993,"tag":1042,"props":5178,"children":5179},{"style":1098},[5180],{"type":998,"value":1101},{"type":993,"tag":1042,"props":5182,"children":5183},{"style":1057},[5184],{"type":998,"value":1106},{"type":993,"tag":1042,"props":5186,"children":5187},{"style":1063},[5188],{"type":998,"value":1111},{"type":993,"tag":1042,"props":5190,"children":5191},{"style":1074},[5192],{"type":998,"value":5193},"\"User permissions: ",{"type":993,"tag":1042,"props":5195,"children":5196},{"style":1098},[5197],{"type":998,"value":1121},{"type":993,"tag":1042,"props":5199,"children":5200},{"style":1057},[5201],{"type":998,"value":5202},"user_permissions",{"type":993,"tag":1042,"props":5204,"children":5205},{"style":1098},[5206],{"type":998,"value":1131},{"type":993,"tag":1042,"props":5208,"children":5209},{"style":1074},[5210],{"type":998,"value":1136},{"type":993,"tag":1042,"props":5212,"children":5213},{"style":1057},[5214],{"type":998,"value":1141},{"type":993,"tag":1042,"props":5216,"children":5217},{"class":1044,"line":146},[5218],{"type":993,"tag":1042,"props":5219,"children":5220},{"emptyLinePlaceholder":13},[5221],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5223,"children":5224},{"class":1044,"line":155},[5225],{"type":993,"tag":1042,"props":5226,"children":5227},{"style":1048},[5228],{"type":998,"value":5229},"# Build tag collection from posts\n",{"type":993,"tag":1042,"props":5231,"children":5232},{"class":1044,"line":164},[5233,5238,5242],{"type":993,"tag":1042,"props":5234,"children":5235},{"style":1057},[5236],{"type":998,"value":5237},"post_tags ",{"type":993,"tag":1042,"props":5239,"children":5240},{"style":1063},[5241],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5243,"children":5244},{"style":1057},[5245],{"type":998,"value":5246}," [\n",{"type":993,"tag":1042,"props":5248,"children":5249},{"class":1044,"line":173},[5250,5255,5260,5264,5269,5273,5278],{"type":993,"tag":1042,"props":5251,"children":5252},{"style":1057},[5253],{"type":998,"value":5254},"    [",{"type":993,"tag":1042,"props":5256,"children":5257},{"style":1074},[5258],{"type":998,"value":5259},"\"python\"",{"type":993,"tag":1042,"props":5261,"children":5262},{"style":1057},[5263],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5265,"children":5266},{"style":1074},[5267],{"type":998,"value":5268},"\"programming\"",{"type":993,"tag":1042,"props":5270,"children":5271},{"style":1057},[5272],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5274,"children":5275},{"style":1074},[5276],{"type":998,"value":5277},"\"tutorial\"",{"type":993,"tag":1042,"props":5279,"children":5280},{"style":1057},[5281],{"type":998,"value":5282},"],\n",{"type":993,"tag":1042,"props":5284,"children":5285},{"class":1044,"line":182},[5286,5290,5295,5299,5303,5307,5311],{"type":993,"tag":1042,"props":5287,"children":5288},{"style":1057},[5289],{"type":998,"value":5254},{"type":993,"tag":1042,"props":5291,"children":5292},{"style":1074},[5293],{"type":998,"value":5294},"\"web\"",{"type":993,"tag":1042,"props":5296,"children":5297},{"style":1057},[5298],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5300,"children":5301},{"style":1074},[5302],{"type":998,"value":4617},{"type":993,"tag":1042,"props":5304,"children":5305},{"style":1057},[5306],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5308,"children":5309},{"style":1074},[5310],{"type":998,"value":4626},{"type":993,"tag":1042,"props":5312,"children":5313},{"style":1057},[5314],{"type":998,"value":5282},{"type":993,"tag":1042,"props":5316,"children":5317},{"class":1044,"line":191},[5318,5322,5326,5330,5335,5339,5344],{"type":993,"tag":1042,"props":5319,"children":5320},{"style":1057},[5321],{"type":998,"value":5254},{"type":993,"tag":1042,"props":5323,"children":5324},{"style":1074},[5325],{"type":998,"value":5259},{"type":993,"tag":1042,"props":5327,"children":5328},{"style":1057},[5329],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5331,"children":5332},{"style":1074},[5333],{"type":998,"value":5334},"\"data\"",{"type":993,"tag":1042,"props":5336,"children":5337},{"style":1057},[5338],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5340,"children":5341},{"style":1074},[5342],{"type":998,"value":5343},"\"analysis\"",{"type":993,"tag":1042,"props":5345,"children":5346},{"style":1057},[5347],{"type":998,"value":2092},{"type":993,"tag":1042,"props":5349,"children":5350},{"class":1044,"line":201},[5351],{"type":993,"tag":1042,"props":5352,"children":5353},{"style":1057},[5354],{"type":998,"value":2092},{"type":993,"tag":1042,"props":5356,"children":5357},{"class":1044,"line":210},[5358],{"type":993,"tag":1042,"props":5359,"children":5360},{"emptyLinePlaceholder":13},[5361],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5363,"children":5364},{"class":1044,"line":219},[5365,5370,5374,5378],{"type":993,"tag":1042,"props":5366,"children":5367},{"style":1057},[5368],{"type":998,"value":5369},"all_tags ",{"type":993,"tag":1042,"props":5371,"children":5372},{"style":1063},[5373],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5375,"children":5376},{"style":1098},[5377],{"type":998,"value":1448},{"type":993,"tag":1042,"props":5379,"children":5380},{"style":1057},[5381],{"type":998,"value":2022},{"type":993,"tag":1042,"props":5383,"children":5384},{"class":1044,"line":228},[5385,5389,5394,5398],{"type":993,"tag":1042,"props":5386,"children":5387},{"style":1063},[5388],{"type":998,"value":2107},{"type":993,"tag":1042,"props":5390,"children":5391},{"style":1057},[5392],{"type":998,"value":5393}," tags ",{"type":993,"tag":1042,"props":5395,"children":5396},{"style":1063},[5397],{"type":998,"value":2117},{"type":993,"tag":1042,"props":5399,"children":5400},{"style":1057},[5401],{"type":998,"value":5402}," post_tags:\n",{"type":993,"tag":1042,"props":5404,"children":5405},{"class":1044,"line":238},[5406],{"type":993,"tag":1042,"props":5407,"children":5408},{"style":1057},[5409],{"type":998,"value":5410},"    all_tags.update(tags)\n",{"type":993,"tag":1042,"props":5412,"children":5413},{"class":1044,"line":247},[5414],{"type":993,"tag":1042,"props":5415,"children":5416},{"emptyLinePlaceholder":13},[5417],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5419,"children":5420},{"class":1044,"line":256},[5421,5425,5429,5433,5438,5442,5447,5451,5455],{"type":993,"tag":1042,"props":5422,"children":5423},{"style":1098},[5424],{"type":998,"value":1101},{"type":993,"tag":1042,"props":5426,"children":5427},{"style":1057},[5428],{"type":998,"value":1106},{"type":993,"tag":1042,"props":5430,"children":5431},{"style":1063},[5432],{"type":998,"value":1111},{"type":993,"tag":1042,"props":5434,"children":5435},{"style":1074},[5436],{"type":998,"value":5437},"\"All unique tags: ",{"type":993,"tag":1042,"props":5439,"children":5440},{"style":1098},[5441],{"type":998,"value":1121},{"type":993,"tag":1042,"props":5443,"children":5444},{"style":1057},[5445],{"type":998,"value":5446},"all_tags",{"type":993,"tag":1042,"props":5448,"children":5449},{"style":1098},[5450],{"type":998,"value":1131},{"type":993,"tag":1042,"props":5452,"children":5453},{"style":1074},[5454],{"type":998,"value":1136},{"type":993,"tag":1042,"props":5456,"children":5457},{"style":1057},[5458],{"type":998,"value":1141},{"type":993,"tag":1403,"props":5460,"children":5462},{"id":5461},"data-aggregation",[5463],{"type":998,"value":5464},"Data Aggregation",{"type":993,"tag":1001,"props":5466,"children":5467},{},[5468],{"type":998,"value":5469},"Combining data from multiple sources into unified collections.",{"type":993,"tag":1029,"props":5471,"children":5472},{},[5473],{"type":993,"tag":1033,"props":5474,"children":5476},{"className":1035,"code":5475,"language":6,"meta":8,"style":8},"# Aggregate customer data\ncustomers_online = {\"user1\", \"user2\", \"user3\"}\ncustomers_store = {\"user2\", \"user4\", \"user5\"}\ncustomers_phone = {\"user1\", \"user6\"}\n\n# Build complete customer set\nall_customers = set()\nall_customers.update(customers_online)\nall_customers.update(customers_store)\nall_customers.update(customers_phone)\n\nprint(f\"Total unique customers: {len(all_customers)}\")\nprint(f\"Customer list: {all_customers}\")\n\n# Alternative: use union\nall_customers_alt = customers_online | customers_store | customers_phone\nprint(f\"Alternative method: {all_customers_alt}\")\n",[5477],{"type":993,"tag":1007,"props":5478,"children":5479},{"__ignoreMap":8},[5480,5488,5531,5573,5606,5613,5621,5641,5649,5657,5665,5672,5713,5754,5761,5769,5804],{"type":993,"tag":1042,"props":5481,"children":5482},{"class":1044,"line":12},[5483],{"type":993,"tag":1042,"props":5484,"children":5485},{"style":1048},[5486],{"type":998,"value":5487},"# Aggregate customer data\n",{"type":993,"tag":1042,"props":5489,"children":5490},{"class":1044,"line":27},[5491,5496,5500,5504,5509,5513,5518,5522,5527],{"type":993,"tag":1042,"props":5492,"children":5493},{"style":1057},[5494],{"type":998,"value":5495},"customers_online ",{"type":993,"tag":1042,"props":5497,"children":5498},{"style":1063},[5499],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5501,"children":5502},{"style":1057},[5503],{"type":998,"value":1071},{"type":993,"tag":1042,"props":5505,"children":5506},{"style":1074},[5507],{"type":998,"value":5508},"\"user1\"",{"type":993,"tag":1042,"props":5510,"children":5511},{"style":1057},[5512],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5514,"children":5515},{"style":1074},[5516],{"type":998,"value":5517},"\"user2\"",{"type":993,"tag":1042,"props":5519,"children":5520},{"style":1057},[5521],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5523,"children":5524},{"style":1074},[5525],{"type":998,"value":5526},"\"user3\"",{"type":993,"tag":1042,"props":5528,"children":5529},{"style":1057},[5530],{"type":998,"value":1092},{"type":993,"tag":1042,"props":5532,"children":5533},{"class":1044,"line":36},[5534,5539,5543,5547,5551,5555,5560,5564,5569],{"type":993,"tag":1042,"props":5535,"children":5536},{"style":1057},[5537],{"type":998,"value":5538},"customers_store ",{"type":993,"tag":1042,"props":5540,"children":5541},{"style":1063},[5542],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5544,"children":5545},{"style":1057},[5546],{"type":998,"value":1071},{"type":993,"tag":1042,"props":5548,"children":5549},{"style":1074},[5550],{"type":998,"value":5517},{"type":993,"tag":1042,"props":5552,"children":5553},{"style":1057},[5554],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5556,"children":5557},{"style":1074},[5558],{"type":998,"value":5559},"\"user4\"",{"type":993,"tag":1042,"props":5561,"children":5562},{"style":1057},[5563],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5565,"children":5566},{"style":1074},[5567],{"type":998,"value":5568},"\"user5\"",{"type":993,"tag":1042,"props":5570,"children":5571},{"style":1057},[5572],{"type":998,"value":1092},{"type":993,"tag":1042,"props":5574,"children":5575},{"class":1044,"line":45},[5576,5581,5585,5589,5593,5597,5602],{"type":993,"tag":1042,"props":5577,"children":5578},{"style":1057},[5579],{"type":998,"value":5580},"customers_phone ",{"type":993,"tag":1042,"props":5582,"children":5583},{"style":1063},[5584],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5586,"children":5587},{"style":1057},[5588],{"type":998,"value":1071},{"type":993,"tag":1042,"props":5590,"children":5591},{"style":1074},[5592],{"type":998,"value":5508},{"type":993,"tag":1042,"props":5594,"children":5595},{"style":1057},[5596],{"type":998,"value":1082},{"type":993,"tag":1042,"props":5598,"children":5599},{"style":1074},[5600],{"type":998,"value":5601},"\"user6\"",{"type":993,"tag":1042,"props":5603,"children":5604},{"style":1057},[5605],{"type":998,"value":1092},{"type":993,"tag":1042,"props":5607,"children":5608},{"class":1044,"line":54},[5609],{"type":993,"tag":1042,"props":5610,"children":5611},{"emptyLinePlaceholder":13},[5612],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5614,"children":5615},{"class":1044,"line":63},[5616],{"type":993,"tag":1042,"props":5617,"children":5618},{"style":1048},[5619],{"type":998,"value":5620},"# Build complete customer set\n",{"type":993,"tag":1042,"props":5622,"children":5623},{"class":1044,"line":72},[5624,5629,5633,5637],{"type":993,"tag":1042,"props":5625,"children":5626},{"style":1057},[5627],{"type":998,"value":5628},"all_customers ",{"type":993,"tag":1042,"props":5630,"children":5631},{"style":1063},[5632],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5634,"children":5635},{"style":1098},[5636],{"type":998,"value":1448},{"type":993,"tag":1042,"props":5638,"children":5639},{"style":1057},[5640],{"type":998,"value":2022},{"type":993,"tag":1042,"props":5642,"children":5643},{"class":1044,"line":81},[5644],{"type":993,"tag":1042,"props":5645,"children":5646},{"style":1057},[5647],{"type":998,"value":5648},"all_customers.update(customers_online)\n",{"type":993,"tag":1042,"props":5650,"children":5651},{"class":1044,"line":91},[5652],{"type":993,"tag":1042,"props":5653,"children":5654},{"style":1057},[5655],{"type":998,"value":5656},"all_customers.update(customers_store)\n",{"type":993,"tag":1042,"props":5658,"children":5659},{"class":1044,"line":100},[5660],{"type":993,"tag":1042,"props":5661,"children":5662},{"style":1057},[5663],{"type":998,"value":5664},"all_customers.update(customers_phone)\n",{"type":993,"tag":1042,"props":5666,"children":5667},{"class":1044,"line":109},[5668],{"type":993,"tag":1042,"props":5669,"children":5670},{"emptyLinePlaceholder":13},[5671],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5673,"children":5674},{"class":1044,"line":118},[5675,5679,5683,5687,5692,5696,5701,5705,5709],{"type":993,"tag":1042,"props":5676,"children":5677},{"style":1098},[5678],{"type":998,"value":1101},{"type":993,"tag":1042,"props":5680,"children":5681},{"style":1057},[5682],{"type":998,"value":1106},{"type":993,"tag":1042,"props":5684,"children":5685},{"style":1063},[5686],{"type":998,"value":1111},{"type":993,"tag":1042,"props":5688,"children":5689},{"style":1074},[5690],{"type":998,"value":5691},"\"Total unique customers: ",{"type":993,"tag":1042,"props":5693,"children":5694},{"style":1098},[5695],{"type":998,"value":2174},{"type":993,"tag":1042,"props":5697,"children":5698},{"style":1057},[5699],{"type":998,"value":5700},"(all_customers)",{"type":993,"tag":1042,"props":5702,"children":5703},{"style":1098},[5704],{"type":998,"value":1131},{"type":993,"tag":1042,"props":5706,"children":5707},{"style":1074},[5708],{"type":998,"value":1136},{"type":993,"tag":1042,"props":5710,"children":5711},{"style":1057},[5712],{"type":998,"value":1141},{"type":993,"tag":1042,"props":5714,"children":5715},{"class":1044,"line":127},[5716,5720,5724,5728,5733,5737,5742,5746,5750],{"type":993,"tag":1042,"props":5717,"children":5718},{"style":1098},[5719],{"type":998,"value":1101},{"type":993,"tag":1042,"props":5721,"children":5722},{"style":1057},[5723],{"type":998,"value":1106},{"type":993,"tag":1042,"props":5725,"children":5726},{"style":1063},[5727],{"type":998,"value":1111},{"type":993,"tag":1042,"props":5729,"children":5730},{"style":1074},[5731],{"type":998,"value":5732},"\"Customer list: ",{"type":993,"tag":1042,"props":5734,"children":5735},{"style":1098},[5736],{"type":998,"value":1121},{"type":993,"tag":1042,"props":5738,"children":5739},{"style":1057},[5740],{"type":998,"value":5741},"all_customers",{"type":993,"tag":1042,"props":5743,"children":5744},{"style":1098},[5745],{"type":998,"value":1131},{"type":993,"tag":1042,"props":5747,"children":5748},{"style":1074},[5749],{"type":998,"value":1136},{"type":993,"tag":1042,"props":5751,"children":5752},{"style":1057},[5753],{"type":998,"value":1141},{"type":993,"tag":1042,"props":5755,"children":5756},{"class":1044,"line":136},[5757],{"type":993,"tag":1042,"props":5758,"children":5759},{"emptyLinePlaceholder":13},[5760],{"type":998,"value":1149},{"type":993,"tag":1042,"props":5762,"children":5763},{"class":1044,"line":146},[5764],{"type":993,"tag":1042,"props":5765,"children":5766},{"style":1048},[5767],{"type":998,"value":5768},"# Alternative: use union\n",{"type":993,"tag":1042,"props":5770,"children":5771},{"class":1044,"line":155},[5772,5777,5781,5786,5790,5795,5799],{"type":993,"tag":1042,"props":5773,"children":5774},{"style":1057},[5775],{"type":998,"value":5776},"all_customers_alt ",{"type":993,"tag":1042,"props":5778,"children":5779},{"style":1063},[5780],{"type":998,"value":1066},{"type":993,"tag":1042,"props":5782,"children":5783},{"style":1057},[5784],{"type":998,"value":5785}," customers_online ",{"type":993,"tag":1042,"props":5787,"children":5788},{"style":1063},[5789],{"type":998,"value":4272},{"type":993,"tag":1042,"props":5791,"children":5792},{"style":1057},[5793],{"type":998,"value":5794}," customers_store ",{"type":993,"tag":1042,"props":5796,"children":5797},{"style":1063},[5798],{"type":998,"value":4272},{"type":993,"tag":1042,"props":5800,"children":5801},{"style":1057},[5802],{"type":998,"value":5803}," customers_phone\n",{"type":993,"tag":1042,"props":5805,"children":5806},{"class":1044,"line":164},[5807,5811,5815,5819,5824,5828,5833,5837,5841],{"type":993,"tag":1042,"props":5808,"children":5809},{"style":1098},[5810],{"type":998,"value":1101},{"type":993,"tag":1042,"props":5812,"children":5813},{"style":1057},[5814],{"type":998,"value":1106},{"type":993,"tag":1042,"props":5816,"children":5817},{"style":1063},[5818],{"type":998,"value":1111},{"type":993,"tag":1042,"props":5820,"children":5821},{"style":1074},[5822],{"type":998,"value":5823},"\"Alternative method: ",{"type":993,"tag":1042,"props":5825,"children":5826},{"style":1098},[5827],{"type":998,"value":1121},{"type":993,"tag":1042,"props":5829,"children":5830},{"style":1057},[5831],{"type":998,"value":5832},"all_customers_alt",{"type":993,"tag":1042,"props":5834,"children":5835},{"style":1098},[5836],{"type":998,"value":1131},{"type":993,"tag":1042,"props":5838,"children":5839},{"style":1074},[5840],{"type":998,"value":1136},{"type":993,"tag":1042,"props":5842,"children":5843},{"style":1057},[5844],{"type":998,"value":1141},{"type":993,"tag":1286,"props":5846,"children":5848},{"id":5847},"adding-methods-reference",[5849],{"type":998,"value":5850},"📚 Adding Methods Reference",{"type":993,"tag":1001,"props":5852,"children":5853},{},[5854],{"type":998,"value":5855},"Common methods for adding elements to sets:",{"type":993,"tag":5857,"props":5858,"children":5859},"table",{},[5860,5889],{"type":993,"tag":5861,"props":5862,"children":5863},"thead",{},[5864],{"type":993,"tag":5865,"props":5866,"children":5867},"tr",{},[5868,5874,5879,5884],{"type":993,"tag":5869,"props":5870,"children":5871},"th",{},[5872],{"type":998,"value":5873},"Method",{"type":993,"tag":5869,"props":5875,"children":5876},{},[5877],{"type":998,"value":5878},"Syntax",{"type":993,"tag":5869,"props":5880,"children":5881},{},[5882],{"type":998,"value":5883},"Use Case",{"type":993,"tag":5869,"props":5885,"children":5886},{},[5887],{"type":998,"value":5888},"Example",{"type":993,"tag":5890,"props":5891,"children":5892},"tbody",{},[5893,5927,5960,6002,6035],{"type":993,"tag":5865,"props":5894,"children":5895},{},[5896,5904,5913,5918],{"type":993,"tag":5897,"props":5898,"children":5899},"td",{},[5900],{"type":993,"tag":1315,"props":5901,"children":5902},{},[5903],{"type":998,"value":1012},{"type":993,"tag":5897,"props":5905,"children":5906},{},[5907],{"type":993,"tag":1007,"props":5908,"children":5910},{"className":5909},[],[5911],{"type":998,"value":5912},"set.add(element)",{"type":993,"tag":5897,"props":5914,"children":5915},{},[5916],{"type":998,"value":5917},"Single element",{"type":993,"tag":5897,"props":5919,"children":5920},{},[5921],{"type":993,"tag":1007,"props":5922,"children":5924},{"className":5923},[],[5925],{"type":998,"value":5926},"colors.add(\"red\")",{"type":993,"tag":5865,"props":5928,"children":5929},{},[5930,5937,5946,5951],{"type":993,"tag":5897,"props":5931,"children":5932},{},[5933],{"type":993,"tag":1315,"props":5934,"children":5935},{},[5936],{"type":998,"value":1020},{"type":993,"tag":5897,"props":5938,"children":5939},{},[5940],{"type":993,"tag":1007,"props":5941,"children":5943},{"className":5942},[],[5944],{"type":998,"value":5945},"set.update(iterable)",{"type":993,"tag":5897,"props":5947,"children":5948},{},[5949],{"type":998,"value":5950},"Multiple elements",{"type":993,"tag":5897,"props":5952,"children":5953},{},[5954],{"type":993,"tag":1007,"props":5955,"children":5957},{"className":5956},[],[5958],{"type":998,"value":5959},"colors.update([\"red\", \"blue\"])",{"type":993,"tag":5865,"props":5961,"children":5962},{},[5963,5971,5980,5985],{"type":993,"tag":5897,"props":5964,"children":5965},{},[5966],{"type":993,"tag":1315,"props":5967,"children":5968},{},[5969],{"type":998,"value":5970},"Union (|)",{"type":993,"tag":5897,"props":5972,"children":5973},{},[5974],{"type":993,"tag":1007,"props":5975,"children":5977},{"className":5976},[],[5978],{"type":998,"value":5979},"set1 &#124; set2",{"type":993,"tag":5897,"props":5981,"children":5982},{},[5983],{"type":998,"value":5984},"Combine sets (new)",{"type":993,"tag":5897,"props":5986,"children":5987},{},[5988,5994,5996],{"type":993,"tag":1007,"props":5989,"children":5991},{"className":5990},[],[5992],{"type":998,"value":5993},"{1, 2} &#124; {3, 4}",{"type":998,"value":5995}," → ",{"type":993,"tag":1007,"props":5997,"children":5999},{"className":5998},[],[6000],{"type":998,"value":6001},"{1, 2, 3, 4}",{"type":993,"tag":5865,"props":6003,"children":6004},{},[6005,6013,6022,6026],{"type":993,"tag":5897,"props":6006,"children":6007},{},[6008],{"type":993,"tag":1315,"props":6009,"children":6010},{},[6011],{"type":998,"value":6012},"union()",{"type":993,"tag":5897,"props":6014,"children":6015},{},[6016],{"type":993,"tag":1007,"props":6017,"children":6019},{"className":6018},[],[6020],{"type":998,"value":6021},"set1.union(set2)",{"type":993,"tag":5897,"props":6023,"children":6024},{},[6025],{"type":998,"value":5984},{"type":993,"tag":5897,"props":6027,"children":6028},{},[6029],{"type":993,"tag":1007,"props":6030,"children":6032},{"className":6031},[],[6033],{"type":998,"value":6034},"set1.union(set2, set3)",{"type":993,"tag":5865,"props":6036,"children":6037},{},[6038,6046,6055,6060],{"type":993,"tag":5897,"props":6039,"children":6040},{},[6041],{"type":993,"tag":1315,"props":6042,"children":6043},{},[6044],{"type":998,"value":6045},"|=",{"type":993,"tag":5897,"props":6047,"children":6048},{},[6049],{"type":993,"tag":1007,"props":6050,"children":6052},{"className":6051},[],[6053],{"type":998,"value":6054},"set1 &#124;= set2",{"type":993,"tag":5897,"props":6056,"children":6057},{},[6058],{"type":998,"value":6059},"Union update",{"type":993,"tag":5897,"props":6061,"children":6062},{},[6063],{"type":993,"tag":1007,"props":6064,"children":6066},{"className":6065},[],[6067],{"type":998,"value":6068},"set1 &#124;= {3, 4}",{"type":993,"tag":1001,"props":6070,"children":6071},{},[6072],{"type":998,"value":6073},"Choose the method that best fits your data source and requirements.",{"type":993,"tag":1001,"props":6075,"children":6076},{},[6077,6079,6085,6087,6092],{"type":998,"value":6078},"Learn more about ",{"type":993,"tag":6080,"props":6081,"children":6082},"a",{"href":480},[6083],{"type":998,"value":6084},"removing from sets",{"type":998,"value":6086}," and ",{"type":993,"tag":6080,"props":6088,"children":6089},{"href":507},[6090],{"type":998,"value":6091},"set operations",{"type":998,"value":6093}," to master complete set manipulation.",{"type":993,"tag":6095,"props":6096,"children":6099},"exercise",{"hint":6097,"prompt":6098},"Use the add() method to add items to a set, and check membership with 'in' before adding","Create a function that adds a new hobby to a person's hobbies set. If the hobby already exists, print a message saying it's already there.",[6100],{"type":993,"tag":1033,"props":6101,"children":6103},{"className":1035,"code":6102,"language":6,"meta":8,"style":8},"def add_new_hobby(hobbies, new_hobby):\n    # TODO: Check if new_hobby is already in hobbies\n    # TODO: If not, add it to the set\n    # TODO: Print appropriate message\n    pass\n\n# Test data\nmy_hobbies = {'reading', 'swimming', 'cooking'}\n\nprint(f\"Current hobbies: {my_hobbies}\")\nadd_new_hobby(my_hobbies, 'painting')\nadd_new_hobby(my_hobbies, 'reading')\nprint(f\"Updated hobbies: {my_hobbies}\")\n",[6104],{"type":993,"tag":1007,"props":6105,"children":6106},{"__ignoreMap":8},[6107,6126,6144,6160,6176,6184,6191,6199,6242,6249,6290,6307,6322],{"type":993,"tag":1042,"props":6108,"children":6109},{"class":1044,"line":12},[6110,6115,6121],{"type":993,"tag":1042,"props":6111,"children":6112},{"style":1063},[6113],{"type":998,"value":6114},"def",{"type":993,"tag":1042,"props":6116,"children":6118},{"style":6117},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[6119],{"type":998,"value":6120}," add_new_hobby",{"type":993,"tag":1042,"props":6122,"children":6123},{"style":1057},[6124],{"type":998,"value":6125},"(hobbies, new_hobby):\n",{"type":993,"tag":1042,"props":6127,"children":6128},{"class":1044,"line":27},[6129,6134,6139],{"type":993,"tag":1042,"props":6130,"children":6131},{"style":1048},[6132],{"type":998,"value":6133},"    # ",{"type":993,"tag":1042,"props":6135,"children":6136},{"style":1063},[6137],{"type":998,"value":6138},"TODO",{"type":993,"tag":1042,"props":6140,"children":6141},{"style":1048},[6142],{"type":998,"value":6143},": Check if new_hobby is already in hobbies\n",{"type":993,"tag":1042,"props":6145,"children":6146},{"class":1044,"line":36},[6147,6151,6155],{"type":993,"tag":1042,"props":6148,"children":6149},{"style":1048},[6150],{"type":998,"value":6133},{"type":993,"tag":1042,"props":6152,"children":6153},{"style":1063},[6154],{"type":998,"value":6138},{"type":993,"tag":1042,"props":6156,"children":6157},{"style":1048},[6158],{"type":998,"value":6159},": If not, add it to the set\n",{"type":993,"tag":1042,"props":6161,"children":6162},{"class":1044,"line":45},[6163,6167,6171],{"type":993,"tag":1042,"props":6164,"children":6165},{"style":1048},[6166],{"type":998,"value":6133},{"type":993,"tag":1042,"props":6168,"children":6169},{"style":1063},[6170],{"type":998,"value":6138},{"type":993,"tag":1042,"props":6172,"children":6173},{"style":1048},[6174],{"type":998,"value":6175},": Print appropriate message\n",{"type":993,"tag":1042,"props":6177,"children":6178},{"class":1044,"line":54},[6179],{"type":993,"tag":1042,"props":6180,"children":6181},{"style":1063},[6182],{"type":998,"value":6183},"    pass\n",{"type":993,"tag":1042,"props":6185,"children":6186},{"class":1044,"line":63},[6187],{"type":993,"tag":1042,"props":6188,"children":6189},{"emptyLinePlaceholder":13},[6190],{"type":998,"value":1149},{"type":993,"tag":1042,"props":6192,"children":6193},{"class":1044,"line":72},[6194],{"type":993,"tag":1042,"props":6195,"children":6196},{"style":1048},[6197],{"type":998,"value":6198},"# Test data\n",{"type":993,"tag":1042,"props":6200,"children":6201},{"class":1044,"line":81},[6202,6207,6211,6215,6220,6224,6229,6233,6238],{"type":993,"tag":1042,"props":6203,"children":6204},{"style":1057},[6205],{"type":998,"value":6206},"my_hobbies ",{"type":993,"tag":1042,"props":6208,"children":6209},{"style":1063},[6210],{"type":998,"value":1066},{"type":993,"tag":1042,"props":6212,"children":6213},{"style":1057},[6214],{"type":998,"value":1071},{"type":993,"tag":1042,"props":6216,"children":6217},{"style":1074},[6218],{"type":998,"value":6219},"'reading'",{"type":993,"tag":1042,"props":6221,"children":6222},{"style":1057},[6223],{"type":998,"value":1082},{"type":993,"tag":1042,"props":6225,"children":6226},{"style":1074},[6227],{"type":998,"value":6228},"'swimming'",{"type":993,"tag":1042,"props":6230,"children":6231},{"style":1057},[6232],{"type":998,"value":1082},{"type":993,"tag":1042,"props":6234,"children":6235},{"style":1074},[6236],{"type":998,"value":6237},"'cooking'",{"type":993,"tag":1042,"props":6239,"children":6240},{"style":1057},[6241],{"type":998,"value":1092},{"type":993,"tag":1042,"props":6243,"children":6244},{"class":1044,"line":91},[6245],{"type":993,"tag":1042,"props":6246,"children":6247},{"emptyLinePlaceholder":13},[6248],{"type":998,"value":1149},{"type":993,"tag":1042,"props":6250,"children":6251},{"class":1044,"line":100},[6252,6256,6260,6264,6269,6273,6278,6282,6286],{"type":993,"tag":1042,"props":6253,"children":6254},{"style":1098},[6255],{"type":998,"value":1101},{"type":993,"tag":1042,"props":6257,"children":6258},{"style":1057},[6259],{"type":998,"value":1106},{"type":993,"tag":1042,"props":6261,"children":6262},{"style":1063},[6263],{"type":998,"value":1111},{"type":993,"tag":1042,"props":6265,"children":6266},{"style":1074},[6267],{"type":998,"value":6268},"\"Current hobbies: ",{"type":993,"tag":1042,"props":6270,"children":6271},{"style":1098},[6272],{"type":998,"value":1121},{"type":993,"tag":1042,"props":6274,"children":6275},{"style":1057},[6276],{"type":998,"value":6277},"my_hobbies",{"type":993,"tag":1042,"props":6279,"children":6280},{"style":1098},[6281],{"type":998,"value":1131},{"type":993,"tag":1042,"props":6283,"children":6284},{"style":1074},[6285],{"type":998,"value":1136},{"type":993,"tag":1042,"props":6287,"children":6288},{"style":1057},[6289],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6291,"children":6292},{"class":1044,"line":109},[6293,6298,6303],{"type":993,"tag":1042,"props":6294,"children":6295},{"style":1057},[6296],{"type":998,"value":6297},"add_new_hobby(my_hobbies, ",{"type":993,"tag":1042,"props":6299,"children":6300},{"style":1074},[6301],{"type":998,"value":6302},"'painting'",{"type":993,"tag":1042,"props":6304,"children":6305},{"style":1057},[6306],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6308,"children":6309},{"class":1044,"line":118},[6310,6314,6318],{"type":993,"tag":1042,"props":6311,"children":6312},{"style":1057},[6313],{"type":998,"value":6297},{"type":993,"tag":1042,"props":6315,"children":6316},{"style":1074},[6317],{"type":998,"value":6219},{"type":993,"tag":1042,"props":6319,"children":6320},{"style":1057},[6321],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6323,"children":6324},{"class":1044,"line":127},[6325,6329,6333,6337,6342,6346,6350,6354,6358],{"type":993,"tag":1042,"props":6326,"children":6327},{"style":1098},[6328],{"type":998,"value":1101},{"type":993,"tag":1042,"props":6330,"children":6331},{"style":1057},[6332],{"type":998,"value":1106},{"type":993,"tag":1042,"props":6334,"children":6335},{"style":1063},[6336],{"type":998,"value":1111},{"type":993,"tag":1042,"props":6338,"children":6339},{"style":1074},[6340],{"type":998,"value":6341},"\"Updated hobbies: ",{"type":993,"tag":1042,"props":6343,"children":6344},{"style":1098},[6345],{"type":998,"value":1121},{"type":993,"tag":1042,"props":6347,"children":6348},{"style":1057},[6349],{"type":998,"value":6277},{"type":993,"tag":1042,"props":6351,"children":6352},{"style":1098},[6353],{"type":998,"value":1131},{"type":993,"tag":1042,"props":6355,"children":6356},{"style":1074},[6357],{"type":998,"value":1136},{"type":993,"tag":1042,"props":6359,"children":6360},{"style":1057},[6361],{"type":998,"value":1141},{"type":993,"tag":1403,"props":6363,"children":6365},{"id":6364},"solution-and-explanation",[6366],{"type":998,"value":6367},"Solution and Explanation 💡",{"type":993,"tag":6369,"props":6370,"children":6371},"details",{},[6372,6380,6716,6724],{"type":993,"tag":6373,"props":6374,"children":6377},"summary",{"className":6375},[6376],"cursor-pointer",[6378],{"type":998,"value":6379},"Click to see the complete solution",{"type":993,"tag":1029,"props":6381,"children":6382},{},[6383],{"type":993,"tag":1033,"props":6384,"children":6386},{"className":1035,"code":6385,"language":6,"meta":8,"style":8},"def add_new_hobby(hobbies, new_hobby):\n    # Check if new_hobby is already in hobbies\n    if new_hobby in hobbies:\n        print(f\"'{new_hobby}' is already in your hobbies!\")\n    else:\n        # Add it to the set\n        hobbies.add(new_hobby)\n        print(f\"Added '{new_hobby}' to your hobbies!\")\n\n# Test data\nmy_hobbies = {'reading', 'swimming', 'cooking'}\n\nprint(f\"Current hobbies: {my_hobbies}\")\nadd_new_hobby(my_hobbies, 'painting')\nadd_new_hobby(my_hobbies, 'reading')\nprint(f\"Updated hobbies: {my_hobbies}\")\n",[6387],{"type":993,"tag":1007,"props":6388,"children":6389},{"__ignoreMap":8},[6390,6405,6413,6435,6478,6491,6499,6507,6548,6555,6562,6601,6608,6647,6662,6677],{"type":993,"tag":1042,"props":6391,"children":6392},{"class":1044,"line":12},[6393,6397,6401],{"type":993,"tag":1042,"props":6394,"children":6395},{"style":1063},[6396],{"type":998,"value":6114},{"type":993,"tag":1042,"props":6398,"children":6399},{"style":6117},[6400],{"type":998,"value":6120},{"type":993,"tag":1042,"props":6402,"children":6403},{"style":1057},[6404],{"type":998,"value":6125},{"type":993,"tag":1042,"props":6406,"children":6407},{"class":1044,"line":27},[6408],{"type":993,"tag":1042,"props":6409,"children":6410},{"style":1048},[6411],{"type":998,"value":6412},"    # Check if new_hobby is already in hobbies\n",{"type":993,"tag":1042,"props":6414,"children":6415},{"class":1044,"line":36},[6416,6421,6426,6430],{"type":993,"tag":1042,"props":6417,"children":6418},{"style":1063},[6419],{"type":998,"value":6420},"    if",{"type":993,"tag":1042,"props":6422,"children":6423},{"style":1057},[6424],{"type":998,"value":6425}," new_hobby ",{"type":993,"tag":1042,"props":6427,"children":6428},{"style":1063},[6429],{"type":998,"value":2117},{"type":993,"tag":1042,"props":6431,"children":6432},{"style":1057},[6433],{"type":998,"value":6434}," hobbies:\n",{"type":993,"tag":1042,"props":6436,"children":6437},{"class":1044,"line":45},[6438,6443,6447,6451,6456,6460,6465,6469,6474],{"type":993,"tag":1042,"props":6439,"children":6440},{"style":1098},[6441],{"type":998,"value":6442},"        print",{"type":993,"tag":1042,"props":6444,"children":6445},{"style":1057},[6446],{"type":998,"value":1106},{"type":993,"tag":1042,"props":6448,"children":6449},{"style":1063},[6450],{"type":998,"value":1111},{"type":993,"tag":1042,"props":6452,"children":6453},{"style":1074},[6454],{"type":998,"value":6455},"\"'",{"type":993,"tag":1042,"props":6457,"children":6458},{"style":1098},[6459],{"type":998,"value":1121},{"type":993,"tag":1042,"props":6461,"children":6462},{"style":1057},[6463],{"type":998,"value":6464},"new_hobby",{"type":993,"tag":1042,"props":6466,"children":6467},{"style":1098},[6468],{"type":998,"value":1131},{"type":993,"tag":1042,"props":6470,"children":6471},{"style":1074},[6472],{"type":998,"value":6473},"' is already in your hobbies!\"",{"type":993,"tag":1042,"props":6475,"children":6476},{"style":1057},[6477],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6479,"children":6480},{"class":1044,"line":54},[6481,6486],{"type":993,"tag":1042,"props":6482,"children":6483},{"style":1063},[6484],{"type":998,"value":6485},"    else",{"type":993,"tag":1042,"props":6487,"children":6488},{"style":1057},[6489],{"type":998,"value":6490},":\n",{"type":993,"tag":1042,"props":6492,"children":6493},{"class":1044,"line":63},[6494],{"type":993,"tag":1042,"props":6495,"children":6496},{"style":1048},[6497],{"type":998,"value":6498},"        # Add it to the set\n",{"type":993,"tag":1042,"props":6500,"children":6501},{"class":1044,"line":72},[6502],{"type":993,"tag":1042,"props":6503,"children":6504},{"style":1057},[6505],{"type":998,"value":6506},"        hobbies.add(new_hobby)\n",{"type":993,"tag":1042,"props":6508,"children":6509},{"class":1044,"line":81},[6510,6514,6518,6522,6527,6531,6535,6539,6544],{"type":993,"tag":1042,"props":6511,"children":6512},{"style":1098},[6513],{"type":998,"value":6442},{"type":993,"tag":1042,"props":6515,"children":6516},{"style":1057},[6517],{"type":998,"value":1106},{"type":993,"tag":1042,"props":6519,"children":6520},{"style":1063},[6521],{"type":998,"value":1111},{"type":993,"tag":1042,"props":6523,"children":6524},{"style":1074},[6525],{"type":998,"value":6526},"\"Added '",{"type":993,"tag":1042,"props":6528,"children":6529},{"style":1098},[6530],{"type":998,"value":1121},{"type":993,"tag":1042,"props":6532,"children":6533},{"style":1057},[6534],{"type":998,"value":6464},{"type":993,"tag":1042,"props":6536,"children":6537},{"style":1098},[6538],{"type":998,"value":1131},{"type":993,"tag":1042,"props":6540,"children":6541},{"style":1074},[6542],{"type":998,"value":6543},"' to your hobbies!\"",{"type":993,"tag":1042,"props":6545,"children":6546},{"style":1057},[6547],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6549,"children":6550},{"class":1044,"line":91},[6551],{"type":993,"tag":1042,"props":6552,"children":6553},{"emptyLinePlaceholder":13},[6554],{"type":998,"value":1149},{"type":993,"tag":1042,"props":6556,"children":6557},{"class":1044,"line":100},[6558],{"type":993,"tag":1042,"props":6559,"children":6560},{"style":1048},[6561],{"type":998,"value":6198},{"type":993,"tag":1042,"props":6563,"children":6564},{"class":1044,"line":109},[6565,6569,6573,6577,6581,6585,6589,6593,6597],{"type":993,"tag":1042,"props":6566,"children":6567},{"style":1057},[6568],{"type":998,"value":6206},{"type":993,"tag":1042,"props":6570,"children":6571},{"style":1063},[6572],{"type":998,"value":1066},{"type":993,"tag":1042,"props":6574,"children":6575},{"style":1057},[6576],{"type":998,"value":1071},{"type":993,"tag":1042,"props":6578,"children":6579},{"style":1074},[6580],{"type":998,"value":6219},{"type":993,"tag":1042,"props":6582,"children":6583},{"style":1057},[6584],{"type":998,"value":1082},{"type":993,"tag":1042,"props":6586,"children":6587},{"style":1074},[6588],{"type":998,"value":6228},{"type":993,"tag":1042,"props":6590,"children":6591},{"style":1057},[6592],{"type":998,"value":1082},{"type":993,"tag":1042,"props":6594,"children":6595},{"style":1074},[6596],{"type":998,"value":6237},{"type":993,"tag":1042,"props":6598,"children":6599},{"style":1057},[6600],{"type":998,"value":1092},{"type":993,"tag":1042,"props":6602,"children":6603},{"class":1044,"line":118},[6604],{"type":993,"tag":1042,"props":6605,"children":6606},{"emptyLinePlaceholder":13},[6607],{"type":998,"value":1149},{"type":993,"tag":1042,"props":6609,"children":6610},{"class":1044,"line":127},[6611,6615,6619,6623,6627,6631,6635,6639,6643],{"type":993,"tag":1042,"props":6612,"children":6613},{"style":1098},[6614],{"type":998,"value":1101},{"type":993,"tag":1042,"props":6616,"children":6617},{"style":1057},[6618],{"type":998,"value":1106},{"type":993,"tag":1042,"props":6620,"children":6621},{"style":1063},[6622],{"type":998,"value":1111},{"type":993,"tag":1042,"props":6624,"children":6625},{"style":1074},[6626],{"type":998,"value":6268},{"type":993,"tag":1042,"props":6628,"children":6629},{"style":1098},[6630],{"type":998,"value":1121},{"type":993,"tag":1042,"props":6632,"children":6633},{"style":1057},[6634],{"type":998,"value":6277},{"type":993,"tag":1042,"props":6636,"children":6637},{"style":1098},[6638],{"type":998,"value":1131},{"type":993,"tag":1042,"props":6640,"children":6641},{"style":1074},[6642],{"type":998,"value":1136},{"type":993,"tag":1042,"props":6644,"children":6645},{"style":1057},[6646],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6648,"children":6649},{"class":1044,"line":136},[6650,6654,6658],{"type":993,"tag":1042,"props":6651,"children":6652},{"style":1057},[6653],{"type":998,"value":6297},{"type":993,"tag":1042,"props":6655,"children":6656},{"style":1074},[6657],{"type":998,"value":6302},{"type":993,"tag":1042,"props":6659,"children":6660},{"style":1057},[6661],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6663,"children":6664},{"class":1044,"line":146},[6665,6669,6673],{"type":993,"tag":1042,"props":6666,"children":6667},{"style":1057},[6668],{"type":998,"value":6297},{"type":993,"tag":1042,"props":6670,"children":6671},{"style":1074},[6672],{"type":998,"value":6219},{"type":993,"tag":1042,"props":6674,"children":6675},{"style":1057},[6676],{"type":998,"value":1141},{"type":993,"tag":1042,"props":6678,"children":6679},{"class":1044,"line":155},[6680,6684,6688,6692,6696,6700,6704,6708,6712],{"type":993,"tag":1042,"props":6681,"children":6682},{"style":1098},[6683],{"type":998,"value":1101},{"type":993,"tag":1042,"props":6685,"children":6686},{"style":1057},[6687],{"type":998,"value":1106},{"type":993,"tag":1042,"props":6689,"children":6690},{"style":1063},[6691],{"type":998,"value":1111},{"type":993,"tag":1042,"props":6693,"children":6694},{"style":1074},[6695],{"type":998,"value":6341},{"type":993,"tag":1042,"props":6697,"children":6698},{"style":1098},[6699],{"type":998,"value":1121},{"type":993,"tag":1042,"props":6701,"children":6702},{"style":1057},[6703],{"type":998,"value":6277},{"type":993,"tag":1042,"props":6705,"children":6706},{"style":1098},[6707],{"type":998,"value":1131},{"type":993,"tag":1042,"props":6709,"children":6710},{"style":1074},[6711],{"type":998,"value":1136},{"type":993,"tag":1042,"props":6713,"children":6714},{"style":1057},[6715],{"type":998,"value":1141},{"type":993,"tag":1001,"props":6717,"children":6718},{},[6719],{"type":993,"tag":1315,"props":6720,"children":6721},{},[6722],{"type":998,"value":6723},"Key Learning Points:",{"type":993,"tag":1321,"props":6725,"children":6726},{},[6727,6746,6764,6775],{"type":993,"tag":1325,"props":6728,"children":6729},{},[6730,6732,6737,6739,6744],{"type":998,"value":6731},"📌 ",{"type":993,"tag":1315,"props":6733,"children":6734},{},[6735],{"type":998,"value":6736},"Membership check",{"type":998,"value":6738},": Use ",{"type":993,"tag":1007,"props":6740,"children":6742},{"className":6741},[],[6743],{"type":998,"value":2117},{"type":998,"value":6745}," to check if item already exists before adding",{"type":993,"tag":1325,"props":6747,"children":6748},{},[6749,6750,6755,6756,6762],{"type":998,"value":6731},{"type":993,"tag":1315,"props":6751,"children":6752},{},[6753],{"type":998,"value":6754},"add() method",{"type":998,"value":6738},{"type":993,"tag":1007,"props":6757,"children":6759},{"className":6758},[],[6760],{"type":998,"value":6761},"set.add(item)",{"type":998,"value":6763}," to add single items to a set",{"type":993,"tag":1325,"props":6765,"children":6766},{},[6767,6768,6773],{"type":998,"value":6731},{"type":993,"tag":1315,"props":6769,"children":6770},{},[6771],{"type":998,"value":6772},"Duplicate handling",{"type":998,"value":6774},": Sets automatically prevent duplicates, but checking first gives better user feedback",{"type":993,"tag":1325,"props":6776,"children":6777},{},[6778,6779,6784],{"type":998,"value":6731},{"type":993,"tag":1315,"props":6780,"children":6781},{},[6782],{"type":998,"value":6783},"User feedback",{"type":998,"value":6785},": Print messages to inform about the operation result",{"type":993,"tag":1286,"props":6787,"children":6789},{"id":6788},"test-your-knowledge",[6790],{"type":998,"value":6791},"Test Your Knowledge",{"type":993,"tag":1001,"props":6793,"children":6794},{},[6795],{"type":998,"value":6796},"Test what you've learned about adding elements to sets:",{"type":993,"tag":6798,"props":6799,"children":6803},"redirect-button",{"icon":6800,"label":6801,"url":6802},"pi pi-send","Take Quiz","/tutorial-quiz/python/adding-to-sets",[],{"type":993,"tag":1286,"props":6805,"children":6807},{"id":6806},"whats-next",[6808],{"type":998,"value":6809},"What's Next?",{"type":993,"tag":1001,"props":6811,"children":6812},{},[6813],{"type":998,"value":6814},"Now that you can add elements to sets, you're ready to learn how to remove elements. Understanding removal operations is essential for maintaining and updating your set collections.",{"type":993,"tag":1001,"props":6816,"children":6817},{},[6818,6820,6824],{"type":998,"value":6819},"Ready to continue? Check out our lesson on ",{"type":993,"tag":6080,"props":6821,"children":6822},{"href":480},[6823],{"type":998,"value":481},{"type":998,"value":6825},".",{"type":993,"tag":6827,"props":6828,"children":6829},"style",{},[6830],{"type":998,"value":6831},"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":6833},[6834,6839,6844,6848,6852,6855,6856],{"id":1288,"depth":27,"text":1291,"children":6835},[6836,6837,6838],{"id":1405,"depth":36,"text":1408},{"id":1734,"depth":36,"text":1737},{"id":2194,"depth":36,"text":2197},{"id":2621,"depth":27,"text":2624,"children":6840},[6841,6842,6843],{"id":2756,"depth":36,"text":2759},{"id":3187,"depth":36,"text":3190},{"id":3585,"depth":36,"text":3588},{"id":4038,"depth":27,"text":4041,"children":6845},[6846,6847],{"id":4127,"depth":36,"text":4130},{"id":4527,"depth":36,"text":4530},{"id":4856,"depth":27,"text":4859,"children":6849},[6850,6851],{"id":4976,"depth":36,"text":4979},{"id":5461,"depth":36,"text":5464},{"id":5847,"depth":27,"text":5850,"children":6853},[6854],{"id":6364,"depth":36,"text":6367},{"id":6788,"depth":27,"text":6791},{"id":6806,"depth":27,"text":6809},1782373741331]