[{"data":1,"prerenderedAt":6012},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/modifying-lists":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},"/python/python-tuples","Python Tuples","Master Python tuples - immutable sequences perfect for storing related data that shouldn't change. Learn creation, access, and manipulation techniques.","python-tuples",40,"content:python:40.python-tuples.md","python/40.python-tuples.md","python/40.python-tuples",[379,388,397,406,415,424,433],{"_path":380,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":381,"description":382,"slug":383,"parentId":370,"order":384,"_type":15,"_id":385,"_source":17,"_file":386,"_stem":387,"_extension":20},"/python/creating-tuples","Creating Tuples","Learn different ways to create Python tuples, from basic syntax to advanced techniques. Master tuple initialization and understand when to use tuples.","creating-tuples",41,"content:python:41.creating-tuples.md","python/41.creating-tuples.md","python/41.creating-tuples",{"_path":389,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":390,"description":391,"slug":392,"parentId":370,"order":393,"_type":15,"_id":394,"_source":17,"_file":395,"_stem":396,"_extension":20},"/python/reading-tuple-data","Reading Tuple Data","Master accessing tuple elements through indexing, slicing, and searching. Learn efficient patterns for reading and working with tuple data.","reading-tuple-data",42,"content:python:42.reading-tuple-data.md","python/42.reading-tuple-data.md","python/42.reading-tuple-data",{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},"/python/changing-tuples","Changing Tuples","Understand tuple immutability and learn techniques for working with unchangeable data. Master creating modified tuple versions and handling immutable constraints.","changing-tuples",43,"content:python:43.changing-tuples.md","python/43.changing-tuples.md","python/43.changing-tuples",{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},"/python/tuple-unpacking","Tuple Unpacking","Master tuple unpacking for elegant variable assignment, function returns, and data extraction. Learn Python's powerful unpacking syntax and patterns.","tuple-unpacking",44,"content:python:44.tuple-unpacking.md","python/44.tuple-unpacking.md","python/44.tuple-unpacking",{"_path":416,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":417,"description":418,"slug":419,"parentId":370,"order":420,"_type":15,"_id":421,"_source":17,"_file":422,"_stem":423,"_extension":20},"/python/iterating-tuples","Iterating Tuples","Master tuple iteration techniques for processing sequence data. Learn basic loops, enumerate, nested iteration, and advanced patterns for efficient data processing.","iterating-tuples",45,"content:python:45.iterating-tuples.md","python/45.iterating-tuples.md","python/45.iterating-tuples",{"_path":425,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":426,"description":427,"slug":428,"parentId":370,"order":429,"_type":15,"_id":430,"_source":17,"_file":431,"_stem":432,"_extension":20},"/python/merging-tuples","Merging Tuples","Learn techniques for combining and merging tuples to create larger data structures. Master concatenation, joining multiple tuples, and advanced merging patterns.","merging-tuples",46,"content:python:46.merging-tuples.md","python/46.merging-tuples.md","python/46.merging-tuples",{"_path":434,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":436,"slug":437,"parentId":370,"order":438,"_type":15,"_id":439,"_source":17,"_file":440,"_stem":441,"_extension":20},"/python/tuple-operations","Tuple Operations","Master comprehensive tuple operations including built-in functions, mathematical operations, comparisons, and advanced techniques for efficient tuple manipulation.","tuple-operations",47,"content:python:47.tuple-operations.md","python/47.tuple-operations.md","python/47.tuple-operations",{"_path":443,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":444,"description":445,"slug":446,"order":447,"isParent":13,"icon":14,"_type":15,"_id":448,"_source":17,"_file":449,"_stem":450,"_extension":20,"children":451},"/python/python-sets","Python Sets","Discover Python sets - unique collections that automatically eliminate duplicates and provide powerful mathematical operations for data filtering and analysis.","python-sets",48,"content:python:48.python-sets.md","python/48.python-sets.md","python/48.python-sets",[452,461,470,479,488,497,506],{"_path":453,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":454,"description":455,"slug":456,"parentId":443,"order":457,"_type":15,"_id":458,"_source":17,"_file":459,"_stem":460,"_extension":20},"/python/creating-sets","Creating Sets","Learn multiple ways to create sets in Python including literal syntax, set() function, and set comprehensions. Master set creation from different data sources.","creating-sets",49,"content:python:49.creating-sets.md","python/49.creating-sets.md","python/49.creating-sets",{"_path":462,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":463,"description":464,"slug":465,"parentId":443,"order":466,"_type":15,"_id":467,"_source":17,"_file":468,"_stem":469,"_extension":20},"/python/reading-set-data","Reading Set Data","Learn how to access and examine set data in Python including membership testing, iteration, size checking, and converting sets to other data types.","reading-set-data",50,"content:python:50.reading-set-data.md","python/50.reading-set-data.md","python/50.reading-set-data",{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},"/python/adding-to-sets","Adding to Sets","Learn how to add elements to sets in Python using add(), update(), and union operations. Master growing sets dynamically with single items and multiple elements.","adding-to-sets",51,"content:python:51.adding-to-sets.md","python/51.adding-to-sets.md","python/51.adding-to-sets",{"_path":480,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":481,"description":482,"slug":483,"parentId":443,"order":484,"_type":15,"_id":485,"_source":17,"_file":486,"_stem":487,"_extension":20},"/python/removing-from-sets","Removing from Sets","Learn how to remove elements from Python sets using different methods like remove(), discard(), pop(), and clear()","removing-from-sets",52,"content:python:52.removing-from-sets.md","python/52.removing-from-sets.md","python/52.removing-from-sets",{"_path":489,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":490,"description":491,"slug":492,"parentId":443,"order":493,"_type":15,"_id":494,"_source":17,"_file":495,"_stem":496,"_extension":20},"/python/iterating-sets","Iterating Sets","Learn different ways to iterate through Python sets using for loops, comprehensions, and built-in functions","iterating-sets",53,"content:python:53.iterating-sets.md","python/53.iterating-sets.md","python/53.iterating-sets",{"_path":498,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":499,"description":500,"slug":501,"parentId":443,"order":502,"_type":15,"_id":503,"_source":17,"_file":504,"_stem":505,"_extension":20},"/python/combining-sets","Combining Sets","Learn how to combine Python sets using union, intersection, difference, and other set operations","combining-sets",54,"content:python:54.combining-sets.md","python/54.combining-sets.md","python/54.combining-sets",{"_path":507,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":509,"slug":510,"parentId":443,"order":511,"_type":15,"_id":512,"_source":17,"_file":513,"_stem":514,"_extension":20},"/python/set-operations","Set Operations","Learn advanced Python set operations including comparisons, subsets, supersets, and mathematical set relationships","set-operations",55,"content:python:55.set-operations.md","python/55.set-operations.md","python/55.set-operations",{"_path":516,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":517,"description":518,"slug":519,"order":520,"isParent":13,"icon":14,"_type":15,"_id":521,"_source":17,"_file":522,"_stem":523,"_extension":20,"children":524},"/python/python-dictionaries","Python Dictionaries","Learn about Python dictionaries - key-value data structures for storing and organizing related information","python-dictionaries",56,"content:python:56.python-dictionaries.md","python/56.python-dictionaries.md","python/56.python-dictionaries",[525,534,543,552,561,570,579,588,597],{"_path":526,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":527,"description":528,"slug":529,"parentId":516,"order":530,"_type":15,"_id":531,"_source":17,"_file":532,"_stem":533,"_extension":20},"/python/creating-dictionaries","Creating Dictionaries","Learn different methods to create Python dictionaries using literals, constructors, and comprehensions","creating-dictionaries",57,"content:python:57.creating-dictionaries.md","python/57.creating-dictionaries.md","python/57.creating-dictionaries",{"_path":535,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":536,"description":537,"slug":538,"parentId":516,"order":539,"_type":15,"_id":540,"_source":17,"_file":541,"_stem":542,"_extension":20},"/python/getting-dictionary-values","Getting Dictionary Values","Learn safe and efficient methods to retrieve data from Python dictionaries using various access techniques","getting-dictionary-values",58,"content:python:58.getting-dictionary-values.md","python/58.getting-dictionary-values.md","python/58.getting-dictionary-values",{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},"/python/updating-dictionaries","Updating Dictionaries","Learn how to modify and maintain Python dictionary data using various update methods and techniques","updating-dictionaries",59,"content:python:59.updating-dictionaries.md","python/59.updating-dictionaries.md","python/59.updating-dictionaries",{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},"/python/adding-dictionary-items","Adding Dictionary Items","Learn effective techniques for adding new items to Python dictionaries with various methods and best practices","adding-dictionary-items",60,"content:python:60.adding-dictionary-items.md","python/60.adding-dictionary-items.md","python/60.adding-dictionary-items",{"_path":562,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":563,"description":564,"slug":565,"parentId":516,"order":566,"_type":15,"_id":567,"_source":17,"_file":568,"_stem":569,"_extension":20},"/python/deleting-dictionary-items","Deleting Dictionary Items","Master safe and efficient techniques for removing items from Python dictionaries with various methods and error handling","deleting-dictionary-items",61,"content:python:61.deleting-dictionary-items.md","python/61.deleting-dictionary-items.md","python/61.deleting-dictionary-items",{"_path":571,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":572,"description":573,"slug":574,"parentId":516,"order":575,"_type":15,"_id":576,"_source":17,"_file":577,"_stem":578,"_extension":20},"/python/looping-dictionaries","Looping Dictionaries","Learn efficient techniques for iterating through Python dictionaries using keys, values, and items","looping-dictionaries",62,"content:python:62.looping-dictionaries.md","python/62.looping-dictionaries.md","python/62.looping-dictionaries",{"_path":580,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":581,"description":582,"slug":583,"parentId":516,"order":584,"_type":15,"_id":585,"_source":17,"_file":586,"_stem":587,"_extension":20},"/python/dictionary-copies","Dictionary Copies","Learn safe techniques for duplicating Python dictionaries using shallow and deep copy methods","dictionary-copies",63,"content:python:63.dictionary-copies.md","python/63.dictionary-copies.md","python/63.dictionary-copies",{"_path":589,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":590,"description":591,"slug":592,"parentId":516,"order":593,"_type":15,"_id":594,"_source":17,"_file":595,"_stem":596,"_extension":20},"/python/multi-level-dictionaries","Multi-level Dictionaries","Master working with nested Python dictionaries for complex data structures and hierarchical information","multi-level-dictionaries",64,"content:python:64.multi-level-dictionaries.md","python/64.multi-level-dictionaries.md","python/64.multi-level-dictionaries",{"_path":598,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":599,"description":600,"slug":601,"parentId":516,"order":602,"_type":15,"_id":603,"_source":17,"_file":604,"_stem":605,"_extension":20},"/python/dictionary-tools","Dictionary Tools","Explore powerful built-in functions and advanced techniques for efficient Python dictionary manipulation and analysis","dictionary-tools",65,"content:python:65.dictionary-tools.md","python/65.dictionary-tools.md","python/65.dictionary-tools",{"_path":607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":608,"description":609,"slug":610,"order":611,"isParent":13,"icon":14,"_type":15,"_id":612,"_source":17,"_file":613,"_stem":614,"_extension":20,"children":615},"/python/python-functions","Python Functions","Learn how to create and use Python functions to organize code into reusable, modular components that make programs more efficient and maintainable","python-functions",66,"content:python:66.python-functions.md","python/66.python-functions.md","python/66.python-functions",[616,625,634,643,652,661],{"_path":617,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":618,"description":619,"slug":620,"parentId":607,"order":621,"_type":15,"_id":622,"_source":17,"_file":623,"_stem":624,"_extension":20},"/python/function-basics","Function Basics","Learn the fundamentals of creating and using Python functions to organize code into reusable, modular components","function-basics",67,"content:python:67.function-basics.md","python/67.function-basics.md","python/67.function-basics",{"_path":626,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":627,"description":628,"slug":629,"parentId":607,"order":630,"_type":15,"_id":631,"_source":17,"_file":632,"_stem":633,"_extension":20},"/python/function-parameters","Function Parameters","Master different types of Python function parameters including positional, keyword, default, and variable-length arguments","function-parameters",68,"content:python:68.function-parameters.md","python/68.function-parameters.md","python/68.function-parameters",{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},"/python/returning-values","Returning Values","Learn different ways Python functions return data including single values, multiple values, and conditional returns","returning-values",69,"content:python:69.returning-values.md","python/69.returning-values.md","python/69.returning-values",{"_path":644,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":645,"description":646,"slug":647,"parentId":607,"order":648,"_type":15,"_id":649,"_source":17,"_file":650,"_stem":651,"_extension":20},"/python/variable-scope","Variable Scope","Understand Python variable scope including local, global, and nonlocal variables and how they affect function behavior","variable-scope",70,"content:python:70.variable-scope.md","python/70.variable-scope.md","python/70.variable-scope",{"_path":653,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":654,"description":655,"slug":656,"parentId":607,"order":657,"_type":15,"_id":658,"_source":17,"_file":659,"_stem":660,"_extension":20},"/python/anonymous-functions","Anonymous Functions","Learn to create and use Python lambda functions for concise, inline function definitions and functional programming patterns","anonymous-functions",71,"content:python:71.anonymous-functions.md","python/71.anonymous-functions.md","python/71.anonymous-functions",{"_path":662,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":663,"description":664,"slug":665,"parentId":607,"order":666,"_type":15,"_id":667,"_source":17,"_file":668,"_stem":669,"_extension":20},"/python/function-recursion","Function Recursion","Master recursive functions in Python by learning how functions can call themselves to solve complex problems with elegant, mathematical solutions","function-recursion",72,"content:python:72.function-recursion.md","python/72.function-recursion.md","python/72.function-recursion",{"_path":671,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":672,"description":673,"slug":674,"order":675,"isParent":13,"icon":14,"_type":15,"_id":676,"_source":17,"_file":677,"_stem":678,"_extension":20,"children":679},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/python/file-operations","File Operations","Master Python file handling with reading, writing, and managing files for data persistence and real-world applications","file-operations",89,"content:python:89.file-operations.md","python/89.file-operations.md","python/89.file-operations",[817,826,835,844],{"_path":818,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":819,"description":820,"slug":821,"parentId":808,"order":822,"_type":15,"_id":823,"_source":17,"_file":824,"_stem":825,"_extension":20},"/python/file-basics","File Basics","Learn fundamental Python file operations including opening files, understanding file modes, using context managers, and basic file handling concepts","file-basics",90,"content:python:90.file-basics.md","python/90.file-basics.md","python/90.file-basics",{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},"/python/reading-files","Reading Files","Master Python file reading techniques including reading entire files, line-by-line processing, and handling different file formats for efficient data processing","reading-files",91,"content:python:91.reading-files.md","python/91.reading-files.md","python/91.reading-files",{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},"/python/writing-files","Writing Files","Learn Python file writing techniques including creating new files, appending content, updating existing files, and saving different data formats safely","writing-files",92,"content:python:92.writing-files.md","python/92.writing-files.md","python/92.writing-files",{"_path":845,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":846,"description":847,"slug":848,"parentId":808,"order":849,"_type":15,"_id":850,"_source":17,"_file":851,"_stem":852,"_extension":20},"/python/file-management","File Management","Learn Python file management techniques including checking file properties, organizing files, directory operations, and implementing file system maintenance tasks","file-management",93,"content:python:93.file-management.md","python/93.file-management.md","python/93.file-management",{"_path":854,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":855,"description":856,"slug":857,"order":858,"isParent":13,"icon":14,"_type":15,"_id":859,"_source":17,"_file":860,"_stem":861,"_extension":20,"children":862},"/python/code-organization","Code Organization","Master Python code organization with modules, built-in libraries, and path management for creating maintainable and reusable applications","code-organization",94,"content:python:94.code-organization.md","python/94.code-organization.md","python/94.code-organization",[863,872,881],{"_path":864,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":865,"description":866,"slug":867,"parentId":854,"order":868,"_type":15,"_id":869,"_source":17,"_file":870,"_stem":871,"_extension":20},"/python/creating-modules","Creating Modules","Learn how to create custom Python modules, organize functions and classes, write reusable code components, and design effective module structures","creating-modules",95,"content:python:95.creating-modules.md","python/95.creating-modules.md","python/95.creating-modules",{"_path":873,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":874,"description":875,"slug":876,"parentId":854,"order":877,"_type":15,"_id":878,"_source":17,"_file":879,"_stem":880,"_extension":20},"/python/using-built-in-modules","Using Built-in Modules","Discover Python's extensive standard library and learn to effectively use built-in modules for common programming tasks, data processing, and system operations","using-built-in-modules",96,"content:python:96.using-built-in-modules.md","python/96.using-built-in-modules.md","python/96.using-built-in-modules",{"_path":882,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":883,"description":884,"slug":885,"parentId":854,"order":886,"_type":15,"_id":887,"_source":17,"_file":888,"_stem":889,"_extension":20},"/python/module-paths","Module Paths","Understand Python's module search system, manage import paths, work with packages, and organize larger projects with proper module path management","module-paths",97,"content:python:97.module-paths.md","python/97.module-paths.md","python/97.module-paths",{"_path":891,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":892,"description":893,"slug":894,"order":895,"isParent":13,"icon":14,"_type":15,"_id":896,"_source":17,"_file":897,"_stem":898,"_extension":20,"children":899,"expanded":13},"/python/reference-materials","Reference Materials","Comprehensive Python reference materials including reserved words, built-in functions, and operation guides for quick lookup and development support","reference-materials",98,"content:python:98.reference-materials.md","python/98.reference-materials.md","python/98.reference-materials",[900,909,918,927,936,945,953,961,970],{"_path":901,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":903,"slug":904,"parentId":891,"order":905,"_type":15,"_id":906,"_source":17,"_file":907,"_stem":908,"_extension":20},"/python/reserved-words","Reserved Words","Complete reference of Python keywords and reserved words with descriptions, usage examples, and syntax guidelines","reserved-words",99,"content:python:99.reserved-words.md","python/99.reserved-words.md","python/99.reserved-words",{"_path":910,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":911,"description":912,"slug":913,"parentId":891,"order":914,"_type":15,"_id":915,"_source":17,"_file":916,"_stem":917,"_extension":20},"/python/built-in-functions","Built-in Functions","Comprehensive reference of Python's built-in functions with parameters, return values, and practical usage examples","built-in-functions",100,"content:python:100.built-in-functions.md","python/100.built-in-functions.md","python/100.built-in-functions",{"_path":919,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":920,"description":921,"slug":922,"parentId":891,"order":923,"_type":15,"_id":924,"_source":17,"_file":925,"_stem":926,"_extension":20},"/python/string-operations","String Operations","Complete reference of Python string methods, operations, and formatting techniques with examples and use cases","string-operations",101,"content:python:101.string-operations.md","python/101.string-operations.md","python/101.string-operations",{"_path":928,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":929,"description":930,"slug":931,"parentId":891,"order":932,"_type":15,"_id":933,"_source":17,"_file":934,"_stem":935,"_extension":20},"/python/list-operations","List Operations","Complete reference of Python list methods, operations, and manipulation techniques with examples and performance notes","list-operations",102,"content:python:102.list-operations.md","python/102.list-operations.md","python/102.list-operations",{"_path":937,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":938,"description":939,"slug":940,"parentId":891,"order":941,"_type":15,"_id":942,"_source":17,"_file":943,"_stem":944,"_extension":20},"/python/dictionary-operations","Dictionary Operations","Complete reference of Python dictionary methods, operations, and manipulation techniques with examples and use cases","dictionary-operations",103,"content:python:103.dictionary-operations.md","python/103.dictionary-operations.md","python/103.dictionary-operations",{"_path":946,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":947,"slug":948,"parentId":891,"order":949,"_type":15,"_id":950,"_source":17,"_file":951,"_stem":952,"_extension":20},"/python/tuple-methods","Complete reference of Python tuple operations, methods, and techniques with examples and use cases","tuple-methods",104,"content:python:104.tuple-methods.md","python/104.tuple-methods.md","python/104.tuple-methods",{"_path":954,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":955,"slug":956,"parentId":891,"order":957,"_type":15,"_id":958,"_source":17,"_file":959,"_stem":960,"_extension":20},"/python/set-methods","Complete reference of Python set operations, methods, and mathematical set operations with examples and use cases","set-methods",105,"content:python:105.set-methods.md","python/105.set-methods.md","python/105.set-methods",{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},"/python/file-operations-reference","File Operations Reference","Complete reference of Python file operations, modes, methods, and file handling techniques with examples","file-operations-reference",106,"content:python:106.file-operations-reference.md","python/106.file-operations-reference.md","python/106.file-operations-reference",{"_path":971,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":972,"description":973,"slug":974,"parentId":891,"order":975,"_type":15,"_id":976,"_source":17,"_file":977,"_stem":978,"_extension":20},"/python/error-types","Error Types","Complete reference of Python exception types, error handling patterns, and debugging techniques with examples","error-types",107,"content:python:107.error-types.md","python/107.error-types.md","python/107.error-types",{"_path":980,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":981,"description":10,"slug":982,"order":983,"icon":14,"_type":15,"_id":984,"_source":17,"_file":985,"_stem":986,"_extension":20},"/python","Introduction","python-tutorial",0,"content:python:index.md","python/index.md","python/index",[297],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":270,"order":302,"body":989,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},{"type":990,"children":991,"toc":5988},"root",[992,1000,1006,1011,1260,1267,1272,1277,1373,1380,1385,1804,1810,1815,1903,1908,1914,1919,2474,2479,2485,2490,2616,2622,2627,2915,2921,2926,2999,3005,3010,3669,3675,3680,3686,3691,4536,4542,4547,4553,4558,5225,5420,5426,5790,5796,5801,5914,5920,5925,5930,5936,5970,5982],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":301},[997],{"type":998,"value":999},"text","🔧 Modifying Lists",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Modifying lists is one of the most fundamental operations in Python programming. Unlike immutable data types, lists allow you to change their contents after creation - you can update individual elements, replace multiple items, or transform entire sections of your list.",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"Understanding how to modify lists effectively is essential for data manipulation, updating records, and maintaining dynamic collections that change based on user input or program logic.",{"type":993,"tag":1012,"props":1013,"children":1014},"code-try",{},[1015],{"type":993,"tag":1016,"props":1017,"children":1020},"pre",{"className":1018,"code":1019,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic list modification examples\nfruits = [\"apple\", \"banana\", \"cherry\"]\nprint(\"Original:\", fruits)\n\n# Modify single element\nfruits[1] = \"blueberry\"\nprint(\"After change:\", fruits)\n\n# Modify multiple elements\nfruits[0:2] = [\"orange\", \"grape\"]\nprint(\"After slice change:\", fruits)\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1086,1110,1118,1126,1153,1173,1180,1188,1240],{"type":993,"tag":1026,"props":1027,"children":1029},"span",{"class":1028,"line":12},"line",[1030],{"type":993,"tag":1026,"props":1031,"children":1033},{"style":1032},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1034],{"type":998,"value":1035},"# Basic list modification examples\n",{"type":993,"tag":1026,"props":1037,"children":1038},{"class":1028,"line":27},[1039,1045,1051,1056,1062,1067,1072,1076,1081],{"type":993,"tag":1026,"props":1040,"children":1042},{"style":1041},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1043],{"type":998,"value":1044},"fruits ",{"type":993,"tag":1026,"props":1046,"children":1048},{"style":1047},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1049],{"type":998,"value":1050},"=",{"type":993,"tag":1026,"props":1052,"children":1053},{"style":1041},[1054],{"type":998,"value":1055}," [",{"type":993,"tag":1026,"props":1057,"children":1059},{"style":1058},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1060],{"type":998,"value":1061},"\"apple\"",{"type":993,"tag":1026,"props":1063,"children":1064},{"style":1041},[1065],{"type":998,"value":1066},", ",{"type":993,"tag":1026,"props":1068,"children":1069},{"style":1058},[1070],{"type":998,"value":1071},"\"banana\"",{"type":993,"tag":1026,"props":1073,"children":1074},{"style":1041},[1075],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1077,"children":1078},{"style":1058},[1079],{"type":998,"value":1080},"\"cherry\"",{"type":993,"tag":1026,"props":1082,"children":1083},{"style":1041},[1084],{"type":998,"value":1085},"]\n",{"type":993,"tag":1026,"props":1087,"children":1088},{"class":1028,"line":36},[1089,1095,1100,1105],{"type":993,"tag":1026,"props":1090,"children":1092},{"style":1091},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1093],{"type":998,"value":1094},"print",{"type":993,"tag":1026,"props":1096,"children":1097},{"style":1041},[1098],{"type":998,"value":1099},"(",{"type":993,"tag":1026,"props":1101,"children":1102},{"style":1058},[1103],{"type":998,"value":1104},"\"Original:\"",{"type":993,"tag":1026,"props":1106,"children":1107},{"style":1041},[1108],{"type":998,"value":1109},", fruits)\n",{"type":993,"tag":1026,"props":1111,"children":1112},{"class":1028,"line":45},[1113],{"type":993,"tag":1026,"props":1114,"children":1115},{"emptyLinePlaceholder":13},[1116],{"type":998,"value":1117},"\n",{"type":993,"tag":1026,"props":1119,"children":1120},{"class":1028,"line":54},[1121],{"type":993,"tag":1026,"props":1122,"children":1123},{"style":1032},[1124],{"type":998,"value":1125},"# Modify single element\n",{"type":993,"tag":1026,"props":1127,"children":1128},{"class":1028,"line":63},[1129,1134,1139,1144,1148],{"type":993,"tag":1026,"props":1130,"children":1131},{"style":1041},[1132],{"type":998,"value":1133},"fruits[",{"type":993,"tag":1026,"props":1135,"children":1136},{"style":1091},[1137],{"type":998,"value":1138},"1",{"type":993,"tag":1026,"props":1140,"children":1141},{"style":1041},[1142],{"type":998,"value":1143},"] ",{"type":993,"tag":1026,"props":1145,"children":1146},{"style":1047},[1147],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1149,"children":1150},{"style":1058},[1151],{"type":998,"value":1152}," \"blueberry\"\n",{"type":993,"tag":1026,"props":1154,"children":1155},{"class":1028,"line":72},[1156,1160,1164,1169],{"type":993,"tag":1026,"props":1157,"children":1158},{"style":1091},[1159],{"type":998,"value":1094},{"type":993,"tag":1026,"props":1161,"children":1162},{"style":1041},[1163],{"type":998,"value":1099},{"type":993,"tag":1026,"props":1165,"children":1166},{"style":1058},[1167],{"type":998,"value":1168},"\"After change:\"",{"type":993,"tag":1026,"props":1170,"children":1171},{"style":1041},[1172],{"type":998,"value":1109},{"type":993,"tag":1026,"props":1174,"children":1175},{"class":1028,"line":81},[1176],{"type":993,"tag":1026,"props":1177,"children":1178},{"emptyLinePlaceholder":13},[1179],{"type":998,"value":1117},{"type":993,"tag":1026,"props":1181,"children":1182},{"class":1028,"line":91},[1183],{"type":993,"tag":1026,"props":1184,"children":1185},{"style":1032},[1186],{"type":998,"value":1187},"# Modify multiple elements\n",{"type":993,"tag":1026,"props":1189,"children":1190},{"class":1028,"line":100},[1191,1195,1200,1205,1210,1214,1218,1222,1227,1231,1236],{"type":993,"tag":1026,"props":1192,"children":1193},{"style":1041},[1194],{"type":998,"value":1133},{"type":993,"tag":1026,"props":1196,"children":1197},{"style":1091},[1198],{"type":998,"value":1199},"0",{"type":993,"tag":1026,"props":1201,"children":1202},{"style":1041},[1203],{"type":998,"value":1204},":",{"type":993,"tag":1026,"props":1206,"children":1207},{"style":1091},[1208],{"type":998,"value":1209},"2",{"type":993,"tag":1026,"props":1211,"children":1212},{"style":1041},[1213],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1215,"children":1216},{"style":1047},[1217],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1219,"children":1220},{"style":1041},[1221],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1223,"children":1224},{"style":1058},[1225],{"type":998,"value":1226},"\"orange\"",{"type":993,"tag":1026,"props":1228,"children":1229},{"style":1041},[1230],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1232,"children":1233},{"style":1058},[1234],{"type":998,"value":1235},"\"grape\"",{"type":993,"tag":1026,"props":1237,"children":1238},{"style":1041},[1239],{"type":998,"value":1085},{"type":993,"tag":1026,"props":1241,"children":1242},{"class":1028,"line":109},[1243,1247,1251,1256],{"type":993,"tag":1026,"props":1244,"children":1245},{"style":1091},[1246],{"type":998,"value":1094},{"type":993,"tag":1026,"props":1248,"children":1249},{"style":1041},[1250],{"type":998,"value":1099},{"type":993,"tag":1026,"props":1252,"children":1253},{"style":1058},[1254],{"type":998,"value":1255},"\"After slice change:\"",{"type":993,"tag":1026,"props":1257,"children":1258},{"style":1041},[1259],{"type":998,"value":1109},{"type":993,"tag":1261,"props":1262,"children":1264},"h2",{"id":1263},"modifying-individual-elements",[1265],{"type":998,"value":1266},"📍 Modifying Individual Elements",{"type":993,"tag":1001,"props":1268,"children":1269},{},[1270],{"type":998,"value":1271},"The most direct way to modify a list is by accessing an element through its index and assigning a new value. This approach is perfect when you know exactly which position needs to be updated.",{"type":993,"tag":1001,"props":1273,"children":1274},{},[1275],{"type":998,"value":1276},"Index-based modification provides precise control over individual list elements and is commonly used in data updates and corrections.",{"type":993,"tag":1278,"props":1279,"children":1283},"info-box",{"emoji":1280,"title":1281,"type":1282},"⚙️","Index Modification Rules","info",[1284,1301,1309,1329,1337,1363],{"type":993,"tag":1001,"props":1285,"children":1286},{},[1287,1293,1295],{"type":993,"tag":1288,"props":1289,"children":1290},"strong",{},[1291],{"type":998,"value":1292},"Basic Syntax:",{"type":998,"value":1294}," ",{"type":993,"tag":1022,"props":1296,"children":1298},{"className":1297},[],[1299],{"type":998,"value":1300},"list[index] = new_value",{"type":993,"tag":1001,"props":1302,"children":1303},{},[1304],{"type":993,"tag":1288,"props":1305,"children":1306},{},[1307],{"type":998,"value":1308},"Index Requirements:",{"type":993,"tag":1310,"props":1311,"children":1312},"ul",{},[1313,1319,1324],{"type":993,"tag":1314,"props":1315,"children":1316},"li",{},[1317],{"type":998,"value":1318},"Must be valid integer within list bounds",{"type":993,"tag":1314,"props":1320,"children":1321},{},[1322],{"type":998,"value":1323},"Negative indices count from end (-1 = last item)",{"type":993,"tag":1314,"props":1325,"children":1326},{},[1327],{"type":998,"value":1328},"Index out of range raises IndexError",{"type":993,"tag":1001,"props":1330,"children":1331},{},[1332],{"type":993,"tag":1288,"props":1333,"children":1334},{},[1335],{"type":998,"value":1336},"Safety Guidelines:",{"type":993,"tag":1310,"props":1338,"children":1339},{},[1340,1345,1358],{"type":993,"tag":1314,"props":1341,"children":1342},{},[1343],{"type":998,"value":1344},"Check list length before accessing indices",{"type":993,"tag":1314,"props":1346,"children":1347},{},[1348,1350,1356],{"type":998,"value":1349},"Use ",{"type":993,"tag":1022,"props":1351,"children":1353},{"className":1352},[],[1354],{"type":998,"value":1355},"len(list)",{"type":998,"value":1357}," to verify bounds",{"type":993,"tag":1314,"props":1359,"children":1360},{},[1361],{"type":998,"value":1362},"Consider using try/except for dynamic indices",{"type":993,"tag":1001,"props":1364,"children":1365},{},[1366,1371],{"type":993,"tag":1288,"props":1367,"children":1368},{},[1369],{"type":998,"value":1370},"Performance:",{"type":998,"value":1372}," Direct index access is O(1) - very fast",{"type":993,"tag":1374,"props":1375,"children":1377},"h3",{"id":1376},"index-modification-examples",[1378],{"type":998,"value":1379},"Index Modification Examples",{"type":993,"tag":1001,"props":1381,"children":1382},{},[1383],{"type":998,"value":1384},"Direct element replacement for precise data updates:",{"type":993,"tag":1012,"props":1386,"children":1387},{},[1388],{"type":993,"tag":1016,"props":1389,"children":1391},{"className":1018,"code":1390,"language":6,"meta":8,"style":8},"# Modifying individual elements by index\nscores = [85, 92, 78, 96, 88]\nprint(\"Original scores:\", scores)\n\n# Update specific scores\nscores[2] = 82  # Improve third score\nscores[-1] = 90  # Update last score\nprint(\"Updated scores:\", scores)\n\n# Modifying with conditions\nstudents = [\"Alice\", \"bob\", \"CHARLIE\", \"diana\"]\nprint(\"Original names:\", students)\n\n# Fix capitalization\nstudents[1] = students[1].capitalize()\nstudents[2] = students[2].capitalize()\nstudents[3] = students[3].capitalize()\nprint(\"Fixed names:\", students)\n",[1392],{"type":993,"tag":1022,"props":1393,"children":1394},{"__ignoreMap":8},[1395,1403,1464,1485,1492,1500,1530,1564,1584,1591,1599,1651,1672,1679,1687,1721,1752,1784],{"type":993,"tag":1026,"props":1396,"children":1397},{"class":1028,"line":12},[1398],{"type":993,"tag":1026,"props":1399,"children":1400},{"style":1032},[1401],{"type":998,"value":1402},"# Modifying individual elements by index\n",{"type":993,"tag":1026,"props":1404,"children":1405},{"class":1028,"line":27},[1406,1411,1415,1419,1424,1428,1433,1437,1442,1446,1451,1455,1460],{"type":993,"tag":1026,"props":1407,"children":1408},{"style":1041},[1409],{"type":998,"value":1410},"scores ",{"type":993,"tag":1026,"props":1412,"children":1413},{"style":1047},[1414],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1416,"children":1417},{"style":1041},[1418],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1420,"children":1421},{"style":1091},[1422],{"type":998,"value":1423},"85",{"type":993,"tag":1026,"props":1425,"children":1426},{"style":1041},[1427],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1429,"children":1430},{"style":1091},[1431],{"type":998,"value":1432},"92",{"type":993,"tag":1026,"props":1434,"children":1435},{"style":1041},[1436],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1438,"children":1439},{"style":1091},[1440],{"type":998,"value":1441},"78",{"type":993,"tag":1026,"props":1443,"children":1444},{"style":1041},[1445],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1447,"children":1448},{"style":1091},[1449],{"type":998,"value":1450},"96",{"type":993,"tag":1026,"props":1452,"children":1453},{"style":1041},[1454],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1456,"children":1457},{"style":1091},[1458],{"type":998,"value":1459},"88",{"type":993,"tag":1026,"props":1461,"children":1462},{"style":1041},[1463],{"type":998,"value":1085},{"type":993,"tag":1026,"props":1465,"children":1466},{"class":1028,"line":36},[1467,1471,1475,1480],{"type":993,"tag":1026,"props":1468,"children":1469},{"style":1091},[1470],{"type":998,"value":1094},{"type":993,"tag":1026,"props":1472,"children":1473},{"style":1041},[1474],{"type":998,"value":1099},{"type":993,"tag":1026,"props":1476,"children":1477},{"style":1058},[1478],{"type":998,"value":1479},"\"Original scores:\"",{"type":993,"tag":1026,"props":1481,"children":1482},{"style":1041},[1483],{"type":998,"value":1484},", scores)\n",{"type":993,"tag":1026,"props":1486,"children":1487},{"class":1028,"line":45},[1488],{"type":993,"tag":1026,"props":1489,"children":1490},{"emptyLinePlaceholder":13},[1491],{"type":998,"value":1117},{"type":993,"tag":1026,"props":1493,"children":1494},{"class":1028,"line":54},[1495],{"type":993,"tag":1026,"props":1496,"children":1497},{"style":1032},[1498],{"type":998,"value":1499},"# Update specific scores\n",{"type":993,"tag":1026,"props":1501,"children":1502},{"class":1028,"line":63},[1503,1508,1512,1516,1520,1525],{"type":993,"tag":1026,"props":1504,"children":1505},{"style":1041},[1506],{"type":998,"value":1507},"scores[",{"type":993,"tag":1026,"props":1509,"children":1510},{"style":1091},[1511],{"type":998,"value":1209},{"type":993,"tag":1026,"props":1513,"children":1514},{"style":1041},[1515],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1517,"children":1518},{"style":1047},[1519],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1521,"children":1522},{"style":1091},[1523],{"type":998,"value":1524}," 82",{"type":993,"tag":1026,"props":1526,"children":1527},{"style":1032},[1528],{"type":998,"value":1529},"  # Improve third score\n",{"type":993,"tag":1026,"props":1531,"children":1532},{"class":1028,"line":72},[1533,1537,1542,1546,1550,1554,1559],{"type":993,"tag":1026,"props":1534,"children":1535},{"style":1041},[1536],{"type":998,"value":1507},{"type":993,"tag":1026,"props":1538,"children":1539},{"style":1047},[1540],{"type":998,"value":1541},"-",{"type":993,"tag":1026,"props":1543,"children":1544},{"style":1091},[1545],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1547,"children":1548},{"style":1041},[1549],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1551,"children":1552},{"style":1047},[1553],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1555,"children":1556},{"style":1091},[1557],{"type":998,"value":1558}," 90",{"type":993,"tag":1026,"props":1560,"children":1561},{"style":1032},[1562],{"type":998,"value":1563},"  # Update last score\n",{"type":993,"tag":1026,"props":1565,"children":1566},{"class":1028,"line":81},[1567,1571,1575,1580],{"type":993,"tag":1026,"props":1568,"children":1569},{"style":1091},[1570],{"type":998,"value":1094},{"type":993,"tag":1026,"props":1572,"children":1573},{"style":1041},[1574],{"type":998,"value":1099},{"type":993,"tag":1026,"props":1576,"children":1577},{"style":1058},[1578],{"type":998,"value":1579},"\"Updated scores:\"",{"type":993,"tag":1026,"props":1581,"children":1582},{"style":1041},[1583],{"type":998,"value":1484},{"type":993,"tag":1026,"props":1585,"children":1586},{"class":1028,"line":91},[1587],{"type":993,"tag":1026,"props":1588,"children":1589},{"emptyLinePlaceholder":13},[1590],{"type":998,"value":1117},{"type":993,"tag":1026,"props":1592,"children":1593},{"class":1028,"line":100},[1594],{"type":993,"tag":1026,"props":1595,"children":1596},{"style":1032},[1597],{"type":998,"value":1598},"# Modifying with conditions\n",{"type":993,"tag":1026,"props":1600,"children":1601},{"class":1028,"line":109},[1602,1607,1611,1615,1620,1624,1629,1633,1638,1642,1647],{"type":993,"tag":1026,"props":1603,"children":1604},{"style":1041},[1605],{"type":998,"value":1606},"students ",{"type":993,"tag":1026,"props":1608,"children":1609},{"style":1047},[1610],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1612,"children":1613},{"style":1041},[1614],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1616,"children":1617},{"style":1058},[1618],{"type":998,"value":1619},"\"Alice\"",{"type":993,"tag":1026,"props":1621,"children":1622},{"style":1041},[1623],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1625,"children":1626},{"style":1058},[1627],{"type":998,"value":1628},"\"bob\"",{"type":993,"tag":1026,"props":1630,"children":1631},{"style":1041},[1632],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1634,"children":1635},{"style":1058},[1636],{"type":998,"value":1637},"\"CHARLIE\"",{"type":993,"tag":1026,"props":1639,"children":1640},{"style":1041},[1641],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1643,"children":1644},{"style":1058},[1645],{"type":998,"value":1646},"\"diana\"",{"type":993,"tag":1026,"props":1648,"children":1649},{"style":1041},[1650],{"type":998,"value":1085},{"type":993,"tag":1026,"props":1652,"children":1653},{"class":1028,"line":118},[1654,1658,1662,1667],{"type":993,"tag":1026,"props":1655,"children":1656},{"style":1091},[1657],{"type":998,"value":1094},{"type":993,"tag":1026,"props":1659,"children":1660},{"style":1041},[1661],{"type":998,"value":1099},{"type":993,"tag":1026,"props":1663,"children":1664},{"style":1058},[1665],{"type":998,"value":1666},"\"Original names:\"",{"type":993,"tag":1026,"props":1668,"children":1669},{"style":1041},[1670],{"type":998,"value":1671},", students)\n",{"type":993,"tag":1026,"props":1673,"children":1674},{"class":1028,"line":127},[1675],{"type":993,"tag":1026,"props":1676,"children":1677},{"emptyLinePlaceholder":13},[1678],{"type":998,"value":1117},{"type":993,"tag":1026,"props":1680,"children":1681},{"class":1028,"line":136},[1682],{"type":993,"tag":1026,"props":1683,"children":1684},{"style":1032},[1685],{"type":998,"value":1686},"# Fix capitalization\n",{"type":993,"tag":1026,"props":1688,"children":1689},{"class":1028,"line":146},[1690,1695,1699,1703,1707,1712,1716],{"type":993,"tag":1026,"props":1691,"children":1692},{"style":1041},[1693],{"type":998,"value":1694},"students[",{"type":993,"tag":1026,"props":1696,"children":1697},{"style":1091},[1698],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1700,"children":1701},{"style":1041},[1702],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1704,"children":1705},{"style":1047},[1706],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1708,"children":1709},{"style":1041},[1710],{"type":998,"value":1711}," students[",{"type":993,"tag":1026,"props":1713,"children":1714},{"style":1091},[1715],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1717,"children":1718},{"style":1041},[1719],{"type":998,"value":1720},"].capitalize()\n",{"type":993,"tag":1026,"props":1722,"children":1723},{"class":1028,"line":155},[1724,1728,1732,1736,1740,1744,1748],{"type":993,"tag":1026,"props":1725,"children":1726},{"style":1041},[1727],{"type":998,"value":1694},{"type":993,"tag":1026,"props":1729,"children":1730},{"style":1091},[1731],{"type":998,"value":1209},{"type":993,"tag":1026,"props":1733,"children":1734},{"style":1041},[1735],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1737,"children":1738},{"style":1047},[1739],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1741,"children":1742},{"style":1041},[1743],{"type":998,"value":1711},{"type":993,"tag":1026,"props":1745,"children":1746},{"style":1091},[1747],{"type":998,"value":1209},{"type":993,"tag":1026,"props":1749,"children":1750},{"style":1041},[1751],{"type":998,"value":1720},{"type":993,"tag":1026,"props":1753,"children":1754},{"class":1028,"line":164},[1755,1759,1764,1768,1772,1776,1780],{"type":993,"tag":1026,"props":1756,"children":1757},{"style":1041},[1758],{"type":998,"value":1694},{"type":993,"tag":1026,"props":1760,"children":1761},{"style":1091},[1762],{"type":998,"value":1763},"3",{"type":993,"tag":1026,"props":1765,"children":1766},{"style":1041},[1767],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1769,"children":1770},{"style":1047},[1771],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1773,"children":1774},{"style":1041},[1775],{"type":998,"value":1711},{"type":993,"tag":1026,"props":1777,"children":1778},{"style":1091},[1779],{"type":998,"value":1763},{"type":993,"tag":1026,"props":1781,"children":1782},{"style":1041},[1783],{"type":998,"value":1720},{"type":993,"tag":1026,"props":1785,"children":1786},{"class":1028,"line":173},[1787,1791,1795,1800],{"type":993,"tag":1026,"props":1788,"children":1789},{"style":1091},[1790],{"type":998,"value":1094},{"type":993,"tag":1026,"props":1792,"children":1793},{"style":1041},[1794],{"type":998,"value":1099},{"type":993,"tag":1026,"props":1796,"children":1797},{"style":1058},[1798],{"type":998,"value":1799},"\"Fixed names:\"",{"type":993,"tag":1026,"props":1801,"children":1802},{"style":1041},[1803],{"type":998,"value":1671},{"type":993,"tag":1261,"props":1805,"children":1807},{"id":1806},"️-using-slice-assignment",[1808],{"type":998,"value":1809},"✂️ Using Slice Assignment",{"type":993,"tag":1001,"props":1811,"children":1812},{},[1813],{"type":998,"value":1814},"Slice assignment allows you to modify multiple elements at once by replacing a section of the list with new values. This technique is powerful for updating ranges of data or restructuring portions of your list.",{"type":993,"tag":1278,"props":1816,"children":1820},{"emoji":1817,"title":1818,"type":1819},"🎯","Slice Assignment Capabilities","success",[1821,1836,1844,1867,1875,1893],{"type":993,"tag":1001,"props":1822,"children":1823},{},[1824,1829,1830],{"type":993,"tag":1288,"props":1825,"children":1826},{},[1827],{"type":998,"value":1828},"Syntax:",{"type":998,"value":1294},{"type":993,"tag":1022,"props":1831,"children":1833},{"className":1832},[],[1834],{"type":998,"value":1835},"list[start:end] = new_values",{"type":993,"tag":1001,"props":1837,"children":1838},{},[1839],{"type":993,"tag":1288,"props":1840,"children":1841},{},[1842],{"type":998,"value":1843},"Flexible Replacement:",{"type":993,"tag":1310,"props":1845,"children":1846},{},[1847,1852,1857,1862],{"type":993,"tag":1314,"props":1848,"children":1849},{},[1850],{"type":998,"value":1851},"Replace with same number of elements",{"type":993,"tag":1314,"props":1853,"children":1854},{},[1855],{"type":998,"value":1856},"Replace with more elements (list grows)",{"type":993,"tag":1314,"props":1858,"children":1859},{},[1860],{"type":998,"value":1861},"Replace with fewer elements (list shrinks)",{"type":993,"tag":1314,"props":1863,"children":1864},{},[1865],{"type":998,"value":1866},"Replace with empty list (deletes section)",{"type":993,"tag":1001,"props":1868,"children":1869},{},[1870],{"type":993,"tag":1288,"props":1871,"children":1872},{},[1873],{"type":998,"value":1874},"Advantages:",{"type":993,"tag":1310,"props":1876,"children":1877},{},[1878,1883,1888],{"type":993,"tag":1314,"props":1879,"children":1880},{},[1881],{"type":998,"value":1882},"Efficient for bulk updates",{"type":993,"tag":1314,"props":1884,"children":1885},{},[1886],{"type":998,"value":1887},"Maintains list object identity",{"type":993,"tag":1314,"props":1889,"children":1890},{},[1891],{"type":998,"value":1892},"More readable than multiple assignments",{"type":993,"tag":1001,"props":1894,"children":1895},{},[1896,1901],{"type":993,"tag":1288,"props":1897,"children":1898},{},[1899],{"type":998,"value":1900},"Use Cases:",{"type":998,"value":1902}," Data restructuring, bulk updates, section replacement",{"type":993,"tag":1001,"props":1904,"children":1905},{},[1906],{"type":998,"value":1907},"Slice assignment can replace any number of elements with any number of new elements, making it flexible for various modification scenarios.",{"type":993,"tag":1374,"props":1909,"children":1911},{"id":1910},"slice-assignment-examples",[1912],{"type":998,"value":1913},"Slice Assignment Examples",{"type":993,"tag":1001,"props":1915,"children":1916},{},[1917],{"type":998,"value":1918},"Flexible bulk updates for efficient data manipulation:",{"type":993,"tag":1012,"props":1920,"children":1921},{},[1922],{"type":993,"tag":1016,"props":1923,"children":1925},{"className":1018,"code":1924,"language":6,"meta":8,"style":8},"# Replace middle section\nnumbers = [1, 2, 3, 4, 5, 6, 7, 8]\nprint(\"Original:\", numbers)\n\nnumbers[2:5] = [30, 40, 50]\nprint(\"After slice replacement:\", numbers)\n\n# Replace with different number of elements\ncolors = [\"red\", \"green\", \"blue\", \"yellow\"]\nprint(\"Original colors:\", colors)\n\ncolors[1:3] = [\"orange\", \"purple\", \"pink\", \"cyan\"]\nprint(\"After expansion:\", colors)\n\n# Replace with fewer elements\ncolors = [\"red\", \"orange\", \"purple\", \"pink\", \"cyan\", \"yellow\"]\nprint(\"Original colors:\", colors)\n\ncolors[2:6] = [\"magenta\"]\nprint(\"After contraction:\", colors)\n",[1926],{"type":993,"tag":1022,"props":1927,"children":1928},{"__ignoreMap":8},[1929,1937,2022,2042,2049,2108,2128,2135,2143,2195,2216,2223,2290,2310,2317,2325,2388,2407,2414,2454],{"type":993,"tag":1026,"props":1930,"children":1931},{"class":1028,"line":12},[1932],{"type":993,"tag":1026,"props":1933,"children":1934},{"style":1032},[1935],{"type":998,"value":1936},"# Replace middle section\n",{"type":993,"tag":1026,"props":1938,"children":1939},{"class":1028,"line":27},[1940,1945,1949,1953,1957,1961,1965,1969,1973,1977,1982,1986,1991,1995,2000,2004,2009,2013,2018],{"type":993,"tag":1026,"props":1941,"children":1942},{"style":1041},[1943],{"type":998,"value":1944},"numbers ",{"type":993,"tag":1026,"props":1946,"children":1947},{"style":1047},[1948],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1950,"children":1951},{"style":1041},[1952],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1954,"children":1955},{"style":1091},[1956],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1958,"children":1959},{"style":1041},[1960],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1962,"children":1963},{"style":1091},[1964],{"type":998,"value":1209},{"type":993,"tag":1026,"props":1966,"children":1967},{"style":1041},[1968],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1970,"children":1971},{"style":1091},[1972],{"type":998,"value":1763},{"type":993,"tag":1026,"props":1974,"children":1975},{"style":1041},[1976],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1978,"children":1979},{"style":1091},[1980],{"type":998,"value":1981},"4",{"type":993,"tag":1026,"props":1983,"children":1984},{"style":1041},[1985],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1987,"children":1988},{"style":1091},[1989],{"type":998,"value":1990},"5",{"type":993,"tag":1026,"props":1992,"children":1993},{"style":1041},[1994],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1996,"children":1997},{"style":1091},[1998],{"type":998,"value":1999},"6",{"type":993,"tag":1026,"props":2001,"children":2002},{"style":1041},[2003],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2005,"children":2006},{"style":1091},[2007],{"type":998,"value":2008},"7",{"type":993,"tag":1026,"props":2010,"children":2011},{"style":1041},[2012],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2014,"children":2015},{"style":1091},[2016],{"type":998,"value":2017},"8",{"type":993,"tag":1026,"props":2019,"children":2020},{"style":1041},[2021],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2023,"children":2024},{"class":1028,"line":36},[2025,2029,2033,2037],{"type":993,"tag":1026,"props":2026,"children":2027},{"style":1091},[2028],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2030,"children":2031},{"style":1041},[2032],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2034,"children":2035},{"style":1058},[2036],{"type":998,"value":1104},{"type":993,"tag":1026,"props":2038,"children":2039},{"style":1041},[2040],{"type":998,"value":2041},", numbers)\n",{"type":993,"tag":1026,"props":2043,"children":2044},{"class":1028,"line":45},[2045],{"type":993,"tag":1026,"props":2046,"children":2047},{"emptyLinePlaceholder":13},[2048],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2050,"children":2051},{"class":1028,"line":54},[2052,2057,2061,2065,2069,2073,2077,2081,2086,2090,2095,2099,2104],{"type":993,"tag":1026,"props":2053,"children":2054},{"style":1041},[2055],{"type":998,"value":2056},"numbers[",{"type":993,"tag":1026,"props":2058,"children":2059},{"style":1091},[2060],{"type":998,"value":1209},{"type":993,"tag":1026,"props":2062,"children":2063},{"style":1041},[2064],{"type":998,"value":1204},{"type":993,"tag":1026,"props":2066,"children":2067},{"style":1091},[2068],{"type":998,"value":1990},{"type":993,"tag":1026,"props":2070,"children":2071},{"style":1041},[2072],{"type":998,"value":1143},{"type":993,"tag":1026,"props":2074,"children":2075},{"style":1047},[2076],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2078,"children":2079},{"style":1041},[2080],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2082,"children":2083},{"style":1091},[2084],{"type":998,"value":2085},"30",{"type":993,"tag":1026,"props":2087,"children":2088},{"style":1041},[2089],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2091,"children":2092},{"style":1091},[2093],{"type":998,"value":2094},"40",{"type":993,"tag":1026,"props":2096,"children":2097},{"style":1041},[2098],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2100,"children":2101},{"style":1091},[2102],{"type":998,"value":2103},"50",{"type":993,"tag":1026,"props":2105,"children":2106},{"style":1041},[2107],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2109,"children":2110},{"class":1028,"line":63},[2111,2115,2119,2124],{"type":993,"tag":1026,"props":2112,"children":2113},{"style":1091},[2114],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2116,"children":2117},{"style":1041},[2118],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2120,"children":2121},{"style":1058},[2122],{"type":998,"value":2123},"\"After slice replacement:\"",{"type":993,"tag":1026,"props":2125,"children":2126},{"style":1041},[2127],{"type":998,"value":2041},{"type":993,"tag":1026,"props":2129,"children":2130},{"class":1028,"line":72},[2131],{"type":993,"tag":1026,"props":2132,"children":2133},{"emptyLinePlaceholder":13},[2134],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2136,"children":2137},{"class":1028,"line":81},[2138],{"type":993,"tag":1026,"props":2139,"children":2140},{"style":1032},[2141],{"type":998,"value":2142},"# Replace with different number of elements\n",{"type":993,"tag":1026,"props":2144,"children":2145},{"class":1028,"line":91},[2146,2151,2155,2159,2164,2168,2173,2177,2182,2186,2191],{"type":993,"tag":1026,"props":2147,"children":2148},{"style":1041},[2149],{"type":998,"value":2150},"colors ",{"type":993,"tag":1026,"props":2152,"children":2153},{"style":1047},[2154],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2156,"children":2157},{"style":1041},[2158],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2160,"children":2161},{"style":1058},[2162],{"type":998,"value":2163},"\"red\"",{"type":993,"tag":1026,"props":2165,"children":2166},{"style":1041},[2167],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2169,"children":2170},{"style":1058},[2171],{"type":998,"value":2172},"\"green\"",{"type":993,"tag":1026,"props":2174,"children":2175},{"style":1041},[2176],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2178,"children":2179},{"style":1058},[2180],{"type":998,"value":2181},"\"blue\"",{"type":993,"tag":1026,"props":2183,"children":2184},{"style":1041},[2185],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2187,"children":2188},{"style":1058},[2189],{"type":998,"value":2190},"\"yellow\"",{"type":993,"tag":1026,"props":2192,"children":2193},{"style":1041},[2194],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2196,"children":2197},{"class":1028,"line":100},[2198,2202,2206,2211],{"type":993,"tag":1026,"props":2199,"children":2200},{"style":1091},[2201],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2203,"children":2204},{"style":1041},[2205],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2207,"children":2208},{"style":1058},[2209],{"type":998,"value":2210},"\"Original colors:\"",{"type":993,"tag":1026,"props":2212,"children":2213},{"style":1041},[2214],{"type":998,"value":2215},", colors)\n",{"type":993,"tag":1026,"props":2217,"children":2218},{"class":1028,"line":109},[2219],{"type":993,"tag":1026,"props":2220,"children":2221},{"emptyLinePlaceholder":13},[2222],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2224,"children":2225},{"class":1028,"line":118},[2226,2231,2235,2239,2243,2247,2251,2255,2259,2263,2268,2272,2277,2281,2286],{"type":993,"tag":1026,"props":2227,"children":2228},{"style":1041},[2229],{"type":998,"value":2230},"colors[",{"type":993,"tag":1026,"props":2232,"children":2233},{"style":1091},[2234],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2236,"children":2237},{"style":1041},[2238],{"type":998,"value":1204},{"type":993,"tag":1026,"props":2240,"children":2241},{"style":1091},[2242],{"type":998,"value":1763},{"type":993,"tag":1026,"props":2244,"children":2245},{"style":1041},[2246],{"type":998,"value":1143},{"type":993,"tag":1026,"props":2248,"children":2249},{"style":1047},[2250],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2252,"children":2253},{"style":1041},[2254],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2256,"children":2257},{"style":1058},[2258],{"type":998,"value":1226},{"type":993,"tag":1026,"props":2260,"children":2261},{"style":1041},[2262],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2264,"children":2265},{"style":1058},[2266],{"type":998,"value":2267},"\"purple\"",{"type":993,"tag":1026,"props":2269,"children":2270},{"style":1041},[2271],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2273,"children":2274},{"style":1058},[2275],{"type":998,"value":2276},"\"pink\"",{"type":993,"tag":1026,"props":2278,"children":2279},{"style":1041},[2280],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2282,"children":2283},{"style":1058},[2284],{"type":998,"value":2285},"\"cyan\"",{"type":993,"tag":1026,"props":2287,"children":2288},{"style":1041},[2289],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2291,"children":2292},{"class":1028,"line":127},[2293,2297,2301,2306],{"type":993,"tag":1026,"props":2294,"children":2295},{"style":1091},[2296],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2298,"children":2299},{"style":1041},[2300],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2302,"children":2303},{"style":1058},[2304],{"type":998,"value":2305},"\"After expansion:\"",{"type":993,"tag":1026,"props":2307,"children":2308},{"style":1041},[2309],{"type":998,"value":2215},{"type":993,"tag":1026,"props":2311,"children":2312},{"class":1028,"line":136},[2313],{"type":993,"tag":1026,"props":2314,"children":2315},{"emptyLinePlaceholder":13},[2316],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2318,"children":2319},{"class":1028,"line":146},[2320],{"type":993,"tag":1026,"props":2321,"children":2322},{"style":1032},[2323],{"type":998,"value":2324},"# Replace with fewer elements\n",{"type":993,"tag":1026,"props":2326,"children":2327},{"class":1028,"line":155},[2328,2332,2336,2340,2344,2348,2352,2356,2360,2364,2368,2372,2376,2380,2384],{"type":993,"tag":1026,"props":2329,"children":2330},{"style":1041},[2331],{"type":998,"value":2150},{"type":993,"tag":1026,"props":2333,"children":2334},{"style":1047},[2335],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2337,"children":2338},{"style":1041},[2339],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2341,"children":2342},{"style":1058},[2343],{"type":998,"value":2163},{"type":993,"tag":1026,"props":2345,"children":2346},{"style":1041},[2347],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2349,"children":2350},{"style":1058},[2351],{"type":998,"value":1226},{"type":993,"tag":1026,"props":2353,"children":2354},{"style":1041},[2355],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2357,"children":2358},{"style":1058},[2359],{"type":998,"value":2267},{"type":993,"tag":1026,"props":2361,"children":2362},{"style":1041},[2363],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2365,"children":2366},{"style":1058},[2367],{"type":998,"value":2276},{"type":993,"tag":1026,"props":2369,"children":2370},{"style":1041},[2371],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2373,"children":2374},{"style":1058},[2375],{"type":998,"value":2285},{"type":993,"tag":1026,"props":2377,"children":2378},{"style":1041},[2379],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2381,"children":2382},{"style":1058},[2383],{"type":998,"value":2190},{"type":993,"tag":1026,"props":2385,"children":2386},{"style":1041},[2387],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2389,"children":2390},{"class":1028,"line":164},[2391,2395,2399,2403],{"type":993,"tag":1026,"props":2392,"children":2393},{"style":1091},[2394],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2396,"children":2397},{"style":1041},[2398],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2400,"children":2401},{"style":1058},[2402],{"type":998,"value":2210},{"type":993,"tag":1026,"props":2404,"children":2405},{"style":1041},[2406],{"type":998,"value":2215},{"type":993,"tag":1026,"props":2408,"children":2409},{"class":1028,"line":173},[2410],{"type":993,"tag":1026,"props":2411,"children":2412},{"emptyLinePlaceholder":13},[2413],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2415,"children":2416},{"class":1028,"line":182},[2417,2421,2425,2429,2433,2437,2441,2445,2450],{"type":993,"tag":1026,"props":2418,"children":2419},{"style":1041},[2420],{"type":998,"value":2230},{"type":993,"tag":1026,"props":2422,"children":2423},{"style":1091},[2424],{"type":998,"value":1209},{"type":993,"tag":1026,"props":2426,"children":2427},{"style":1041},[2428],{"type":998,"value":1204},{"type":993,"tag":1026,"props":2430,"children":2431},{"style":1091},[2432],{"type":998,"value":1999},{"type":993,"tag":1026,"props":2434,"children":2435},{"style":1041},[2436],{"type":998,"value":1143},{"type":993,"tag":1026,"props":2438,"children":2439},{"style":1047},[2440],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2442,"children":2443},{"style":1041},[2444],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2446,"children":2447},{"style":1058},[2448],{"type":998,"value":2449},"\"magenta\"",{"type":993,"tag":1026,"props":2451,"children":2452},{"style":1041},[2453],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2455,"children":2456},{"class":1028,"line":191},[2457,2461,2465,2470],{"type":993,"tag":1026,"props":2458,"children":2459},{"style":1091},[2460],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2462,"children":2463},{"style":1041},[2464],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2466,"children":2467},{"style":1058},[2468],{"type":998,"value":2469},"\"After contraction:\"",{"type":993,"tag":1026,"props":2471,"children":2472},{"style":1041},[2473],{"type":998,"value":2215},{"type":993,"tag":2475,"props":2476,"children":2478},"content-exercise",{":widget-view":2477,"category":6,"id":301},"true",[],{"type":993,"tag":1261,"props":2480,"children":2482},{"id":2481},"modifying-with-list-methods",[2483],{"type":998,"value":2484},"Modifying with List Methods",{"type":993,"tag":1001,"props":2486,"children":2487},{},[2488],{"type":998,"value":2489},"Python provides several built-in methods specifically designed for modifying lists. These methods offer convenient ways to update list contents without manual indexing and often provide better performance than manual approaches.",{"type":993,"tag":1278,"props":2491,"children":2494},{"emoji":2492,"title":2493,"type":1282},"🛠️","List Modification Methods",[2495,2503,2539,2547,2583,2591],{"type":993,"tag":1001,"props":2496,"children":2497},{},[2498],{"type":993,"tag":1288,"props":2499,"children":2500},{},[2501],{"type":998,"value":2502},"Adding Methods:",{"type":993,"tag":1310,"props":2504,"children":2505},{},[2506,2517,2528],{"type":993,"tag":1314,"props":2507,"children":2508},{},[2509,2515],{"type":993,"tag":1022,"props":2510,"children":2512},{"className":2511},[],[2513],{"type":998,"value":2514},"append(item)",{"type":998,"value":2516},": Add single item to end",{"type":993,"tag":1314,"props":2518,"children":2519},{},[2520,2526],{"type":993,"tag":1022,"props":2521,"children":2523},{"className":2522},[],[2524],{"type":998,"value":2525},"insert(index, item)",{"type":998,"value":2527},": Insert at specific position",{"type":993,"tag":1314,"props":2529,"children":2530},{},[2531,2537],{"type":993,"tag":1022,"props":2532,"children":2534},{"className":2533},[],[2535],{"type":998,"value":2536},"extend(iterable)",{"type":998,"value":2538},": Add multiple items from iterable",{"type":993,"tag":1001,"props":2540,"children":2541},{},[2542],{"type":993,"tag":1288,"props":2543,"children":2544},{},[2545],{"type":998,"value":2546},"Removing Methods:",{"type":993,"tag":1310,"props":2548,"children":2549},{},[2550,2561,2572],{"type":993,"tag":1314,"props":2551,"children":2552},{},[2553,2559],{"type":993,"tag":1022,"props":2554,"children":2556},{"className":2555},[],[2557],{"type":998,"value":2558},"remove(item)",{"type":998,"value":2560},": Remove first occurrence of item",{"type":993,"tag":1314,"props":2562,"children":2563},{},[2564,2570],{"type":993,"tag":1022,"props":2565,"children":2567},{"className":2566},[],[2568],{"type":998,"value":2569},"pop(index)",{"type":998,"value":2571},": Remove and return item at index",{"type":993,"tag":1314,"props":2573,"children":2574},{},[2575,2581],{"type":993,"tag":1022,"props":2576,"children":2578},{"className":2577},[],[2579],{"type":998,"value":2580},"clear()",{"type":998,"value":2582},": Remove all elements",{"type":993,"tag":1001,"props":2584,"children":2585},{},[2586],{"type":993,"tag":1288,"props":2587,"children":2588},{},[2589],{"type":998,"value":2590},"Organizing Methods:",{"type":993,"tag":1310,"props":2592,"children":2593},{},[2594,2605],{"type":993,"tag":1314,"props":2595,"children":2596},{},[2597,2603],{"type":993,"tag":1022,"props":2598,"children":2600},{"className":2599},[],[2601],{"type":998,"value":2602},"reverse()",{"type":998,"value":2604},": Reverse list order in place",{"type":993,"tag":1314,"props":2606,"children":2607},{},[2608,2614],{"type":993,"tag":1022,"props":2609,"children":2611},{"className":2610},[],[2612],{"type":998,"value":2613},"sort()",{"type":998,"value":2615},": Sort list in place",{"type":993,"tag":1374,"props":2617,"children":2619},{"id":2618},"method-examples",[2620],{"type":998,"value":2621},"Method Examples",{"type":993,"tag":1001,"props":2623,"children":2624},{},[2625],{"type":998,"value":2626},"Common list modification operations using built-in methods:",{"type":993,"tag":1012,"props":2628,"children":2629},{},[2630],{"type":993,"tag":1016,"props":2631,"children":2633},{"className":1018,"code":2632,"language":6,"meta":8,"style":8},"# Using append and insert\nshopping_list = [\"bread\", \"milk\", \"eggs\"]\nprint(\"Original list:\", shopping_list)\n\n# Append new items\nshopping_list.append(\"cheese\")\nshopping_list.append(\"butter\")\nprint(\"After appending:\", shopping_list)\n\n# Insert at specific position\nshopping_list.insert(1, \"yogurt\")\nprint(\"After inserting:\", shopping_list)\n\n# Using extend\nnew_items = [\"apples\", \"bananas\"]\nshopping_list.extend(new_items)\nprint(\"After extending:\", shopping_list)\n",[2634],{"type":993,"tag":1022,"props":2635,"children":2636},{"__ignoreMap":8},[2637,2645,2688,2709,2716,2724,2742,2758,2778,2785,2793,2818,2838,2845,2853,2887,2895],{"type":993,"tag":1026,"props":2638,"children":2639},{"class":1028,"line":12},[2640],{"type":993,"tag":1026,"props":2641,"children":2642},{"style":1032},[2643],{"type":998,"value":2644},"# Using append and insert\n",{"type":993,"tag":1026,"props":2646,"children":2647},{"class":1028,"line":27},[2648,2653,2657,2661,2666,2670,2675,2679,2684],{"type":993,"tag":1026,"props":2649,"children":2650},{"style":1041},[2651],{"type":998,"value":2652},"shopping_list ",{"type":993,"tag":1026,"props":2654,"children":2655},{"style":1047},[2656],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2658,"children":2659},{"style":1041},[2660],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2662,"children":2663},{"style":1058},[2664],{"type":998,"value":2665},"\"bread\"",{"type":993,"tag":1026,"props":2667,"children":2668},{"style":1041},[2669],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2671,"children":2672},{"style":1058},[2673],{"type":998,"value":2674},"\"milk\"",{"type":993,"tag":1026,"props":2676,"children":2677},{"style":1041},[2678],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2680,"children":2681},{"style":1058},[2682],{"type":998,"value":2683},"\"eggs\"",{"type":993,"tag":1026,"props":2685,"children":2686},{"style":1041},[2687],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2689,"children":2690},{"class":1028,"line":36},[2691,2695,2699,2704],{"type":993,"tag":1026,"props":2692,"children":2693},{"style":1091},[2694],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2696,"children":2697},{"style":1041},[2698],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2700,"children":2701},{"style":1058},[2702],{"type":998,"value":2703},"\"Original list:\"",{"type":993,"tag":1026,"props":2705,"children":2706},{"style":1041},[2707],{"type":998,"value":2708},", shopping_list)\n",{"type":993,"tag":1026,"props":2710,"children":2711},{"class":1028,"line":45},[2712],{"type":993,"tag":1026,"props":2713,"children":2714},{"emptyLinePlaceholder":13},[2715],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2717,"children":2718},{"class":1028,"line":54},[2719],{"type":993,"tag":1026,"props":2720,"children":2721},{"style":1032},[2722],{"type":998,"value":2723},"# Append new items\n",{"type":993,"tag":1026,"props":2725,"children":2726},{"class":1028,"line":63},[2727,2732,2737],{"type":993,"tag":1026,"props":2728,"children":2729},{"style":1041},[2730],{"type":998,"value":2731},"shopping_list.append(",{"type":993,"tag":1026,"props":2733,"children":2734},{"style":1058},[2735],{"type":998,"value":2736},"\"cheese\"",{"type":993,"tag":1026,"props":2738,"children":2739},{"style":1041},[2740],{"type":998,"value":2741},")\n",{"type":993,"tag":1026,"props":2743,"children":2744},{"class":1028,"line":72},[2745,2749,2754],{"type":993,"tag":1026,"props":2746,"children":2747},{"style":1041},[2748],{"type":998,"value":2731},{"type":993,"tag":1026,"props":2750,"children":2751},{"style":1058},[2752],{"type":998,"value":2753},"\"butter\"",{"type":993,"tag":1026,"props":2755,"children":2756},{"style":1041},[2757],{"type":998,"value":2741},{"type":993,"tag":1026,"props":2759,"children":2760},{"class":1028,"line":81},[2761,2765,2769,2774],{"type":993,"tag":1026,"props":2762,"children":2763},{"style":1091},[2764],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2766,"children":2767},{"style":1041},[2768],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2770,"children":2771},{"style":1058},[2772],{"type":998,"value":2773},"\"After appending:\"",{"type":993,"tag":1026,"props":2775,"children":2776},{"style":1041},[2777],{"type":998,"value":2708},{"type":993,"tag":1026,"props":2779,"children":2780},{"class":1028,"line":91},[2781],{"type":993,"tag":1026,"props":2782,"children":2783},{"emptyLinePlaceholder":13},[2784],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2786,"children":2787},{"class":1028,"line":100},[2788],{"type":993,"tag":1026,"props":2789,"children":2790},{"style":1032},[2791],{"type":998,"value":2792},"# Insert at specific position\n",{"type":993,"tag":1026,"props":2794,"children":2795},{"class":1028,"line":109},[2796,2801,2805,2809,2814],{"type":993,"tag":1026,"props":2797,"children":2798},{"style":1041},[2799],{"type":998,"value":2800},"shopping_list.insert(",{"type":993,"tag":1026,"props":2802,"children":2803},{"style":1091},[2804],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2806,"children":2807},{"style":1041},[2808],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2810,"children":2811},{"style":1058},[2812],{"type":998,"value":2813},"\"yogurt\"",{"type":993,"tag":1026,"props":2815,"children":2816},{"style":1041},[2817],{"type":998,"value":2741},{"type":993,"tag":1026,"props":2819,"children":2820},{"class":1028,"line":118},[2821,2825,2829,2834],{"type":993,"tag":1026,"props":2822,"children":2823},{"style":1091},[2824],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2826,"children":2827},{"style":1041},[2828],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2830,"children":2831},{"style":1058},[2832],{"type":998,"value":2833},"\"After inserting:\"",{"type":993,"tag":1026,"props":2835,"children":2836},{"style":1041},[2837],{"type":998,"value":2708},{"type":993,"tag":1026,"props":2839,"children":2840},{"class":1028,"line":127},[2841],{"type":993,"tag":1026,"props":2842,"children":2843},{"emptyLinePlaceholder":13},[2844],{"type":998,"value":1117},{"type":993,"tag":1026,"props":2846,"children":2847},{"class":1028,"line":136},[2848],{"type":993,"tag":1026,"props":2849,"children":2850},{"style":1032},[2851],{"type":998,"value":2852},"# Using extend\n",{"type":993,"tag":1026,"props":2854,"children":2855},{"class":1028,"line":146},[2856,2861,2865,2869,2874,2878,2883],{"type":993,"tag":1026,"props":2857,"children":2858},{"style":1041},[2859],{"type":998,"value":2860},"new_items ",{"type":993,"tag":1026,"props":2862,"children":2863},{"style":1047},[2864],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2866,"children":2867},{"style":1041},[2868],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2870,"children":2871},{"style":1058},[2872],{"type":998,"value":2873},"\"apples\"",{"type":993,"tag":1026,"props":2875,"children":2876},{"style":1041},[2877],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2879,"children":2880},{"style":1058},[2881],{"type":998,"value":2882},"\"bananas\"",{"type":993,"tag":1026,"props":2884,"children":2885},{"style":1041},[2886],{"type":998,"value":1085},{"type":993,"tag":1026,"props":2888,"children":2889},{"class":1028,"line":155},[2890],{"type":993,"tag":1026,"props":2891,"children":2892},{"style":1041},[2893],{"type":998,"value":2894},"shopping_list.extend(new_items)\n",{"type":993,"tag":1026,"props":2896,"children":2897},{"class":1028,"line":164},[2898,2902,2906,2911],{"type":993,"tag":1026,"props":2899,"children":2900},{"style":1091},[2901],{"type":998,"value":1094},{"type":993,"tag":1026,"props":2903,"children":2904},{"style":1041},[2905],{"type":998,"value":1099},{"type":993,"tag":1026,"props":2907,"children":2908},{"style":1058},[2909],{"type":998,"value":2910},"\"After extending:\"",{"type":993,"tag":1026,"props":2912,"children":2913},{"style":1041},[2914],{"type":998,"value":2708},{"type":993,"tag":1261,"props":2916,"children":2918},{"id":2917},"modifying-while-iterating",[2919],{"type":998,"value":2920},"Modifying While Iterating",{"type":993,"tag":1001,"props":2922,"children":2923},{},[2924],{"type":998,"value":2925},"Modifying lists while iterating through them requires special care to avoid index shifting problems. There are several safe approaches to handle this common scenario.",{"type":993,"tag":1278,"props":2927,"children":2931},{"emoji":2928,"title":2929,"type":2930},"⚠️","Safe Iteration Guidelines","warning",[2932,2940,2958,2966,2989],{"type":993,"tag":1001,"props":2933,"children":2934},{},[2935],{"type":993,"tag":1288,"props":2936,"children":2937},{},[2938],{"type":998,"value":2939},"Problems with Direct Modification:",{"type":993,"tag":1310,"props":2941,"children":2942},{},[2943,2948,2953],{"type":993,"tag":1314,"props":2944,"children":2945},{},[2946],{"type":998,"value":2947},"Removing items shifts indices",{"type":993,"tag":1314,"props":2949,"children":2950},{},[2951],{"type":998,"value":2952},"Can cause elements to be skipped",{"type":993,"tag":1314,"props":2954,"children":2955},{},[2956],{"type":998,"value":2957},"May lead to index errors",{"type":993,"tag":1001,"props":2959,"children":2960},{},[2961],{"type":993,"tag":1288,"props":2962,"children":2963},{},[2964],{"type":998,"value":2965},"Safe Approaches:",{"type":993,"tag":1310,"props":2967,"children":2968},{},[2969,2974,2979,2984],{"type":993,"tag":1314,"props":2970,"children":2971},{},[2972],{"type":998,"value":2973},"Iterate backwards for removals",{"type":993,"tag":1314,"props":2975,"children":2976},{},[2977],{"type":998,"value":2978},"Create a copy to iterate over",{"type":993,"tag":1314,"props":2980,"children":2981},{},[2982],{"type":998,"value":2983},"Collect items to modify, then modify",{"type":993,"tag":1314,"props":2985,"children":2986},{},[2987],{"type":998,"value":2988},"Use list comprehensions for filtering",{"type":993,"tag":1001,"props":2990,"children":2991},{},[2992,2997],{"type":993,"tag":1288,"props":2993,"children":2994},{},[2995],{"type":998,"value":2996},"Best Practice:",{"type":998,"value":2998}," When in doubt, create a new list rather than modifying during iteration",{"type":993,"tag":1374,"props":3000,"children":3002},{"id":3001},"safe-iteration-examples",[3003],{"type":998,"value":3004},"Safe Iteration Examples",{"type":993,"tag":1001,"props":3006,"children":3007},{},[3008],{"type":998,"value":3009},"Avoiding common pitfalls when modifying during iteration:",{"type":993,"tag":1012,"props":3011,"children":3012},{},[3013],{"type":993,"tag":1016,"props":3014,"children":3016},{"className":1018,"code":3015,"language":6,"meta":8,"style":8},"# Problem: Modifying while iterating forward (DON'T DO THIS)\n# This can skip elements due to index shifting\n\n# Safe approach 1: Iterate backwards\nnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nprint(\"Original:\", numbers)\n\n# Remove even numbers by iterating backwards\nfor i in range(len(numbers) - 1, -1, -1):\n    if numbers[i] % 2 == 0:\n        numbers.pop(i)\nprint(\"After removing evens (backwards):\", numbers)\n\n# Safe approach 2: Create a copy to iterate over\nfruits = [\"apple\", \"apricot\", \"banana\", \"cherry\", \"avocado\"]\nprint(\"Original fruits:\", fruits)\n\n# Remove fruits starting with 'a'\nfor fruit in fruits.copy():\n    if fruit.startswith('a'):\n        fruits.remove(fruit)\nprint(\"After removing 'a' fruits:\", fruits)\n\n# Safe approach 3: List comprehension (creates new list)\nscores = [85, 72, 90, 65, 88, 45, 92]\npassing_scores = [score for score in scores if score >= 70]\nprint(\"Passing scores:\", passing_scores)\n",[3017],{"type":993,"tag":1022,"props":3018,"children":3019},{"__ignoreMap":8},[3020,3028,3036,3043,3051,3148,3167,3174,3182,3257,3295,3303,3323,3330,3338,3395,3415,3422,3430,3451,3472,3480,3500,3507,3515,3590,3648],{"type":993,"tag":1026,"props":3021,"children":3022},{"class":1028,"line":12},[3023],{"type":993,"tag":1026,"props":3024,"children":3025},{"style":1032},[3026],{"type":998,"value":3027},"# Problem: Modifying while iterating forward (DON'T DO THIS)\n",{"type":993,"tag":1026,"props":3029,"children":3030},{"class":1028,"line":27},[3031],{"type":993,"tag":1026,"props":3032,"children":3033},{"style":1032},[3034],{"type":998,"value":3035},"# This can skip elements due to index shifting\n",{"type":993,"tag":1026,"props":3037,"children":3038},{"class":1028,"line":36},[3039],{"type":993,"tag":1026,"props":3040,"children":3041},{"emptyLinePlaceholder":13},[3042],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3044,"children":3045},{"class":1028,"line":45},[3046],{"type":993,"tag":1026,"props":3047,"children":3048},{"style":1032},[3049],{"type":998,"value":3050},"# Safe approach 1: Iterate backwards\n",{"type":993,"tag":1026,"props":3052,"children":3053},{"class":1028,"line":54},[3054,3058,3062,3066,3070,3074,3078,3082,3086,3090,3094,3098,3102,3106,3110,3114,3118,3122,3126,3130,3135,3139,3144],{"type":993,"tag":1026,"props":3055,"children":3056},{"style":1041},[3057],{"type":998,"value":1944},{"type":993,"tag":1026,"props":3059,"children":3060},{"style":1047},[3061],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3063,"children":3064},{"style":1041},[3065],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3067,"children":3068},{"style":1091},[3069],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3071,"children":3072},{"style":1041},[3073],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3075,"children":3076},{"style":1091},[3077],{"type":998,"value":1209},{"type":993,"tag":1026,"props":3079,"children":3080},{"style":1041},[3081],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3083,"children":3084},{"style":1091},[3085],{"type":998,"value":1763},{"type":993,"tag":1026,"props":3087,"children":3088},{"style":1041},[3089],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3091,"children":3092},{"style":1091},[3093],{"type":998,"value":1981},{"type":993,"tag":1026,"props":3095,"children":3096},{"style":1041},[3097],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3099,"children":3100},{"style":1091},[3101],{"type":998,"value":1990},{"type":993,"tag":1026,"props":3103,"children":3104},{"style":1041},[3105],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3107,"children":3108},{"style":1091},[3109],{"type":998,"value":1999},{"type":993,"tag":1026,"props":3111,"children":3112},{"style":1041},[3113],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3115,"children":3116},{"style":1091},[3117],{"type":998,"value":2008},{"type":993,"tag":1026,"props":3119,"children":3120},{"style":1041},[3121],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3123,"children":3124},{"style":1091},[3125],{"type":998,"value":2017},{"type":993,"tag":1026,"props":3127,"children":3128},{"style":1041},[3129],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3131,"children":3132},{"style":1091},[3133],{"type":998,"value":3134},"9",{"type":993,"tag":1026,"props":3136,"children":3137},{"style":1041},[3138],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3140,"children":3141},{"style":1091},[3142],{"type":998,"value":3143},"10",{"type":993,"tag":1026,"props":3145,"children":3146},{"style":1041},[3147],{"type":998,"value":1085},{"type":993,"tag":1026,"props":3149,"children":3150},{"class":1028,"line":63},[3151,3155,3159,3163],{"type":993,"tag":1026,"props":3152,"children":3153},{"style":1091},[3154],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3156,"children":3157},{"style":1041},[3158],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3160,"children":3161},{"style":1058},[3162],{"type":998,"value":1104},{"type":993,"tag":1026,"props":3164,"children":3165},{"style":1041},[3166],{"type":998,"value":2041},{"type":993,"tag":1026,"props":3168,"children":3169},{"class":1028,"line":72},[3170],{"type":993,"tag":1026,"props":3171,"children":3172},{"emptyLinePlaceholder":13},[3173],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3175,"children":3176},{"class":1028,"line":81},[3177],{"type":993,"tag":1026,"props":3178,"children":3179},{"style":1032},[3180],{"type":998,"value":3181},"# Remove even numbers by iterating backwards\n",{"type":993,"tag":1026,"props":3183,"children":3184},{"class":1028,"line":91},[3185,3190,3195,3200,3205,3209,3214,3219,3223,3228,3232,3236,3240,3244,3248,3252],{"type":993,"tag":1026,"props":3186,"children":3187},{"style":1047},[3188],{"type":998,"value":3189},"for",{"type":993,"tag":1026,"props":3191,"children":3192},{"style":1041},[3193],{"type":998,"value":3194}," i ",{"type":993,"tag":1026,"props":3196,"children":3197},{"style":1047},[3198],{"type":998,"value":3199},"in",{"type":993,"tag":1026,"props":3201,"children":3202},{"style":1091},[3203],{"type":998,"value":3204}," range",{"type":993,"tag":1026,"props":3206,"children":3207},{"style":1041},[3208],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3210,"children":3211},{"style":1091},[3212],{"type":998,"value":3213},"len",{"type":993,"tag":1026,"props":3215,"children":3216},{"style":1041},[3217],{"type":998,"value":3218},"(numbers) ",{"type":993,"tag":1026,"props":3220,"children":3221},{"style":1047},[3222],{"type":998,"value":1541},{"type":993,"tag":1026,"props":3224,"children":3225},{"style":1091},[3226],{"type":998,"value":3227}," 1",{"type":993,"tag":1026,"props":3229,"children":3230},{"style":1041},[3231],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3233,"children":3234},{"style":1047},[3235],{"type":998,"value":1541},{"type":993,"tag":1026,"props":3237,"children":3238},{"style":1091},[3239],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3241,"children":3242},{"style":1041},[3243],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3245,"children":3246},{"style":1047},[3247],{"type":998,"value":1541},{"type":993,"tag":1026,"props":3249,"children":3250},{"style":1091},[3251],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3253,"children":3254},{"style":1041},[3255],{"type":998,"value":3256},"):\n",{"type":993,"tag":1026,"props":3258,"children":3259},{"class":1028,"line":100},[3260,3265,3270,3275,3280,3285,3290],{"type":993,"tag":1026,"props":3261,"children":3262},{"style":1047},[3263],{"type":998,"value":3264},"    if",{"type":993,"tag":1026,"props":3266,"children":3267},{"style":1041},[3268],{"type":998,"value":3269}," numbers[i] ",{"type":993,"tag":1026,"props":3271,"children":3272},{"style":1047},[3273],{"type":998,"value":3274},"%",{"type":993,"tag":1026,"props":3276,"children":3277},{"style":1091},[3278],{"type":998,"value":3279}," 2",{"type":993,"tag":1026,"props":3281,"children":3282},{"style":1047},[3283],{"type":998,"value":3284}," ==",{"type":993,"tag":1026,"props":3286,"children":3287},{"style":1091},[3288],{"type":998,"value":3289}," 0",{"type":993,"tag":1026,"props":3291,"children":3292},{"style":1041},[3293],{"type":998,"value":3294},":\n",{"type":993,"tag":1026,"props":3296,"children":3297},{"class":1028,"line":109},[3298],{"type":993,"tag":1026,"props":3299,"children":3300},{"style":1041},[3301],{"type":998,"value":3302},"        numbers.pop(i)\n",{"type":993,"tag":1026,"props":3304,"children":3305},{"class":1028,"line":118},[3306,3310,3314,3319],{"type":993,"tag":1026,"props":3307,"children":3308},{"style":1091},[3309],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3311,"children":3312},{"style":1041},[3313],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3315,"children":3316},{"style":1058},[3317],{"type":998,"value":3318},"\"After removing evens (backwards):\"",{"type":993,"tag":1026,"props":3320,"children":3321},{"style":1041},[3322],{"type":998,"value":2041},{"type":993,"tag":1026,"props":3324,"children":3325},{"class":1028,"line":127},[3326],{"type":993,"tag":1026,"props":3327,"children":3328},{"emptyLinePlaceholder":13},[3329],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3331,"children":3332},{"class":1028,"line":136},[3333],{"type":993,"tag":1026,"props":3334,"children":3335},{"style":1032},[3336],{"type":998,"value":3337},"# Safe approach 2: Create a copy to iterate over\n",{"type":993,"tag":1026,"props":3339,"children":3340},{"class":1028,"line":146},[3341,3345,3349,3353,3357,3361,3366,3370,3374,3378,3382,3386,3391],{"type":993,"tag":1026,"props":3342,"children":3343},{"style":1041},[3344],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3346,"children":3347},{"style":1047},[3348],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3350,"children":3351},{"style":1041},[3352],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3354,"children":3355},{"style":1058},[3356],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3358,"children":3359},{"style":1041},[3360],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3362,"children":3363},{"style":1058},[3364],{"type":998,"value":3365},"\"apricot\"",{"type":993,"tag":1026,"props":3367,"children":3368},{"style":1041},[3369],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3371,"children":3372},{"style":1058},[3373],{"type":998,"value":1071},{"type":993,"tag":1026,"props":3375,"children":3376},{"style":1041},[3377],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3379,"children":3380},{"style":1058},[3381],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3383,"children":3384},{"style":1041},[3385],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3387,"children":3388},{"style":1058},[3389],{"type":998,"value":3390},"\"avocado\"",{"type":993,"tag":1026,"props":3392,"children":3393},{"style":1041},[3394],{"type":998,"value":1085},{"type":993,"tag":1026,"props":3396,"children":3397},{"class":1028,"line":155},[3398,3402,3406,3411],{"type":993,"tag":1026,"props":3399,"children":3400},{"style":1091},[3401],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3403,"children":3404},{"style":1041},[3405],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3407,"children":3408},{"style":1058},[3409],{"type":998,"value":3410},"\"Original fruits:\"",{"type":993,"tag":1026,"props":3412,"children":3413},{"style":1041},[3414],{"type":998,"value":1109},{"type":993,"tag":1026,"props":3416,"children":3417},{"class":1028,"line":164},[3418],{"type":993,"tag":1026,"props":3419,"children":3420},{"emptyLinePlaceholder":13},[3421],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3423,"children":3424},{"class":1028,"line":173},[3425],{"type":993,"tag":1026,"props":3426,"children":3427},{"style":1032},[3428],{"type":998,"value":3429},"# Remove fruits starting with 'a'\n",{"type":993,"tag":1026,"props":3431,"children":3432},{"class":1028,"line":182},[3433,3437,3442,3446],{"type":993,"tag":1026,"props":3434,"children":3435},{"style":1047},[3436],{"type":998,"value":3189},{"type":993,"tag":1026,"props":3438,"children":3439},{"style":1041},[3440],{"type":998,"value":3441}," fruit ",{"type":993,"tag":1026,"props":3443,"children":3444},{"style":1047},[3445],{"type":998,"value":3199},{"type":993,"tag":1026,"props":3447,"children":3448},{"style":1041},[3449],{"type":998,"value":3450}," fruits.copy():\n",{"type":993,"tag":1026,"props":3452,"children":3453},{"class":1028,"line":191},[3454,3458,3463,3468],{"type":993,"tag":1026,"props":3455,"children":3456},{"style":1047},[3457],{"type":998,"value":3264},{"type":993,"tag":1026,"props":3459,"children":3460},{"style":1041},[3461],{"type":998,"value":3462}," fruit.startswith(",{"type":993,"tag":1026,"props":3464,"children":3465},{"style":1058},[3466],{"type":998,"value":3467},"'a'",{"type":993,"tag":1026,"props":3469,"children":3470},{"style":1041},[3471],{"type":998,"value":3256},{"type":993,"tag":1026,"props":3473,"children":3474},{"class":1028,"line":201},[3475],{"type":993,"tag":1026,"props":3476,"children":3477},{"style":1041},[3478],{"type":998,"value":3479},"        fruits.remove(fruit)\n",{"type":993,"tag":1026,"props":3481,"children":3482},{"class":1028,"line":210},[3483,3487,3491,3496],{"type":993,"tag":1026,"props":3484,"children":3485},{"style":1091},[3486],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3488,"children":3489},{"style":1041},[3490],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3492,"children":3493},{"style":1058},[3494],{"type":998,"value":3495},"\"After removing 'a' fruits:\"",{"type":993,"tag":1026,"props":3497,"children":3498},{"style":1041},[3499],{"type":998,"value":1109},{"type":993,"tag":1026,"props":3501,"children":3502},{"class":1028,"line":219},[3503],{"type":993,"tag":1026,"props":3504,"children":3505},{"emptyLinePlaceholder":13},[3506],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3508,"children":3509},{"class":1028,"line":228},[3510],{"type":993,"tag":1026,"props":3511,"children":3512},{"style":1032},[3513],{"type":998,"value":3514},"# Safe approach 3: List comprehension (creates new list)\n",{"type":993,"tag":1026,"props":3516,"children":3517},{"class":1028,"line":238},[3518,3522,3526,3530,3534,3538,3543,3547,3552,3556,3561,3565,3569,3573,3578,3582,3586],{"type":993,"tag":1026,"props":3519,"children":3520},{"style":1041},[3521],{"type":998,"value":1410},{"type":993,"tag":1026,"props":3523,"children":3524},{"style":1047},[3525],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3527,"children":3528},{"style":1041},[3529],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3531,"children":3532},{"style":1091},[3533],{"type":998,"value":1423},{"type":993,"tag":1026,"props":3535,"children":3536},{"style":1041},[3537],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3539,"children":3540},{"style":1091},[3541],{"type":998,"value":3542},"72",{"type":993,"tag":1026,"props":3544,"children":3545},{"style":1041},[3546],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3548,"children":3549},{"style":1091},[3550],{"type":998,"value":3551},"90",{"type":993,"tag":1026,"props":3553,"children":3554},{"style":1041},[3555],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3557,"children":3558},{"style":1091},[3559],{"type":998,"value":3560},"65",{"type":993,"tag":1026,"props":3562,"children":3563},{"style":1041},[3564],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3566,"children":3567},{"style":1091},[3568],{"type":998,"value":1459},{"type":993,"tag":1026,"props":3570,"children":3571},{"style":1041},[3572],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3574,"children":3575},{"style":1091},[3576],{"type":998,"value":3577},"45",{"type":993,"tag":1026,"props":3579,"children":3580},{"style":1041},[3581],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3583,"children":3584},{"style":1091},[3585],{"type":998,"value":1432},{"type":993,"tag":1026,"props":3587,"children":3588},{"style":1041},[3589],{"type":998,"value":1085},{"type":993,"tag":1026,"props":3591,"children":3592},{"class":1028,"line":247},[3593,3598,3602,3607,3611,3616,3620,3625,3630,3634,3639,3644],{"type":993,"tag":1026,"props":3594,"children":3595},{"style":1041},[3596],{"type":998,"value":3597},"passing_scores ",{"type":993,"tag":1026,"props":3599,"children":3600},{"style":1047},[3601],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3603,"children":3604},{"style":1041},[3605],{"type":998,"value":3606}," [score ",{"type":993,"tag":1026,"props":3608,"children":3609},{"style":1047},[3610],{"type":998,"value":3189},{"type":993,"tag":1026,"props":3612,"children":3613},{"style":1041},[3614],{"type":998,"value":3615}," score ",{"type":993,"tag":1026,"props":3617,"children":3618},{"style":1047},[3619],{"type":998,"value":3199},{"type":993,"tag":1026,"props":3621,"children":3622},{"style":1041},[3623],{"type":998,"value":3624}," scores ",{"type":993,"tag":1026,"props":3626,"children":3627},{"style":1047},[3628],{"type":998,"value":3629},"if",{"type":993,"tag":1026,"props":3631,"children":3632},{"style":1041},[3633],{"type":998,"value":3615},{"type":993,"tag":1026,"props":3635,"children":3636},{"style":1047},[3637],{"type":998,"value":3638},">=",{"type":993,"tag":1026,"props":3640,"children":3641},{"style":1091},[3642],{"type":998,"value":3643}," 70",{"type":993,"tag":1026,"props":3645,"children":3646},{"style":1041},[3647],{"type":998,"value":1085},{"type":993,"tag":1026,"props":3649,"children":3650},{"class":1028,"line":256},[3651,3655,3659,3664],{"type":993,"tag":1026,"props":3652,"children":3653},{"style":1091},[3654],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3656,"children":3657},{"style":1041},[3658],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3660,"children":3661},{"style":1058},[3662],{"type":998,"value":3663},"\"Passing scores:\"",{"type":993,"tag":1026,"props":3665,"children":3666},{"style":1041},[3667],{"type":998,"value":3668},", passing_scores)\n",{"type":993,"tag":1261,"props":3670,"children":3672},{"id":3671},"advanced-modification-techniques",[3673],{"type":998,"value":3674},"Advanced Modification Techniques",{"type":993,"tag":1001,"props":3676,"children":3677},{},[3678],{"type":998,"value":3679},"Beyond basic operations, Python offers advanced techniques for sophisticated list modifications, including nested list updates and conditional batch operations.",{"type":993,"tag":1374,"props":3681,"children":3683},{"id":3682},"advanced-examples",[3684],{"type":998,"value":3685},"Advanced Examples",{"type":993,"tag":1001,"props":3687,"children":3688},{},[3689],{"type":998,"value":3690},"Complex modification scenarios for real-world applications:",{"type":993,"tag":1012,"props":3692,"children":3693},{},[3694],{"type":993,"tag":1016,"props":3695,"children":3697},{"className":1018,"code":3696,"language":6,"meta":8,"style":8},"# Modifying nested lists\nmatrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\nprint(\"Original matrix:\", matrix)\n\n# Modify specific element in nested list\nmatrix[1][1] = 50\nprint(\"After modifying center:\", matrix)\n\n# Modify entire row\nmatrix[0] = [10, 20, 30]\nprint(\"After modifying first row:\", matrix)\n\n# Batch modifications with conditions\ntemperatures = [68, 72, 85, 91, 78, 88, 95]\nprint(\"Original temperatures:\", temperatures)\n\n# Convert high temperatures from Fahrenheit to Celsius\nfor i in range(len(temperatures)):\n    if temperatures[i] > 85:\n        temperatures[i] = round((temperatures[i] - 32) * 5/9, 1)\nprint(\"After converting high temps to Celsius:\", temperatures)\n\n# Multiple list modifications\nnames = [\"alice\", \"BOB\", \"charlie\", \"DIANA\"]\nages = [25, 30, 35, 28]\nprint(\"Original names:\", names)\nprint(\"Original ages:\", ages)\n\n# Normalize names and update ages\nfor i in range(len(names)):\n    names[i] = names[i].capitalize()\n    ages[i] += 1  # Everyone gets a year older\n\nprint(\"Normalized names:\", names)\nprint(\"Updated ages:\", ages)\n",[3698],{"type":993,"tag":1022,"props":3699,"children":3700},{"__ignoreMap":8},[3701,3709,3800,3821,3828,3836,3870,3890,3897,3905,3953,3973,3980,3988,4063,4084,4091,4099,4131,4157,4224,4244,4251,4259,4311,4362,4382,4403,4410,4418,4450,4467,4489,4496,4516],{"type":993,"tag":1026,"props":3702,"children":3703},{"class":1028,"line":12},[3704],{"type":993,"tag":1026,"props":3705,"children":3706},{"style":1032},[3707],{"type":998,"value":3708},"# Modifying nested lists\n",{"type":993,"tag":1026,"props":3710,"children":3711},{"class":1028,"line":27},[3712,3717,3721,3726,3730,3734,3738,3742,3746,3751,3755,3759,3763,3767,3771,3775,3779,3783,3787,3791,3795],{"type":993,"tag":1026,"props":3713,"children":3714},{"style":1041},[3715],{"type":998,"value":3716},"matrix ",{"type":993,"tag":1026,"props":3718,"children":3719},{"style":1047},[3720],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3722,"children":3723},{"style":1041},[3724],{"type":998,"value":3725}," [[",{"type":993,"tag":1026,"props":3727,"children":3728},{"style":1091},[3729],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3731,"children":3732},{"style":1041},[3733],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3735,"children":3736},{"style":1091},[3737],{"type":998,"value":1209},{"type":993,"tag":1026,"props":3739,"children":3740},{"style":1041},[3741],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3743,"children":3744},{"style":1091},[3745],{"type":998,"value":1763},{"type":993,"tag":1026,"props":3747,"children":3748},{"style":1041},[3749],{"type":998,"value":3750},"], [",{"type":993,"tag":1026,"props":3752,"children":3753},{"style":1091},[3754],{"type":998,"value":1981},{"type":993,"tag":1026,"props":3756,"children":3757},{"style":1041},[3758],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3760,"children":3761},{"style":1091},[3762],{"type":998,"value":1990},{"type":993,"tag":1026,"props":3764,"children":3765},{"style":1041},[3766],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3768,"children":3769},{"style":1091},[3770],{"type":998,"value":1999},{"type":993,"tag":1026,"props":3772,"children":3773},{"style":1041},[3774],{"type":998,"value":3750},{"type":993,"tag":1026,"props":3776,"children":3777},{"style":1091},[3778],{"type":998,"value":2008},{"type":993,"tag":1026,"props":3780,"children":3781},{"style":1041},[3782],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3784,"children":3785},{"style":1091},[3786],{"type":998,"value":2017},{"type":993,"tag":1026,"props":3788,"children":3789},{"style":1041},[3790],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3792,"children":3793},{"style":1091},[3794],{"type":998,"value":3134},{"type":993,"tag":1026,"props":3796,"children":3797},{"style":1041},[3798],{"type":998,"value":3799},"]]\n",{"type":993,"tag":1026,"props":3801,"children":3802},{"class":1028,"line":36},[3803,3807,3811,3816],{"type":993,"tag":1026,"props":3804,"children":3805},{"style":1091},[3806],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3808,"children":3809},{"style":1041},[3810],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3812,"children":3813},{"style":1058},[3814],{"type":998,"value":3815},"\"Original matrix:\"",{"type":993,"tag":1026,"props":3817,"children":3818},{"style":1041},[3819],{"type":998,"value":3820},", matrix)\n",{"type":993,"tag":1026,"props":3822,"children":3823},{"class":1028,"line":45},[3824],{"type":993,"tag":1026,"props":3825,"children":3826},{"emptyLinePlaceholder":13},[3827],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3829,"children":3830},{"class":1028,"line":54},[3831],{"type":993,"tag":1026,"props":3832,"children":3833},{"style":1032},[3834],{"type":998,"value":3835},"# Modify specific element in nested list\n",{"type":993,"tag":1026,"props":3837,"children":3838},{"class":1028,"line":63},[3839,3844,3848,3853,3857,3861,3865],{"type":993,"tag":1026,"props":3840,"children":3841},{"style":1041},[3842],{"type":998,"value":3843},"matrix[",{"type":993,"tag":1026,"props":3845,"children":3846},{"style":1091},[3847],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3849,"children":3850},{"style":1041},[3851],{"type":998,"value":3852},"][",{"type":993,"tag":1026,"props":3854,"children":3855},{"style":1091},[3856],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3858,"children":3859},{"style":1041},[3860],{"type":998,"value":1143},{"type":993,"tag":1026,"props":3862,"children":3863},{"style":1047},[3864],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3866,"children":3867},{"style":1091},[3868],{"type":998,"value":3869}," 50\n",{"type":993,"tag":1026,"props":3871,"children":3872},{"class":1028,"line":72},[3873,3877,3881,3886],{"type":993,"tag":1026,"props":3874,"children":3875},{"style":1091},[3876],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3878,"children":3879},{"style":1041},[3880],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3882,"children":3883},{"style":1058},[3884],{"type":998,"value":3885},"\"After modifying center:\"",{"type":993,"tag":1026,"props":3887,"children":3888},{"style":1041},[3889],{"type":998,"value":3820},{"type":993,"tag":1026,"props":3891,"children":3892},{"class":1028,"line":81},[3893],{"type":993,"tag":1026,"props":3894,"children":3895},{"emptyLinePlaceholder":13},[3896],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3898,"children":3899},{"class":1028,"line":91},[3900],{"type":993,"tag":1026,"props":3901,"children":3902},{"style":1032},[3903],{"type":998,"value":3904},"# Modify entire row\n",{"type":993,"tag":1026,"props":3906,"children":3907},{"class":1028,"line":100},[3908,3912,3916,3920,3924,3928,3932,3936,3941,3945,3949],{"type":993,"tag":1026,"props":3909,"children":3910},{"style":1041},[3911],{"type":998,"value":3843},{"type":993,"tag":1026,"props":3913,"children":3914},{"style":1091},[3915],{"type":998,"value":1199},{"type":993,"tag":1026,"props":3917,"children":3918},{"style":1041},[3919],{"type":998,"value":1143},{"type":993,"tag":1026,"props":3921,"children":3922},{"style":1047},[3923],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3925,"children":3926},{"style":1041},[3927],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3929,"children":3930},{"style":1091},[3931],{"type":998,"value":3143},{"type":993,"tag":1026,"props":3933,"children":3934},{"style":1041},[3935],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3937,"children":3938},{"style":1091},[3939],{"type":998,"value":3940},"20",{"type":993,"tag":1026,"props":3942,"children":3943},{"style":1041},[3944],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3946,"children":3947},{"style":1091},[3948],{"type":998,"value":2085},{"type":993,"tag":1026,"props":3950,"children":3951},{"style":1041},[3952],{"type":998,"value":1085},{"type":993,"tag":1026,"props":3954,"children":3955},{"class":1028,"line":109},[3956,3960,3964,3969],{"type":993,"tag":1026,"props":3957,"children":3958},{"style":1091},[3959],{"type":998,"value":1094},{"type":993,"tag":1026,"props":3961,"children":3962},{"style":1041},[3963],{"type":998,"value":1099},{"type":993,"tag":1026,"props":3965,"children":3966},{"style":1058},[3967],{"type":998,"value":3968},"\"After modifying first row:\"",{"type":993,"tag":1026,"props":3970,"children":3971},{"style":1041},[3972],{"type":998,"value":3820},{"type":993,"tag":1026,"props":3974,"children":3975},{"class":1028,"line":118},[3976],{"type":993,"tag":1026,"props":3977,"children":3978},{"emptyLinePlaceholder":13},[3979],{"type":998,"value":1117},{"type":993,"tag":1026,"props":3981,"children":3982},{"class":1028,"line":127},[3983],{"type":993,"tag":1026,"props":3984,"children":3985},{"style":1032},[3986],{"type":998,"value":3987},"# Batch modifications with conditions\n",{"type":993,"tag":1026,"props":3989,"children":3990},{"class":1028,"line":136},[3991,3996,4000,4004,4009,4013,4017,4021,4025,4029,4034,4038,4042,4046,4050,4054,4059],{"type":993,"tag":1026,"props":3992,"children":3993},{"style":1041},[3994],{"type":998,"value":3995},"temperatures ",{"type":993,"tag":1026,"props":3997,"children":3998},{"style":1047},[3999],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4001,"children":4002},{"style":1041},[4003],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4005,"children":4006},{"style":1091},[4007],{"type":998,"value":4008},"68",{"type":993,"tag":1026,"props":4010,"children":4011},{"style":1041},[4012],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4014,"children":4015},{"style":1091},[4016],{"type":998,"value":3542},{"type":993,"tag":1026,"props":4018,"children":4019},{"style":1041},[4020],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4022,"children":4023},{"style":1091},[4024],{"type":998,"value":1423},{"type":993,"tag":1026,"props":4026,"children":4027},{"style":1041},[4028],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4030,"children":4031},{"style":1091},[4032],{"type":998,"value":4033},"91",{"type":993,"tag":1026,"props":4035,"children":4036},{"style":1041},[4037],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4039,"children":4040},{"style":1091},[4041],{"type":998,"value":1441},{"type":993,"tag":1026,"props":4043,"children":4044},{"style":1041},[4045],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4047,"children":4048},{"style":1091},[4049],{"type":998,"value":1459},{"type":993,"tag":1026,"props":4051,"children":4052},{"style":1041},[4053],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4055,"children":4056},{"style":1091},[4057],{"type":998,"value":4058},"95",{"type":993,"tag":1026,"props":4060,"children":4061},{"style":1041},[4062],{"type":998,"value":1085},{"type":993,"tag":1026,"props":4064,"children":4065},{"class":1028,"line":146},[4066,4070,4074,4079],{"type":993,"tag":1026,"props":4067,"children":4068},{"style":1091},[4069],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4071,"children":4072},{"style":1041},[4073],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4075,"children":4076},{"style":1058},[4077],{"type":998,"value":4078},"\"Original temperatures:\"",{"type":993,"tag":1026,"props":4080,"children":4081},{"style":1041},[4082],{"type":998,"value":4083},", temperatures)\n",{"type":993,"tag":1026,"props":4085,"children":4086},{"class":1028,"line":155},[4087],{"type":993,"tag":1026,"props":4088,"children":4089},{"emptyLinePlaceholder":13},[4090],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4092,"children":4093},{"class":1028,"line":164},[4094],{"type":993,"tag":1026,"props":4095,"children":4096},{"style":1032},[4097],{"type":998,"value":4098},"# Convert high temperatures from Fahrenheit to Celsius\n",{"type":993,"tag":1026,"props":4100,"children":4101},{"class":1028,"line":173},[4102,4106,4110,4114,4118,4122,4126],{"type":993,"tag":1026,"props":4103,"children":4104},{"style":1047},[4105],{"type":998,"value":3189},{"type":993,"tag":1026,"props":4107,"children":4108},{"style":1041},[4109],{"type":998,"value":3194},{"type":993,"tag":1026,"props":4111,"children":4112},{"style":1047},[4113],{"type":998,"value":3199},{"type":993,"tag":1026,"props":4115,"children":4116},{"style":1091},[4117],{"type":998,"value":3204},{"type":993,"tag":1026,"props":4119,"children":4120},{"style":1041},[4121],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4123,"children":4124},{"style":1091},[4125],{"type":998,"value":3213},{"type":993,"tag":1026,"props":4127,"children":4128},{"style":1041},[4129],{"type":998,"value":4130},"(temperatures)):\n",{"type":993,"tag":1026,"props":4132,"children":4133},{"class":1028,"line":182},[4134,4138,4143,4148,4153],{"type":993,"tag":1026,"props":4135,"children":4136},{"style":1047},[4137],{"type":998,"value":3264},{"type":993,"tag":1026,"props":4139,"children":4140},{"style":1041},[4141],{"type":998,"value":4142}," temperatures[i] ",{"type":993,"tag":1026,"props":4144,"children":4145},{"style":1047},[4146],{"type":998,"value":4147},">",{"type":993,"tag":1026,"props":4149,"children":4150},{"style":1091},[4151],{"type":998,"value":4152}," 85",{"type":993,"tag":1026,"props":4154,"children":4155},{"style":1041},[4156],{"type":998,"value":3294},{"type":993,"tag":1026,"props":4158,"children":4159},{"class":1028,"line":191},[4160,4165,4169,4174,4179,4183,4188,4193,4198,4203,4208,4212,4216,4220],{"type":993,"tag":1026,"props":4161,"children":4162},{"style":1041},[4163],{"type":998,"value":4164},"        temperatures[i] ",{"type":993,"tag":1026,"props":4166,"children":4167},{"style":1047},[4168],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4170,"children":4171},{"style":1091},[4172],{"type":998,"value":4173}," round",{"type":993,"tag":1026,"props":4175,"children":4176},{"style":1041},[4177],{"type":998,"value":4178},"((temperatures[i] ",{"type":993,"tag":1026,"props":4180,"children":4181},{"style":1047},[4182],{"type":998,"value":1541},{"type":993,"tag":1026,"props":4184,"children":4185},{"style":1091},[4186],{"type":998,"value":4187}," 32",{"type":993,"tag":1026,"props":4189,"children":4190},{"style":1041},[4191],{"type":998,"value":4192},") ",{"type":993,"tag":1026,"props":4194,"children":4195},{"style":1047},[4196],{"type":998,"value":4197},"*",{"type":993,"tag":1026,"props":4199,"children":4200},{"style":1091},[4201],{"type":998,"value":4202}," 5",{"type":993,"tag":1026,"props":4204,"children":4205},{"style":1047},[4206],{"type":998,"value":4207},"/",{"type":993,"tag":1026,"props":4209,"children":4210},{"style":1091},[4211],{"type":998,"value":3134},{"type":993,"tag":1026,"props":4213,"children":4214},{"style":1041},[4215],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4217,"children":4218},{"style":1091},[4219],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4221,"children":4222},{"style":1041},[4223],{"type":998,"value":2741},{"type":993,"tag":1026,"props":4225,"children":4226},{"class":1028,"line":201},[4227,4231,4235,4240],{"type":993,"tag":1026,"props":4228,"children":4229},{"style":1091},[4230],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4232,"children":4233},{"style":1041},[4234],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4236,"children":4237},{"style":1058},[4238],{"type":998,"value":4239},"\"After converting high temps to Celsius:\"",{"type":993,"tag":1026,"props":4241,"children":4242},{"style":1041},[4243],{"type":998,"value":4083},{"type":993,"tag":1026,"props":4245,"children":4246},{"class":1028,"line":210},[4247],{"type":993,"tag":1026,"props":4248,"children":4249},{"emptyLinePlaceholder":13},[4250],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4252,"children":4253},{"class":1028,"line":219},[4254],{"type":993,"tag":1026,"props":4255,"children":4256},{"style":1032},[4257],{"type":998,"value":4258},"# Multiple list modifications\n",{"type":993,"tag":1026,"props":4260,"children":4261},{"class":1028,"line":228},[4262,4267,4271,4275,4280,4284,4289,4293,4298,4302,4307],{"type":993,"tag":1026,"props":4263,"children":4264},{"style":1041},[4265],{"type":998,"value":4266},"names ",{"type":993,"tag":1026,"props":4268,"children":4269},{"style":1047},[4270],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4272,"children":4273},{"style":1041},[4274],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4276,"children":4277},{"style":1058},[4278],{"type":998,"value":4279},"\"alice\"",{"type":993,"tag":1026,"props":4281,"children":4282},{"style":1041},[4283],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4285,"children":4286},{"style":1058},[4287],{"type":998,"value":4288},"\"BOB\"",{"type":993,"tag":1026,"props":4290,"children":4291},{"style":1041},[4292],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4294,"children":4295},{"style":1058},[4296],{"type":998,"value":4297},"\"charlie\"",{"type":993,"tag":1026,"props":4299,"children":4300},{"style":1041},[4301],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4303,"children":4304},{"style":1058},[4305],{"type":998,"value":4306},"\"DIANA\"",{"type":993,"tag":1026,"props":4308,"children":4309},{"style":1041},[4310],{"type":998,"value":1085},{"type":993,"tag":1026,"props":4312,"children":4313},{"class":1028,"line":238},[4314,4319,4323,4327,4332,4336,4340,4344,4349,4353,4358],{"type":993,"tag":1026,"props":4315,"children":4316},{"style":1041},[4317],{"type":998,"value":4318},"ages ",{"type":993,"tag":1026,"props":4320,"children":4321},{"style":1047},[4322],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4324,"children":4325},{"style":1041},[4326],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4328,"children":4329},{"style":1091},[4330],{"type":998,"value":4331},"25",{"type":993,"tag":1026,"props":4333,"children":4334},{"style":1041},[4335],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4337,"children":4338},{"style":1091},[4339],{"type":998,"value":2085},{"type":993,"tag":1026,"props":4341,"children":4342},{"style":1041},[4343],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4345,"children":4346},{"style":1091},[4347],{"type":998,"value":4348},"35",{"type":993,"tag":1026,"props":4350,"children":4351},{"style":1041},[4352],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4354,"children":4355},{"style":1091},[4356],{"type":998,"value":4357},"28",{"type":993,"tag":1026,"props":4359,"children":4360},{"style":1041},[4361],{"type":998,"value":1085},{"type":993,"tag":1026,"props":4363,"children":4364},{"class":1028,"line":247},[4365,4369,4373,4377],{"type":993,"tag":1026,"props":4366,"children":4367},{"style":1091},[4368],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4370,"children":4371},{"style":1041},[4372],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4374,"children":4375},{"style":1058},[4376],{"type":998,"value":1666},{"type":993,"tag":1026,"props":4378,"children":4379},{"style":1041},[4380],{"type":998,"value":4381},", names)\n",{"type":993,"tag":1026,"props":4383,"children":4384},{"class":1028,"line":256},[4385,4389,4393,4398],{"type":993,"tag":1026,"props":4386,"children":4387},{"style":1091},[4388],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4390,"children":4391},{"style":1041},[4392],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4394,"children":4395},{"style":1058},[4396],{"type":998,"value":4397},"\"Original ages:\"",{"type":993,"tag":1026,"props":4399,"children":4400},{"style":1041},[4401],{"type":998,"value":4402},", ages)\n",{"type":993,"tag":1026,"props":4404,"children":4405},{"class":1028,"line":265},[4406],{"type":993,"tag":1026,"props":4407,"children":4408},{"emptyLinePlaceholder":13},[4409],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4411,"children":4412},{"class":1028,"line":274},[4413],{"type":993,"tag":1026,"props":4414,"children":4415},{"style":1032},[4416],{"type":998,"value":4417},"# Normalize names and update ages\n",{"type":993,"tag":1026,"props":4419,"children":4420},{"class":1028,"line":284},[4421,4425,4429,4433,4437,4441,4445],{"type":993,"tag":1026,"props":4422,"children":4423},{"style":1047},[4424],{"type":998,"value":3189},{"type":993,"tag":1026,"props":4426,"children":4427},{"style":1041},[4428],{"type":998,"value":3194},{"type":993,"tag":1026,"props":4430,"children":4431},{"style":1047},[4432],{"type":998,"value":3199},{"type":993,"tag":1026,"props":4434,"children":4435},{"style":1091},[4436],{"type":998,"value":3204},{"type":993,"tag":1026,"props":4438,"children":4439},{"style":1041},[4440],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4442,"children":4443},{"style":1091},[4444],{"type":998,"value":3213},{"type":993,"tag":1026,"props":4446,"children":4447},{"style":1041},[4448],{"type":998,"value":4449},"(names)):\n",{"type":993,"tag":1026,"props":4451,"children":4452},{"class":1028,"line":293},[4453,4458,4462],{"type":993,"tag":1026,"props":4454,"children":4455},{"style":1041},[4456],{"type":998,"value":4457},"    names[i] ",{"type":993,"tag":1026,"props":4459,"children":4460},{"style":1047},[4461],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4463,"children":4464},{"style":1041},[4465],{"type":998,"value":4466}," names[i].capitalize()\n",{"type":993,"tag":1026,"props":4468,"children":4469},{"class":1028,"line":302},[4470,4475,4480,4484],{"type":993,"tag":1026,"props":4471,"children":4472},{"style":1041},[4473],{"type":998,"value":4474},"    ages[i] ",{"type":993,"tag":1026,"props":4476,"children":4477},{"style":1047},[4478],{"type":998,"value":4479},"+=",{"type":993,"tag":1026,"props":4481,"children":4482},{"style":1091},[4483],{"type":998,"value":3227},{"type":993,"tag":1026,"props":4485,"children":4486},{"style":1032},[4487],{"type":998,"value":4488},"  # Everyone gets a year older\n",{"type":993,"tag":1026,"props":4490,"children":4491},{"class":1028,"line":311},[4492],{"type":993,"tag":1026,"props":4493,"children":4494},{"emptyLinePlaceholder":13},[4495],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4497,"children":4498},{"class":1028,"line":320},[4499,4503,4507,4512],{"type":993,"tag":1026,"props":4500,"children":4501},{"style":1091},[4502],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4504,"children":4505},{"style":1041},[4506],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4508,"children":4509},{"style":1058},[4510],{"type":998,"value":4511},"\"Normalized names:\"",{"type":993,"tag":1026,"props":4513,"children":4514},{"style":1041},[4515],{"type":998,"value":4381},{"type":993,"tag":1026,"props":4517,"children":4518},{"class":1028,"line":329},[4519,4523,4527,4532],{"type":993,"tag":1026,"props":4520,"children":4521},{"style":1091},[4522],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4524,"children":4525},{"style":1041},[4526],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4528,"children":4529},{"style":1058},[4530],{"type":998,"value":4531},"\"Updated ages:\"",{"type":993,"tag":1026,"props":4533,"children":4534},{"style":1041},[4535],{"type":998,"value":4402},{"type":993,"tag":1261,"props":4537,"children":4539},{"id":4538},"common-modification-patterns",[4540],{"type":998,"value":4541},"Common Modification Patterns",{"type":993,"tag":1001,"props":4543,"children":4544},{},[4545],{"type":998,"value":4546},"Several patterns appear frequently when modifying lists in real-world programming. Understanding these patterns helps you choose the right approach for different scenarios.",{"type":993,"tag":1374,"props":4548,"children":4550},{"id":4549},"practical-patterns",[4551],{"type":998,"value":4552},"Practical Patterns",{"type":993,"tag":1001,"props":4554,"children":4555},{},[4556],{"type":998,"value":4557},"Real-world examples of list modification techniques:",{"type":993,"tag":1012,"props":4559,"children":4560},{},[4561],{"type":993,"tag":1016,"props":4562,"children":4564},{"className":1018,"code":4563,"language":6,"meta":8,"style":8},"# Pattern 1: Data cleaning and normalization\nuser_inputs = [\"  Alice  \", \"bob\", \"CHARLIE\", \"\", \"diana  \"]\nprint(\"Raw inputs:\", user_inputs)\n\n# Clean and normalize\nfor i in range(len(user_inputs)):\n    if user_inputs[i].strip():  # If not empty after stripping\n        user_inputs[i] = user_inputs[i].strip().title()\n    else:\n        user_inputs[i] = \"Unknown\"\n\nprint(\"Cleaned inputs:\", user_inputs)\n\n# Pattern 2: Conditional updates\ninventory = [5, 0, 3, 1, 0, 8, 2]\nprint(\"Original inventory:\", inventory)\n\n# Restock items with low inventory\nfor i in range(len(inventory)):\n    if inventory[i] \u003C= 2:\n        inventory[i] += 10  # Add 10 units\n\nprint(\"After restocking:\", inventory)\n\n# Pattern 3: Applying transformations\nprices = [10.99, 25.50, 5.75, 12.25]\nprint(\"Original prices:\", prices)\n\n# Apply 10% discount\nfor i in range(len(prices)):\n    prices[i] = round(prices[i] * 0.9, 2)\n\nprint(\"Discounted prices:\", prices)\n",[4565],{"type":993,"tag":1022,"props":4566,"children":4567},{"__ignoreMap":8},[4568,4576,4635,4656,4663,4671,4703,4720,4737,4749,4765,4772,4792,4799,4807,4879,4900,4907,4915,4947,4972,4994,5001,5021,5028,5036,5088,5109,5116,5124,5156,5198,5205],{"type":993,"tag":1026,"props":4569,"children":4570},{"class":1028,"line":12},[4571],{"type":993,"tag":1026,"props":4572,"children":4573},{"style":1032},[4574],{"type":998,"value":4575},"# Pattern 1: Data cleaning and normalization\n",{"type":993,"tag":1026,"props":4577,"children":4578},{"class":1028,"line":27},[4579,4584,4588,4592,4597,4601,4605,4609,4613,4617,4622,4626,4631],{"type":993,"tag":1026,"props":4580,"children":4581},{"style":1041},[4582],{"type":998,"value":4583},"user_inputs ",{"type":993,"tag":1026,"props":4585,"children":4586},{"style":1047},[4587],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4589,"children":4590},{"style":1041},[4591],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4593,"children":4594},{"style":1058},[4595],{"type":998,"value":4596},"\"  Alice  \"",{"type":993,"tag":1026,"props":4598,"children":4599},{"style":1041},[4600],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4602,"children":4603},{"style":1058},[4604],{"type":998,"value":1628},{"type":993,"tag":1026,"props":4606,"children":4607},{"style":1041},[4608],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4610,"children":4611},{"style":1058},[4612],{"type":998,"value":1637},{"type":993,"tag":1026,"props":4614,"children":4615},{"style":1041},[4616],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4618,"children":4619},{"style":1058},[4620],{"type":998,"value":4621},"\"\"",{"type":993,"tag":1026,"props":4623,"children":4624},{"style":1041},[4625],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4627,"children":4628},{"style":1058},[4629],{"type":998,"value":4630},"\"diana  \"",{"type":993,"tag":1026,"props":4632,"children":4633},{"style":1041},[4634],{"type":998,"value":1085},{"type":993,"tag":1026,"props":4636,"children":4637},{"class":1028,"line":36},[4638,4642,4646,4651],{"type":993,"tag":1026,"props":4639,"children":4640},{"style":1091},[4641],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4643,"children":4644},{"style":1041},[4645],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4647,"children":4648},{"style":1058},[4649],{"type":998,"value":4650},"\"Raw inputs:\"",{"type":993,"tag":1026,"props":4652,"children":4653},{"style":1041},[4654],{"type":998,"value":4655},", user_inputs)\n",{"type":993,"tag":1026,"props":4657,"children":4658},{"class":1028,"line":45},[4659],{"type":993,"tag":1026,"props":4660,"children":4661},{"emptyLinePlaceholder":13},[4662],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4664,"children":4665},{"class":1028,"line":54},[4666],{"type":993,"tag":1026,"props":4667,"children":4668},{"style":1032},[4669],{"type":998,"value":4670},"# Clean and normalize\n",{"type":993,"tag":1026,"props":4672,"children":4673},{"class":1028,"line":63},[4674,4678,4682,4686,4690,4694,4698],{"type":993,"tag":1026,"props":4675,"children":4676},{"style":1047},[4677],{"type":998,"value":3189},{"type":993,"tag":1026,"props":4679,"children":4680},{"style":1041},[4681],{"type":998,"value":3194},{"type":993,"tag":1026,"props":4683,"children":4684},{"style":1047},[4685],{"type":998,"value":3199},{"type":993,"tag":1026,"props":4687,"children":4688},{"style":1091},[4689],{"type":998,"value":3204},{"type":993,"tag":1026,"props":4691,"children":4692},{"style":1041},[4693],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4695,"children":4696},{"style":1091},[4697],{"type":998,"value":3213},{"type":993,"tag":1026,"props":4699,"children":4700},{"style":1041},[4701],{"type":998,"value":4702},"(user_inputs)):\n",{"type":993,"tag":1026,"props":4704,"children":4705},{"class":1028,"line":72},[4706,4710,4715],{"type":993,"tag":1026,"props":4707,"children":4708},{"style":1047},[4709],{"type":998,"value":3264},{"type":993,"tag":1026,"props":4711,"children":4712},{"style":1041},[4713],{"type":998,"value":4714}," user_inputs[i].strip():  ",{"type":993,"tag":1026,"props":4716,"children":4717},{"style":1032},[4718],{"type":998,"value":4719},"# If not empty after stripping\n",{"type":993,"tag":1026,"props":4721,"children":4722},{"class":1028,"line":81},[4723,4728,4732],{"type":993,"tag":1026,"props":4724,"children":4725},{"style":1041},[4726],{"type":998,"value":4727},"        user_inputs[i] ",{"type":993,"tag":1026,"props":4729,"children":4730},{"style":1047},[4731],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4733,"children":4734},{"style":1041},[4735],{"type":998,"value":4736}," user_inputs[i].strip().title()\n",{"type":993,"tag":1026,"props":4738,"children":4739},{"class":1028,"line":91},[4740,4745],{"type":993,"tag":1026,"props":4741,"children":4742},{"style":1047},[4743],{"type":998,"value":4744},"    else",{"type":993,"tag":1026,"props":4746,"children":4747},{"style":1041},[4748],{"type":998,"value":3294},{"type":993,"tag":1026,"props":4750,"children":4751},{"class":1028,"line":100},[4752,4756,4760],{"type":993,"tag":1026,"props":4753,"children":4754},{"style":1041},[4755],{"type":998,"value":4727},{"type":993,"tag":1026,"props":4757,"children":4758},{"style":1047},[4759],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4761,"children":4762},{"style":1058},[4763],{"type":998,"value":4764}," \"Unknown\"\n",{"type":993,"tag":1026,"props":4766,"children":4767},{"class":1028,"line":109},[4768],{"type":993,"tag":1026,"props":4769,"children":4770},{"emptyLinePlaceholder":13},[4771],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4773,"children":4774},{"class":1028,"line":118},[4775,4779,4783,4788],{"type":993,"tag":1026,"props":4776,"children":4777},{"style":1091},[4778],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4780,"children":4781},{"style":1041},[4782],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4784,"children":4785},{"style":1058},[4786],{"type":998,"value":4787},"\"Cleaned inputs:\"",{"type":993,"tag":1026,"props":4789,"children":4790},{"style":1041},[4791],{"type":998,"value":4655},{"type":993,"tag":1026,"props":4793,"children":4794},{"class":1028,"line":127},[4795],{"type":993,"tag":1026,"props":4796,"children":4797},{"emptyLinePlaceholder":13},[4798],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4800,"children":4801},{"class":1028,"line":136},[4802],{"type":993,"tag":1026,"props":4803,"children":4804},{"style":1032},[4805],{"type":998,"value":4806},"# Pattern 2: Conditional updates\n",{"type":993,"tag":1026,"props":4808,"children":4809},{"class":1028,"line":146},[4810,4815,4819,4823,4827,4831,4835,4839,4843,4847,4851,4855,4859,4863,4867,4871,4875],{"type":993,"tag":1026,"props":4811,"children":4812},{"style":1041},[4813],{"type":998,"value":4814},"inventory ",{"type":993,"tag":1026,"props":4816,"children":4817},{"style":1047},[4818],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4820,"children":4821},{"style":1041},[4822],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4824,"children":4825},{"style":1091},[4826],{"type":998,"value":1990},{"type":993,"tag":1026,"props":4828,"children":4829},{"style":1041},[4830],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4832,"children":4833},{"style":1091},[4834],{"type":998,"value":1199},{"type":993,"tag":1026,"props":4836,"children":4837},{"style":1041},[4838],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4840,"children":4841},{"style":1091},[4842],{"type":998,"value":1763},{"type":993,"tag":1026,"props":4844,"children":4845},{"style":1041},[4846],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4848,"children":4849},{"style":1091},[4850],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4852,"children":4853},{"style":1041},[4854],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4856,"children":4857},{"style":1091},[4858],{"type":998,"value":1199},{"type":993,"tag":1026,"props":4860,"children":4861},{"style":1041},[4862],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4864,"children":4865},{"style":1091},[4866],{"type":998,"value":2017},{"type":993,"tag":1026,"props":4868,"children":4869},{"style":1041},[4870],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4872,"children":4873},{"style":1091},[4874],{"type":998,"value":1209},{"type":993,"tag":1026,"props":4876,"children":4877},{"style":1041},[4878],{"type":998,"value":1085},{"type":993,"tag":1026,"props":4880,"children":4881},{"class":1028,"line":155},[4882,4886,4890,4895],{"type":993,"tag":1026,"props":4883,"children":4884},{"style":1091},[4885],{"type":998,"value":1094},{"type":993,"tag":1026,"props":4887,"children":4888},{"style":1041},[4889],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4891,"children":4892},{"style":1058},[4893],{"type":998,"value":4894},"\"Original inventory:\"",{"type":993,"tag":1026,"props":4896,"children":4897},{"style":1041},[4898],{"type":998,"value":4899},", inventory)\n",{"type":993,"tag":1026,"props":4901,"children":4902},{"class":1028,"line":164},[4903],{"type":993,"tag":1026,"props":4904,"children":4905},{"emptyLinePlaceholder":13},[4906],{"type":998,"value":1117},{"type":993,"tag":1026,"props":4908,"children":4909},{"class":1028,"line":173},[4910],{"type":993,"tag":1026,"props":4911,"children":4912},{"style":1032},[4913],{"type":998,"value":4914},"# Restock items with low inventory\n",{"type":993,"tag":1026,"props":4916,"children":4917},{"class":1028,"line":182},[4918,4922,4926,4930,4934,4938,4942],{"type":993,"tag":1026,"props":4919,"children":4920},{"style":1047},[4921],{"type":998,"value":3189},{"type":993,"tag":1026,"props":4923,"children":4924},{"style":1041},[4925],{"type":998,"value":3194},{"type":993,"tag":1026,"props":4927,"children":4928},{"style":1047},[4929],{"type":998,"value":3199},{"type":993,"tag":1026,"props":4931,"children":4932},{"style":1091},[4933],{"type":998,"value":3204},{"type":993,"tag":1026,"props":4935,"children":4936},{"style":1041},[4937],{"type":998,"value":1099},{"type":993,"tag":1026,"props":4939,"children":4940},{"style":1091},[4941],{"type":998,"value":3213},{"type":993,"tag":1026,"props":4943,"children":4944},{"style":1041},[4945],{"type":998,"value":4946},"(inventory)):\n",{"type":993,"tag":1026,"props":4948,"children":4949},{"class":1028,"line":191},[4950,4954,4959,4964,4968],{"type":993,"tag":1026,"props":4951,"children":4952},{"style":1047},[4953],{"type":998,"value":3264},{"type":993,"tag":1026,"props":4955,"children":4956},{"style":1041},[4957],{"type":998,"value":4958}," inventory[i] ",{"type":993,"tag":1026,"props":4960,"children":4961},{"style":1047},[4962],{"type":998,"value":4963},"\u003C=",{"type":993,"tag":1026,"props":4965,"children":4966},{"style":1091},[4967],{"type":998,"value":3279},{"type":993,"tag":1026,"props":4969,"children":4970},{"style":1041},[4971],{"type":998,"value":3294},{"type":993,"tag":1026,"props":4973,"children":4974},{"class":1028,"line":201},[4975,4980,4984,4989],{"type":993,"tag":1026,"props":4976,"children":4977},{"style":1041},[4978],{"type":998,"value":4979},"        inventory[i] ",{"type":993,"tag":1026,"props":4981,"children":4982},{"style":1047},[4983],{"type":998,"value":4479},{"type":993,"tag":1026,"props":4985,"children":4986},{"style":1091},[4987],{"type":998,"value":4988}," 10",{"type":993,"tag":1026,"props":4990,"children":4991},{"style":1032},[4992],{"type":998,"value":4993},"  # Add 10 units\n",{"type":993,"tag":1026,"props":4995,"children":4996},{"class":1028,"line":210},[4997],{"type":993,"tag":1026,"props":4998,"children":4999},{"emptyLinePlaceholder":13},[5000],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5002,"children":5003},{"class":1028,"line":219},[5004,5008,5012,5017],{"type":993,"tag":1026,"props":5005,"children":5006},{"style":1091},[5007],{"type":998,"value":1094},{"type":993,"tag":1026,"props":5009,"children":5010},{"style":1041},[5011],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5013,"children":5014},{"style":1058},[5015],{"type":998,"value":5016},"\"After restocking:\"",{"type":993,"tag":1026,"props":5018,"children":5019},{"style":1041},[5020],{"type":998,"value":4899},{"type":993,"tag":1026,"props":5022,"children":5023},{"class":1028,"line":228},[5024],{"type":993,"tag":1026,"props":5025,"children":5026},{"emptyLinePlaceholder":13},[5027],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5029,"children":5030},{"class":1028,"line":238},[5031],{"type":993,"tag":1026,"props":5032,"children":5033},{"style":1032},[5034],{"type":998,"value":5035},"# Pattern 3: Applying transformations\n",{"type":993,"tag":1026,"props":5037,"children":5038},{"class":1028,"line":247},[5039,5044,5048,5052,5057,5061,5066,5070,5075,5079,5084],{"type":993,"tag":1026,"props":5040,"children":5041},{"style":1041},[5042],{"type":998,"value":5043},"prices ",{"type":993,"tag":1026,"props":5045,"children":5046},{"style":1047},[5047],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5049,"children":5050},{"style":1041},[5051],{"type":998,"value":1055},{"type":993,"tag":1026,"props":5053,"children":5054},{"style":1091},[5055],{"type":998,"value":5056},"10.99",{"type":993,"tag":1026,"props":5058,"children":5059},{"style":1041},[5060],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5062,"children":5063},{"style":1091},[5064],{"type":998,"value":5065},"25.50",{"type":993,"tag":1026,"props":5067,"children":5068},{"style":1041},[5069],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5071,"children":5072},{"style":1091},[5073],{"type":998,"value":5074},"5.75",{"type":993,"tag":1026,"props":5076,"children":5077},{"style":1041},[5078],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5080,"children":5081},{"style":1091},[5082],{"type":998,"value":5083},"12.25",{"type":993,"tag":1026,"props":5085,"children":5086},{"style":1041},[5087],{"type":998,"value":1085},{"type":993,"tag":1026,"props":5089,"children":5090},{"class":1028,"line":256},[5091,5095,5099,5104],{"type":993,"tag":1026,"props":5092,"children":5093},{"style":1091},[5094],{"type":998,"value":1094},{"type":993,"tag":1026,"props":5096,"children":5097},{"style":1041},[5098],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5100,"children":5101},{"style":1058},[5102],{"type":998,"value":5103},"\"Original prices:\"",{"type":993,"tag":1026,"props":5105,"children":5106},{"style":1041},[5107],{"type":998,"value":5108},", prices)\n",{"type":993,"tag":1026,"props":5110,"children":5111},{"class":1028,"line":265},[5112],{"type":993,"tag":1026,"props":5113,"children":5114},{"emptyLinePlaceholder":13},[5115],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5117,"children":5118},{"class":1028,"line":274},[5119],{"type":993,"tag":1026,"props":5120,"children":5121},{"style":1032},[5122],{"type":998,"value":5123},"# Apply 10% discount\n",{"type":993,"tag":1026,"props":5125,"children":5126},{"class":1028,"line":284},[5127,5131,5135,5139,5143,5147,5151],{"type":993,"tag":1026,"props":5128,"children":5129},{"style":1047},[5130],{"type":998,"value":3189},{"type":993,"tag":1026,"props":5132,"children":5133},{"style":1041},[5134],{"type":998,"value":3194},{"type":993,"tag":1026,"props":5136,"children":5137},{"style":1047},[5138],{"type":998,"value":3199},{"type":993,"tag":1026,"props":5140,"children":5141},{"style":1091},[5142],{"type":998,"value":3204},{"type":993,"tag":1026,"props":5144,"children":5145},{"style":1041},[5146],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5148,"children":5149},{"style":1091},[5150],{"type":998,"value":3213},{"type":993,"tag":1026,"props":5152,"children":5153},{"style":1041},[5154],{"type":998,"value":5155},"(prices)):\n",{"type":993,"tag":1026,"props":5157,"children":5158},{"class":1028,"line":293},[5159,5164,5168,5172,5177,5181,5186,5190,5194],{"type":993,"tag":1026,"props":5160,"children":5161},{"style":1041},[5162],{"type":998,"value":5163},"    prices[i] ",{"type":993,"tag":1026,"props":5165,"children":5166},{"style":1047},[5167],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5169,"children":5170},{"style":1091},[5171],{"type":998,"value":4173},{"type":993,"tag":1026,"props":5173,"children":5174},{"style":1041},[5175],{"type":998,"value":5176},"(prices[i] ",{"type":993,"tag":1026,"props":5178,"children":5179},{"style":1047},[5180],{"type":998,"value":4197},{"type":993,"tag":1026,"props":5182,"children":5183},{"style":1091},[5184],{"type":998,"value":5185}," 0.9",{"type":993,"tag":1026,"props":5187,"children":5188},{"style":1041},[5189],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5191,"children":5192},{"style":1091},[5193],{"type":998,"value":1209},{"type":993,"tag":1026,"props":5195,"children":5196},{"style":1041},[5197],{"type":998,"value":2741},{"type":993,"tag":1026,"props":5199,"children":5200},{"class":1028,"line":302},[5201],{"type":993,"tag":1026,"props":5202,"children":5203},{"emptyLinePlaceholder":13},[5204],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5206,"children":5207},{"class":1028,"line":311},[5208,5212,5216,5221],{"type":993,"tag":1026,"props":5209,"children":5210},{"style":1091},[5211],{"type":998,"value":1094},{"type":993,"tag":1026,"props":5213,"children":5214},{"style":1041},[5215],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5217,"children":5218},{"style":1058},[5219],{"type":998,"value":5220},"\"Discounted prices:\"",{"type":993,"tag":1026,"props":5222,"children":5223},{"style":1041},[5224],{"type":998,"value":5108},{"type":993,"tag":5226,"props":5227,"children":5230},"exercise",{"hint":5228,"prompt":5229},"Use a for loop with range(len()) to modify elements based on whether they're even or odd!","Double all even numbers in the list, and change all odd numbers to their negative value.",[5231],{"type":993,"tag":1016,"props":5232,"children":5234},{"className":1018,"code":5233,"language":6,"meta":8,"style":8},"numbers = [1, 2, 3, 4, 5, 6, 7, 8]\nprint(\"Original:\", numbers)\n\n# TODO: Part 1: Double all even numbers (2 becomes 4, 4 becomes 8, etc.)\n# TODO: Part 2: Make all odd numbers negative (1 becomes -1, 3 becomes -3, etc.)\n# TODO: Your code here\n\nprint(\"After modifications:\", numbers)\n",[5235],{"type":993,"tag":1022,"props":5236,"children":5237},{"__ignoreMap":8},[5238,5317,5336,5343,5361,5377,5393,5400],{"type":993,"tag":1026,"props":5239,"children":5240},{"class":1028,"line":12},[5241,5245,5249,5253,5257,5261,5265,5269,5273,5277,5281,5285,5289,5293,5297,5301,5305,5309,5313],{"type":993,"tag":1026,"props":5242,"children":5243},{"style":1041},[5244],{"type":998,"value":1944},{"type":993,"tag":1026,"props":5246,"children":5247},{"style":1047},[5248],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5250,"children":5251},{"style":1041},[5252],{"type":998,"value":1055},{"type":993,"tag":1026,"props":5254,"children":5255},{"style":1091},[5256],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5258,"children":5259},{"style":1041},[5260],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5262,"children":5263},{"style":1091},[5264],{"type":998,"value":1209},{"type":993,"tag":1026,"props":5266,"children":5267},{"style":1041},[5268],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5270,"children":5271},{"style":1091},[5272],{"type":998,"value":1763},{"type":993,"tag":1026,"props":5274,"children":5275},{"style":1041},[5276],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5278,"children":5279},{"style":1091},[5280],{"type":998,"value":1981},{"type":993,"tag":1026,"props":5282,"children":5283},{"style":1041},[5284],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5286,"children":5287},{"style":1091},[5288],{"type":998,"value":1990},{"type":993,"tag":1026,"props":5290,"children":5291},{"style":1041},[5292],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5294,"children":5295},{"style":1091},[5296],{"type":998,"value":1999},{"type":993,"tag":1026,"props":5298,"children":5299},{"style":1041},[5300],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5302,"children":5303},{"style":1091},[5304],{"type":998,"value":2008},{"type":993,"tag":1026,"props":5306,"children":5307},{"style":1041},[5308],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5310,"children":5311},{"style":1091},[5312],{"type":998,"value":2017},{"type":993,"tag":1026,"props":5314,"children":5315},{"style":1041},[5316],{"type":998,"value":1085},{"type":993,"tag":1026,"props":5318,"children":5319},{"class":1028,"line":27},[5320,5324,5328,5332],{"type":993,"tag":1026,"props":5321,"children":5322},{"style":1091},[5323],{"type":998,"value":1094},{"type":993,"tag":1026,"props":5325,"children":5326},{"style":1041},[5327],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5329,"children":5330},{"style":1058},[5331],{"type":998,"value":1104},{"type":993,"tag":1026,"props":5333,"children":5334},{"style":1041},[5335],{"type":998,"value":2041},{"type":993,"tag":1026,"props":5337,"children":5338},{"class":1028,"line":36},[5339],{"type":993,"tag":1026,"props":5340,"children":5341},{"emptyLinePlaceholder":13},[5342],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5344,"children":5345},{"class":1028,"line":45},[5346,5351,5356],{"type":993,"tag":1026,"props":5347,"children":5348},{"style":1032},[5349],{"type":998,"value":5350},"# ",{"type":993,"tag":1026,"props":5352,"children":5353},{"style":1047},[5354],{"type":998,"value":5355},"TODO",{"type":993,"tag":1026,"props":5357,"children":5358},{"style":1032},[5359],{"type":998,"value":5360},": Part 1: Double all even numbers (2 becomes 4, 4 becomes 8, etc.)\n",{"type":993,"tag":1026,"props":5362,"children":5363},{"class":1028,"line":54},[5364,5368,5372],{"type":993,"tag":1026,"props":5365,"children":5366},{"style":1032},[5367],{"type":998,"value":5350},{"type":993,"tag":1026,"props":5369,"children":5370},{"style":1047},[5371],{"type":998,"value":5355},{"type":993,"tag":1026,"props":5373,"children":5374},{"style":1032},[5375],{"type":998,"value":5376},": Part 2: Make all odd numbers negative (1 becomes -1, 3 becomes -3, etc.)\n",{"type":993,"tag":1026,"props":5378,"children":5379},{"class":1028,"line":63},[5380,5384,5388],{"type":993,"tag":1026,"props":5381,"children":5382},{"style":1032},[5383],{"type":998,"value":5350},{"type":993,"tag":1026,"props":5385,"children":5386},{"style":1047},[5387],{"type":998,"value":5355},{"type":993,"tag":1026,"props":5389,"children":5390},{"style":1032},[5391],{"type":998,"value":5392},": Your code here\n",{"type":993,"tag":1026,"props":5394,"children":5395},{"class":1028,"line":72},[5396],{"type":993,"tag":1026,"props":5397,"children":5398},{"emptyLinePlaceholder":13},[5399],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5401,"children":5402},{"class":1028,"line":81},[5403,5407,5411,5416],{"type":993,"tag":1026,"props":5404,"children":5405},{"style":1091},[5406],{"type":998,"value":1094},{"type":993,"tag":1026,"props":5408,"children":5409},{"style":1041},[5410],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5412,"children":5413},{"style":1058},[5414],{"type":998,"value":5415},"\"After modifications:\"",{"type":993,"tag":1026,"props":5417,"children":5418},{"style":1041},[5419],{"type":998,"value":2041},{"type":993,"tag":1374,"props":5421,"children":5423},{"id":5422},"solution-and-explanation",[5424],{"type":998,"value":5425},"Solution and Explanation 💡",{"type":993,"tag":5427,"props":5428,"children":5429},"details",{},[5430,5438,5718,5726],{"type":993,"tag":5431,"props":5432,"children":5435},"summary",{"className":5433},[5434],"cursor-pointer",[5436],{"type":998,"value":5437},"Click to see the complete solution",{"type":993,"tag":1012,"props":5439,"children":5440},{},[5441],{"type":993,"tag":1016,"props":5442,"children":5444},{"className":1018,"code":5443,"language":6,"meta":8,"style":8},"numbers = [1, 2, 3, 4, 5, 6, 7, 8]\nprint(\"Original:\", numbers)\n\n# Modify elements based on even/odd\nfor i in range(len(numbers)):\n    if numbers[i] % 2 == 0:  # Even numbers\n        numbers[i] = numbers[i] * 2\n    else:  # Odd numbers\n        numbers[i] = -numbers[i]\n\nprint(\"After modifications:\", numbers)\n",[5445],{"type":993,"tag":1022,"props":5446,"children":5447},{"__ignoreMap":8},[5448,5527,5546,5553,5561,5593,5630,5655,5671,5692,5699],{"type":993,"tag":1026,"props":5449,"children":5450},{"class":1028,"line":12},[5451,5455,5459,5463,5467,5471,5475,5479,5483,5487,5491,5495,5499,5503,5507,5511,5515,5519,5523],{"type":993,"tag":1026,"props":5452,"children":5453},{"style":1041},[5454],{"type":998,"value":1944},{"type":993,"tag":1026,"props":5456,"children":5457},{"style":1047},[5458],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5460,"children":5461},{"style":1041},[5462],{"type":998,"value":1055},{"type":993,"tag":1026,"props":5464,"children":5465},{"style":1091},[5466],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5468,"children":5469},{"style":1041},[5470],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5472,"children":5473},{"style":1091},[5474],{"type":998,"value":1209},{"type":993,"tag":1026,"props":5476,"children":5477},{"style":1041},[5478],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5480,"children":5481},{"style":1091},[5482],{"type":998,"value":1763},{"type":993,"tag":1026,"props":5484,"children":5485},{"style":1041},[5486],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5488,"children":5489},{"style":1091},[5490],{"type":998,"value":1981},{"type":993,"tag":1026,"props":5492,"children":5493},{"style":1041},[5494],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5496,"children":5497},{"style":1091},[5498],{"type":998,"value":1990},{"type":993,"tag":1026,"props":5500,"children":5501},{"style":1041},[5502],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5504,"children":5505},{"style":1091},[5506],{"type":998,"value":1999},{"type":993,"tag":1026,"props":5508,"children":5509},{"style":1041},[5510],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5512,"children":5513},{"style":1091},[5514],{"type":998,"value":2008},{"type":993,"tag":1026,"props":5516,"children":5517},{"style":1041},[5518],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5520,"children":5521},{"style":1091},[5522],{"type":998,"value":2017},{"type":993,"tag":1026,"props":5524,"children":5525},{"style":1041},[5526],{"type":998,"value":1085},{"type":993,"tag":1026,"props":5528,"children":5529},{"class":1028,"line":27},[5530,5534,5538,5542],{"type":993,"tag":1026,"props":5531,"children":5532},{"style":1091},[5533],{"type":998,"value":1094},{"type":993,"tag":1026,"props":5535,"children":5536},{"style":1041},[5537],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5539,"children":5540},{"style":1058},[5541],{"type":998,"value":1104},{"type":993,"tag":1026,"props":5543,"children":5544},{"style":1041},[5545],{"type":998,"value":2041},{"type":993,"tag":1026,"props":5547,"children":5548},{"class":1028,"line":36},[5549],{"type":993,"tag":1026,"props":5550,"children":5551},{"emptyLinePlaceholder":13},[5552],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5554,"children":5555},{"class":1028,"line":45},[5556],{"type":993,"tag":1026,"props":5557,"children":5558},{"style":1032},[5559],{"type":998,"value":5560},"# Modify elements based on even/odd\n",{"type":993,"tag":1026,"props":5562,"children":5563},{"class":1028,"line":54},[5564,5568,5572,5576,5580,5584,5588],{"type":993,"tag":1026,"props":5565,"children":5566},{"style":1047},[5567],{"type":998,"value":3189},{"type":993,"tag":1026,"props":5569,"children":5570},{"style":1041},[5571],{"type":998,"value":3194},{"type":993,"tag":1026,"props":5573,"children":5574},{"style":1047},[5575],{"type":998,"value":3199},{"type":993,"tag":1026,"props":5577,"children":5578},{"style":1091},[5579],{"type":998,"value":3204},{"type":993,"tag":1026,"props":5581,"children":5582},{"style":1041},[5583],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5585,"children":5586},{"style":1091},[5587],{"type":998,"value":3213},{"type":993,"tag":1026,"props":5589,"children":5590},{"style":1041},[5591],{"type":998,"value":5592},"(numbers)):\n",{"type":993,"tag":1026,"props":5594,"children":5595},{"class":1028,"line":63},[5596,5600,5604,5608,5612,5616,5620,5625],{"type":993,"tag":1026,"props":5597,"children":5598},{"style":1047},[5599],{"type":998,"value":3264},{"type":993,"tag":1026,"props":5601,"children":5602},{"style":1041},[5603],{"type":998,"value":3269},{"type":993,"tag":1026,"props":5605,"children":5606},{"style":1047},[5607],{"type":998,"value":3274},{"type":993,"tag":1026,"props":5609,"children":5610},{"style":1091},[5611],{"type":998,"value":3279},{"type":993,"tag":1026,"props":5613,"children":5614},{"style":1047},[5615],{"type":998,"value":3284},{"type":993,"tag":1026,"props":5617,"children":5618},{"style":1091},[5619],{"type":998,"value":3289},{"type":993,"tag":1026,"props":5621,"children":5622},{"style":1041},[5623],{"type":998,"value":5624},":  ",{"type":993,"tag":1026,"props":5626,"children":5627},{"style":1032},[5628],{"type":998,"value":5629},"# Even numbers\n",{"type":993,"tag":1026,"props":5631,"children":5632},{"class":1028,"line":72},[5633,5638,5642,5646,5650],{"type":993,"tag":1026,"props":5634,"children":5635},{"style":1041},[5636],{"type":998,"value":5637},"        numbers[i] ",{"type":993,"tag":1026,"props":5639,"children":5640},{"style":1047},[5641],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5643,"children":5644},{"style":1041},[5645],{"type":998,"value":3269},{"type":993,"tag":1026,"props":5647,"children":5648},{"style":1047},[5649],{"type":998,"value":4197},{"type":993,"tag":1026,"props":5651,"children":5652},{"style":1091},[5653],{"type":998,"value":5654}," 2\n",{"type":993,"tag":1026,"props":5656,"children":5657},{"class":1028,"line":81},[5658,5662,5666],{"type":993,"tag":1026,"props":5659,"children":5660},{"style":1047},[5661],{"type":998,"value":4744},{"type":993,"tag":1026,"props":5663,"children":5664},{"style":1041},[5665],{"type":998,"value":5624},{"type":993,"tag":1026,"props":5667,"children":5668},{"style":1032},[5669],{"type":998,"value":5670},"# Odd numbers\n",{"type":993,"tag":1026,"props":5672,"children":5673},{"class":1028,"line":91},[5674,5678,5682,5687],{"type":993,"tag":1026,"props":5675,"children":5676},{"style":1041},[5677],{"type":998,"value":5637},{"type":993,"tag":1026,"props":5679,"children":5680},{"style":1047},[5681],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5683,"children":5684},{"style":1047},[5685],{"type":998,"value":5686}," -",{"type":993,"tag":1026,"props":5688,"children":5689},{"style":1041},[5690],{"type":998,"value":5691},"numbers[i]\n",{"type":993,"tag":1026,"props":5693,"children":5694},{"class":1028,"line":100},[5695],{"type":993,"tag":1026,"props":5696,"children":5697},{"emptyLinePlaceholder":13},[5698],{"type":998,"value":1117},{"type":993,"tag":1026,"props":5700,"children":5701},{"class":1028,"line":109},[5702,5706,5710,5714],{"type":993,"tag":1026,"props":5703,"children":5704},{"style":1091},[5705],{"type":998,"value":1094},{"type":993,"tag":1026,"props":5707,"children":5708},{"style":1041},[5709],{"type":998,"value":1099},{"type":993,"tag":1026,"props":5711,"children":5712},{"style":1058},[5713],{"type":998,"value":5415},{"type":993,"tag":1026,"props":5715,"children":5716},{"style":1041},[5717],{"type":998,"value":2041},{"type":993,"tag":1001,"props":5719,"children":5720},{},[5721],{"type":993,"tag":1288,"props":5722,"children":5723},{},[5724],{"type":998,"value":5725},"Key Learning Points:",{"type":993,"tag":1310,"props":5727,"children":5728},{},[5729,5749,5768,5779],{"type":993,"tag":1314,"props":5730,"children":5731},{},[5732,5734,5739,5741,5747],{"type":998,"value":5733},"📌 ",{"type":993,"tag":1288,"props":5735,"children":5736},{},[5737],{"type":998,"value":5738},"Index-based modification",{"type":998,"value":5740},": Use ",{"type":993,"tag":1022,"props":5742,"children":5744},{"className":5743},[],[5745],{"type":998,"value":5746},"range(len())",{"type":998,"value":5748}," to modify elements in place",{"type":993,"tag":1314,"props":5750,"children":5751},{},[5752,5753,5758,5760,5766],{"type":998,"value":5733},{"type":993,"tag":1288,"props":5754,"children":5755},{},[5756],{"type":998,"value":5757},"Modulo operator",{"type":998,"value":5759},": ",{"type":993,"tag":1022,"props":5761,"children":5763},{"className":5762},[],[5764],{"type":998,"value":5765},"% 2 == 0",{"type":998,"value":5767}," checks if number is even",{"type":993,"tag":1314,"props":5769,"children":5770},{},[5771,5772,5777],{"type":998,"value":5733},{"type":993,"tag":1288,"props":5773,"children":5774},{},[5775],{"type":998,"value":5776},"Conditional modification",{"type":998,"value":5778},": Different operations based on element value",{"type":993,"tag":1314,"props":5780,"children":5781},{},[5782,5783,5788],{"type":998,"value":5733},{"type":993,"tag":1288,"props":5784,"children":5785},{},[5786],{"type":998,"value":5787},"Mathematical operations",{"type":998,"value":5789},": Multiply by 2 for doubling, negate with minus sign",{"type":993,"tag":1261,"props":5791,"children":5793},{"id":5792},"best-practices-for-list-modification",[5794],{"type":998,"value":5795},"Best Practices for List Modification",{"type":993,"tag":1001,"props":5797,"children":5798},{},[5799],{"type":998,"value":5800},"Following best practices ensures your list modifications are safe, efficient, and maintainable.",{"type":993,"tag":1278,"props":5802,"children":5805},{"emoji":5803,"title":5804,"type":1819},"✨","Modification Best Practices",[5806,5813,5836,5844,5883,5891],{"type":993,"tag":1001,"props":5807,"children":5808},{},[5809],{"type":993,"tag":1288,"props":5810,"children":5811},{},[5812],{"type":998,"value":1336},{"type":993,"tag":1310,"props":5814,"children":5815},{},[5816,5821,5826,5831],{"type":993,"tag":1314,"props":5817,"children":5818},{},[5819],{"type":998,"value":5820},"Always check bounds before index access",{"type":993,"tag":1314,"props":5822,"children":5823},{},[5824],{"type":998,"value":5825},"Use try/except for dynamic modifications",{"type":993,"tag":1314,"props":5827,"children":5828},{},[5829],{"type":998,"value":5830},"Be careful when modifying during iteration",{"type":993,"tag":1314,"props":5832,"children":5833},{},[5834],{"type":998,"value":5835},"Prefer clear, readable approaches over clever tricks",{"type":993,"tag":1001,"props":5837,"children":5838},{},[5839],{"type":993,"tag":1288,"props":5840,"children":5841},{},[5842],{"type":998,"value":5843},"Performance Tips:",{"type":993,"tag":1310,"props":5845,"children":5846},{},[5847,5852,5873,5878],{"type":993,"tag":1314,"props":5848,"children":5849},{},[5850],{"type":998,"value":5851},"Use slice assignment for bulk changes",{"type":993,"tag":1314,"props":5853,"children":5854},{},[5855,5857,5863,5865,5871],{"type":998,"value":5856},"Avoid repeated ",{"type":993,"tag":1022,"props":5858,"children":5860},{"className":5859},[],[5861],{"type":998,"value":5862},"insert(0, item)",{"type":998,"value":5864}," calls (use ",{"type":993,"tag":1022,"props":5866,"children":5868},{"className":5867},[],[5869],{"type":998,"value":5870},"deque",{"type":998,"value":5872}," instead)",{"type":993,"tag":1314,"props":5874,"children":5875},{},[5876],{"type":998,"value":5877},"Consider list comprehensions for filtering",{"type":993,"tag":1314,"props":5879,"children":5880},{},[5881],{"type":998,"value":5882},"Use appropriate methods for specific operations",{"type":993,"tag":1001,"props":5884,"children":5885},{},[5886],{"type":993,"tag":1288,"props":5887,"children":5888},{},[5889],{"type":998,"value":5890},"Maintainability:",{"type":993,"tag":1310,"props":5892,"children":5893},{},[5894,5899,5904,5909],{"type":993,"tag":1314,"props":5895,"children":5896},{},[5897],{"type":998,"value":5898},"Write clear, self-documenting code",{"type":993,"tag":1314,"props":5900,"children":5901},{},[5902],{"type":998,"value":5903},"Use meaningful variable names",{"type":993,"tag":1314,"props":5905,"children":5906},{},[5907],{"type":998,"value":5908},"Comment complex modification logic",{"type":993,"tag":1314,"props":5910,"children":5911},{},[5912],{"type":998,"value":5913},"Test edge cases (empty lists, single items)",{"type":993,"tag":1261,"props":5915,"children":5917},{"id":5916},"take-quiz",[5918],{"type":998,"value":5919},"Take Quiz",{"type":993,"tag":1001,"props":5921,"children":5922},{},[5923],{"type":998,"value":5924},"Test your understanding of modifying lists:",{"type":993,"tag":5926,"props":5927,"children":5929},"redirect-button",{"label":5919,"url":5928},"/tutorial-quiz/python/modifying-lists",[],{"type":993,"tag":1261,"props":5931,"children":5933},{"id":5932},"whats-next",[5934],{"type":998,"value":5935},"What's Next?",{"type":993,"tag":1001,"props":5937,"children":5938},{},[5939,5941,5946,5948,5954,5955,5961,5962,5968],{"type":998,"value":5940},"Now that you know how to modify existing list elements, you're ready to learn about ",{"type":993,"tag":1288,"props":5942,"children":5943},{},[5944],{"type":998,"value":5945},"adding new elements to lists",{"type":998,"value":5947},". This includes using ",{"type":993,"tag":1022,"props":5949,"children":5951},{"className":5950},[],[5952],{"type":998,"value":5953},"append()",{"type":998,"value":1066},{"type":993,"tag":1022,"props":5956,"children":5958},{"className":5957},[],[5959],{"type":998,"value":5960},"insert()",{"type":998,"value":1066},{"type":993,"tag":1022,"props":5963,"children":5965},{"className":5964},[],[5966],{"type":998,"value":5967},"extend()",{"type":998,"value":5969},", and other techniques to grow your lists.",{"type":993,"tag":1001,"props":5971,"children":5972},{},[5973,5975,5980],{"type":998,"value":5974},"Ready to continue? Check out our lesson on ",{"type":993,"tag":5976,"props":5977,"children":5978},"a",{"href":307},[5979],{"type":998,"value":308},{"type":998,"value":5981}," to expand your list manipulation skills! ➕",{"type":993,"tag":5983,"props":5984,"children":5985},"style",{},[5986],{"type":998,"value":5987},"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":5989},[5990,5993,5996,5999,6002,6005,6009,6010,6011],{"id":1263,"depth":27,"text":1266,"children":5991},[5992],{"id":1376,"depth":36,"text":1379},{"id":1806,"depth":27,"text":1809,"children":5994},[5995],{"id":1910,"depth":36,"text":1913},{"id":2481,"depth":27,"text":2484,"children":5997},[5998],{"id":2618,"depth":36,"text":2621},{"id":2917,"depth":27,"text":2920,"children":6000},[6001],{"id":3001,"depth":36,"text":3004},{"id":3671,"depth":27,"text":3674,"children":6003},[6004],{"id":3682,"depth":36,"text":3685},{"id":4538,"depth":27,"text":4541,"children":6006},[6007,6008],{"id":4549,"depth":36,"text":4552},{"id":5422,"depth":36,"text":5425},{"id":5792,"depth":27,"text":5795},{"id":5916,"depth":27,"text":5919},{"id":5932,"depth":27,"text":5935},1782373736598]